Indev450 / SRB2Kart-Saturn

GNU General Public License v2.0
24 stars 9 forks source link

``v.getSpritePatch`` from 2.2 #91

Closed Chearii closed 8 months ago

Chearii commented 8 months ago

This adds getSpritePatch to the BLUA HUD functions. NOTE: The function is structured similarly to 2.2's getSprite2Patch function, and not the standard getSpritePatch function, due to the player-sprite handling: v.getSpritePatch(string/int skin, string/int sprite, [int frame, [int rotation, [angle_t rollangle]]])

getSpritePatch allows for advanced HUD capabilities by drawing object sprites on the HUD, allowing for the following features:

I've attached a test lua for this addition: bananatest.txt (save as a .lua file!)

Should everything work fine, you should see two rotating sprites (a banana, and Tails with the default green) on the upper left corner of the screen:

Indev450 commented 8 months ago

Thanks for pr :)