defun-games / claylib

A Common Lisp 2D/3D game toolkit built on top of Raylib 4.5.
zlib License
71 stars 4 forks source link

Invalid initialization arguments in make-texture #9

Closed mjkalyan closed 2 years ago

mjkalyan commented 2 years ago
  (apply #'make-instance 'texture-object
         :asset texture-asset
         :dest (make-instance 'rl-rectangle
                              :x x
                              :y y
                              :width (or width (width texture-asset))
                              :height (or height (height texture-asset)))
         args))

As you can see above, make-texture, as it is in the asset-rework branch at the moment, gives :width and :height to the outer make-instance for texture-object via args. texture-object does not have :width/:height so this is an error.

I don't know the cleanest way to solve this since it's undesirable to list out each keyword in place of args. I tried that anyway and got an "uneven number of keywords" error - although this is probably a problem on my end. I will investigate it further soon.

shelvick commented 2 years ago

Does it work if you add :allow-other-keys t to that apply?

mjkalyan commented 2 years ago

Ah yes, silly me. I've added :allow-other-keys t to make-texture.

shelvick commented 2 years ago

silly me

Why silly you? I'm the one who created that bug!