Uzebox / uzebox

A retro-minimalist game console engine for the ATMega644
http://uzebox.org
128 stars 43 forks source link

Add SetVsyncCounter function, fix compiler warning when SPRITES_AUTO_PROCESS=0 #104

Closed artcfox closed 1 year ago

artcfox commented 1 year ago

Games relying on GetVsyncCounter() for world time should be able to save the value when the game is paused, and then restore it after the game is unpaused by calling SetVsyncCounter() to prevent world time from advancing while paused.

Changes:
 - Add global SetVsyncCounter ASM function and C prototype
 - Fix compiler warning when SPRITES_AUTO_PROCESS=0

Testing:
 - Tested against default ROMS, additional Mode 3 games.