added more speeds to paralax scrolling layer

This commit is contained in:
2026-05-13 00:28:13 -05:00
parent 9311dd423b
commit d1e7a2e605
5 changed files with 116 additions and 96 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -450,78 +450,78 @@
0000846e t internal_reset
000085b4 t VDP_drawImageEx.constprop.0.isra.0
000086fc t main.isra.0
00008b70 T _start_entry
00008c36 T _reset_entry
00008c3e T XGM_doVBlankProcess
00008ca4 T MDDBG__SymbolDataPtr
00008ca8 t __ErrorHandler
00008ca8 t MDDBG__ErrorHandler
00008dd0 t MDDBG__Error_IdleLoop
00008dea t MDDBG__Error_InitConsole
00008df6 t MDDBG__Error_MaskStackBoundaries
00008e60 t MDDBG__Error_DrawOffsetLocation
00008e64 t MDDBG__Error_DrawOffsetLocation2
00008e6a t MDDBG__Error_DrawOffsetLocation__inj
00008ef8 t MDDBG__ErrorHandler_SetupVDP
00008f2e t MDDBG__ErrorHandler_VDPConfig
00008f44 t MDDBG__ErrorHandler_VDPConfig_Nametables
00008f80 t MDDBG__ErrorHandler_ConsoleConfig_Initial
00008f84 t MDDBG__ErrorHandler_ConsoleConfig_Shared
00008fb4 t MDDBG__Str_OffsetLocation_24bit
00008fbd t MDDBG__Str_OffsetLocation_32bit
00008ff8 t MDDBG__Art1bpp_Font
000092f2 t MDDBG__GetSymbolByOffset
0000960c t MDDBG__FormatString
000096e6 t MDDBG__Console_Init
00009724 t MDDBG__Console_Reset
00009726 t MDDBG__Console_InitShared
00009770 t MDDBG__Console_SetPosAsXY_Stack
00009776 t MDDBG__Console_SetPosAsXY
000097aa t MDDBG__Console_GetPosAsXY
000097d0 t MDDBG__Console_StartNewLine
000097fe t MDDBG__Console_SetBasePattern
0000981a t MDDBG__Console_SetWidth
00009838 t MDDBG__Console_WriteLine_WithPattern
0000983a t MDDBG__Console_WriteLine
0000983e t MDDBG__Console_Write
00009904 t MDDBG__Console_WriteLine_Formatted
00009908 t MDDBG__Console_Write_Formatted
00009938 t MDDBG__Decomp1bpp
00009954 t MDDBG__KDebug_WriteLine_Formatted
00009958 t MDDBG__KDebug_Write_Formatted
000099ac t MDDBG__KDebug_FlushLine
000099b6 t MDDBG__KDebug_WriteLine
000099ba t MDDBG__KDebug_Write
000099e8 t MDDBG__ErrorHandler_ConsoleOnly
00009a0e t MDDBG__ErrorHandler_ClearConsole
00009a38 t MDDBG__ErrorHandler_PauseConsole
00009a72 t MDDBG__ErrorHandler_PagesController
00009ad2 t MDDBG__VSync
00009b0c t MDDBG__ErrorHandler_ExtraDebuggerList
00009b18 t MDDBG__Debugger_AddressRegisters
00009b64 t MDDBG__Debugger_Backtrace
00009c02 T _Bus_Error
00009c02 t MDDBG__BusError
00009c16 T _Address_Error
00009c16 t MDDBG__AddressError
00009c2e T _Illegal_Instruction
00009c2e t MDDBG__IllegalInstr
00009c4c T _Zero_Divide
00009c4c t MDDBG__ZeroDivide
00009c62 T _Chk_Instruction
00009c62 t MDDBG__ChkInstr
00009c7c T _Trapv_Instruction
00009c7c t MDDBG__TrapvInstr
00009c98 T _Privilege_Violation
00009c98 t MDDBG__PrivilegeViol
00009cb6 T _Trace
00009cb6 t MDDBG__Trace
00009cc6 T _Line_1010_Emulation
00009cc6 t MDDBG__Line1010Emu
00009ce2 T _Line_1111_Emulation
00009ce2 t MDDBG__Line1111Emu
00009cfe T _Error_Exception
00009cfe t MDDBG__ErrorExcept
00008c04 T _start_entry
00008cca T _reset_entry
00008cd2 T XGM_doVBlankProcess
00008d38 T MDDBG__SymbolDataPtr
00008d3c t __ErrorHandler
00008d3c t MDDBG__ErrorHandler
00008e64 t MDDBG__Error_IdleLoop
00008e7e t MDDBG__Error_InitConsole
00008e8a t MDDBG__Error_MaskStackBoundaries
00008ef4 t MDDBG__Error_DrawOffsetLocation
00008ef8 t MDDBG__Error_DrawOffsetLocation2
00008efe t MDDBG__Error_DrawOffsetLocation__inj
00008f8c t MDDBG__ErrorHandler_SetupVDP
00008fc2 t MDDBG__ErrorHandler_VDPConfig
00008fd8 t MDDBG__ErrorHandler_VDPConfig_Nametables
00009014 t MDDBG__ErrorHandler_ConsoleConfig_Initial
00009018 t MDDBG__ErrorHandler_ConsoleConfig_Shared
00009048 t MDDBG__Str_OffsetLocation_24bit
00009051 t MDDBG__Str_OffsetLocation_32bit
0000908c t MDDBG__Art1bpp_Font
00009386 t MDDBG__GetSymbolByOffset
000096a0 t MDDBG__FormatString
0000977a t MDDBG__Console_Init
000097b8 t MDDBG__Console_Reset
000097ba t MDDBG__Console_InitShared
00009804 t MDDBG__Console_SetPosAsXY_Stack
0000980a t MDDBG__Console_SetPosAsXY
0000983e t MDDBG__Console_GetPosAsXY
00009864 t MDDBG__Console_StartNewLine
00009892 t MDDBG__Console_SetBasePattern
000098ae t MDDBG__Console_SetWidth
000098cc t MDDBG__Console_WriteLine_WithPattern
000098ce t MDDBG__Console_WriteLine
000098d2 t MDDBG__Console_Write
00009998 t MDDBG__Console_WriteLine_Formatted
0000999c t MDDBG__Console_Write_Formatted
000099cc t MDDBG__Decomp1bpp
000099e8 t MDDBG__KDebug_WriteLine_Formatted
000099ec t MDDBG__KDebug_Write_Formatted
00009a40 t MDDBG__KDebug_FlushLine
00009a4a t MDDBG__KDebug_WriteLine
00009a4e t MDDBG__KDebug_Write
00009a7c t MDDBG__ErrorHandler_ConsoleOnly
00009aa2 t MDDBG__ErrorHandler_ClearConsole
00009acc t MDDBG__ErrorHandler_PauseConsole
00009b06 t MDDBG__ErrorHandler_PagesController
00009b66 t MDDBG__VSync
00009ba0 t MDDBG__ErrorHandler_ExtraDebuggerList
00009bac t MDDBG__Debugger_AddressRegisters
00009bf8 t MDDBG__Debugger_Backtrace
00009c96 T _Bus_Error
00009c96 t MDDBG__BusError
00009caa T _Address_Error
00009caa t MDDBG__AddressError
00009cc2 T _Illegal_Instruction
00009cc2 t MDDBG__IllegalInstr
00009ce0 T _Zero_Divide
00009ce0 t MDDBG__ZeroDivide
00009cf6 T _Chk_Instruction
00009cf6 t MDDBG__ChkInstr
00009d10 T _Trapv_Instruction
00009d10 t MDDBG__TrapvInstr
00009d2c T _Privilege_Violation
00009d2c t MDDBG__PrivilegeViol
00009d4a T _Trace
00009d4a t MDDBG__Trace
00009d5a T _Line_1010_Emulation
00009d5a t MDDBG__Line1010Emu
00009d76 T _Line_1111_Emulation
00009d76 t MDDBG__Line1111Emu
00009d92 T _Error_Exception
00009d92 t MDDBG__ErrorExcept
00009e00 T smp_null
00009f00 T smp_null_dpcm
00009f80 T __mulsi3 /home/runner/work/m68k-elf-gcc/m68k-elf-gcc/.build/HOST-i686-w64-mingw32/m68k-elf/src/gcc/libgcc/config/m68k/lb1sf68.S:442
@@ -604,21 +604,22 @@ e0ff0060 B intLevelSave
e0ff0062 B intTrace
e0ff0064 B dmaQueues
e0ff0068 b state
e0ff006c b tile_scroll_array
e0ff00a4 b scrollFrameDelay
e0ff00a8 b player_hflip
e0ff00aa b player
e0ff00ae b player_y
e0ff00b2 b player_x
e0ff00b6 b vscroll_update
e0ff00b7 b hscroll_update
e0ff00b8 b fadePSGVol
e0ff00ba b fadeFMVol
e0ff00bc b fadeCount
e0ff00be b usedVDPSprite
e0ff00c0 b xgm2WaitTab
e0ff00c8 b xgm2IdleTab
e0ff00d0 b xgmTempoCnt
e0ff006a b tile_scroll_array
e0ff00a2 b scrollFrameDelayHalved
e0ff00a6 b scrollFrameDelay
e0ff00aa b player_hflip
e0ff00ac b player
e0ff00b0 b player_y
e0ff00b4 b player_x
e0ff00b8 b vscroll_update
e0ff00b9 b hscroll_update
e0ff00ba b fadePSGVol
e0ff00bc b fadeFMVol
e0ff00be b fadeCount
e0ff00c0 b usedVDPSprite
e0ff00c2 b xgm2WaitTab
e0ff00ca b xgm2IdleTab
e0ff00d2 b xgmTempoCnt
e0ff00d4 b xgmWaitTab
e0ff0114 b xgmIdleTab
e0ff0154 b xgmTempoDef

View File

@@ -11,6 +11,7 @@ bool player_hflip;
int scrollFrameDelay = 0;
int scrollFrameDelayHalved = 0;
s16 tile_scroll_array [28] = {
0,0,0,0,0,
@@ -164,19 +165,36 @@ int main(bool hard)
if (scrollFrameDelay > 1){
scrollFrameDelay = 0;
tile_scroll_array[15] -=1;
tile_scroll_array[16] -=1;
tile_scroll_array[17] -=1;
tile_scroll_array[18] -=1;
tile_scroll_array[19] -=1;
if (scrollFrameDelayHalved >1){
//0.25 scroll speed
tile_scroll_array[15] -=1;
tile_scroll_array[16] -=1;
tile_scroll_array[17] -=1;
tile_scroll_array[18] -=1;
tile_scroll_array[19] -=1;
//reset this timer
scrollFrameDelayHalved = 0;
}
// 0.5 scroll speed
tile_scroll_array[20] -=1;
// effectively 1.5 scroll speed.
tile_scroll_array[22] -=1;
// 2.5
tile_scroll_array[25] -=1;
scrollFrameDelayHalved ++;
}
tile_scroll_array[20] -=1;
tile_scroll_array[21] -=1;
tile_scroll_array[22] -=2;
tile_scroll_array[22] -=1; //1.5
tile_scroll_array[23] -=2;
tile_scroll_array[24] -=2;
tile_scroll_array[25] -=3;
tile_scroll_array[25] -=2; // 2.5
tile_scroll_array[26] -=3;
tile_scroll_array[27] -=3;
@@ -185,6 +203,7 @@ int main(bool hard)
// wait for screen refresh and do all SGDK VBlank tasks
SYS_doVBlankProcess();
}