Compare commits

...

4 Commits

Author SHA1 Message Date
be46574c3e updated title screen 2026-05-16 15:39:52 -05:00
e8428b0d7e moved to different file 2026-05-15 23:23:16 -05:00
d1e7a2e605 added more speeds to paralax scrolling layer 2026-05-13 00:28:13 -05:00
9311dd423b added parallax scrolling to demo screen 2026-05-12 23:57:28 -05:00
16 changed files with 687 additions and 390 deletions

13
inc/title_screen.h Normal file
View File

@@ -0,0 +1,13 @@
#include <genesis.h>
#ifndef TITLE_SCREEN_H_
#define TITLE_SCREEN_H_
extern Sprite* player_sprite;
extern s16 tile_scroll_array [];
extern void init_title_screen();
extern void update_title_screen();
extern void draw_title_screen();
#endif // TITLE_SCREEN_H

View File

@@ -1,3 +1,6 @@
out/res/resources.o: res/resources.res \ out/res/resources.o: res/resources.res \
C:/Users/ttibb/Dev/SGDK-Game/res/background1.png \ C:/Users/ttibb/Dev/SGDK-Game/res/background1.png \
C:/Users/ttibb/Dev/SGDK-Game/res/btwade_bg1_1.png \
C:/Users/ttibb/Dev/SGDK-Game/res/btwade_bg2_1.png \
C:/Users/ttibb/Dev/SGDK-Game/res/BTW-TitleSign-merged.png \
C:/Users/ttibb/Dev/SGDK-Game/res/Sprites/BTW-1.png C:/Users/ttibb/Dev/SGDK-Game/res/Sprites/BTW-1.png

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -17,4 +17,4 @@ out/src/Main.o: src/Main.c c:/SGDK/inc/genesis.h c:/SGDK/inc/types.h \
c:/SGDK/inc/task_cst.h c:/SGDK/inc/ext/flash-save/flash.h \ c:/SGDK/inc/task_cst.h c:/SGDK/inc/ext/flash-save/flash.h \
c:/SGDK/inc/types.h c:/SGDK/inc/ext/flash-save/saveman.h \ c:/SGDK/inc/types.h c:/SGDK/inc/ext/flash-save/saveman.h \
c:/SGDK/inc/ext/console.h c:/SGDK/inc/config.h c:/SGDK/inc/string.h \ c:/SGDK/inc/ext/console.h c:/SGDK/inc/config.h c:/SGDK/inc/string.h \
c:/SGDK/inc/maths.h c:/SGDK/inc/dma.h res/resources.h c:/SGDK/inc/maths.h c:/SGDK/inc/dma.h res/resources.h inc/title_screen.h

Binary file not shown.

21
out/src/title_screen.d Normal file
View File

@@ -0,0 +1,21 @@
out/src/title_screen.o: src/title_screen.c c:/SGDK/inc/genesis.h \
c:/SGDK/inc/types.h c:/SGDK/inc/config.h c:/SGDK/inc/asm.h \
c:/SGDK/inc/sys.h c:/SGDK/inc/sram.h c:/SGDK/inc/mapper.h \
c:/SGDK/inc/memory.h c:/SGDK/inc/memory_base.h c:/SGDK/inc/tools.h \
c:/SGDK/inc/bmp.h c:/SGDK/inc/maths.h c:/SGDK/inc/vdp.h \
c:/SGDK/inc/pal.h c:/SGDK/inc/dma.h c:/SGDK/inc/vdp_tile.h \
c:/SGDK/inc/vdp_bg.h c:/SGDK/inc/map.h c:/SGDK/inc/pool.h \
c:/SGDK/inc/object.h c:/SGDK/inc/font.h c:/SGDK/res/libres.h \
c:/SGDK/inc/string.h c:/SGDK/inc/tab_cnv.h c:/SGDK/inc/maths3D.h \
c:/SGDK/inc/vdp_spr.h c:/SGDK/inc/vdp_pal.h c:/SGDK/inc/vram.h \
c:/SGDK/inc/sprite_eng.h c:/SGDK/inc/sprite_eng_legacy.h \
c:/SGDK/inc/z80_ctrl.h c:/SGDK/inc/ym2612.h c:/SGDK/inc/psg.h \
c:/SGDK/inc/snd/sound.h c:/SGDK/inc/snd/xgm.h c:/SGDK/inc/snd/xgm2.h \
c:/SGDK/inc/snd/smp_null.h c:/SGDK/inc/snd/smp_null_dpcm.h \
c:/SGDK/inc/snd/pcm/snd_pcm.h c:/SGDK/inc/snd/pcm/snd_dpcm2.h \
c:/SGDK/inc/snd/pcm/snd_pcm4.h c:/SGDK/inc/joy.h c:/SGDK/inc/timer.h \
c:/SGDK/inc/task.h c:/SGDK/inc/task_cst.h \
c:/SGDK/inc/ext/flash-save/flash.h c:/SGDK/inc/types.h \
c:/SGDK/inc/ext/flash-save/saveman.h c:/SGDK/inc/ext/console.h \
c:/SGDK/inc/config.h c:/SGDK/inc/string.h c:/SGDK/inc/maths.h \
c:/SGDK/inc/dma.h res/resources.h inc/title_screen.h

BIN
out/src/title_screen.o Normal file

Binary file not shown.

View File

@@ -4,10 +4,32 @@
00000020 a bigTex1_palette_data_size 00000020 a bigTex1_palette_data_size
00000020 a font_pal_default_data_size 00000020 a font_pal_default_data_size
00000020 a sgdk_logo_palette_data_size 00000020 a sgdk_logo_palette_data_size
00000044 A _sdata 00000020 a titleSignSprite_palette_data_size
00000048 A _sdata
00000064 a titleSignSprite_animation0_frame5_tileset_data_size
00000064 a titleSignSprite_animation2_frame3_tileset_data_size
00000066 a titleSignSprite_animation0_frame0_tileset_data_size
00000068 a titleSignSprite_animation2_frame4_tileset_data_size
0000007a a titleSignSprite_animation2_frame2_tileset_data_size
00000080 a bg1_palette_data_size 00000080 a bg1_palette_data_size
00000080 a bgtest_palette_data_size
00000084 a titleSignSprite_animation2_frame1_tileset_data_size
00000096 a titleSignSprite_animation2_frame0_tileset_data_size
0000009c a titleSignSprite_animation2_frame5_tileset_data_size
000000a8 a titleSignSprite_animation1_frame1_tileset_data_size
000000ac A stop_xgm_size 000000ac A stop_xgm_size
000000b2 a titleSignSprite_animation1_frame5_tileset_data_size
000000ba a titleSignSprite_animation1_frame3_tileset_data_size
000000c4 a titleSignSprite_animation1_frame4_tileset_data_size
000000d2 a titleSignSprite_animation1_frame2_tileset_data_size
000000d6 a titleSignSprite_animation1_frame0_tileset_data_size
000000e8 a titleSignSprite_animation0_frame1_tileset_data_size
000000f4 a titleSignSprite_animation0_frame3_tileset_data_size
000000fa a titleSignSprite_animation0_frame2_tileset_data_size
00000100 T rom_header 00000100 T rom_header
0000011c a titleSignSprite_animation0_frame4_tileset_data_size
00000144 a bg1_tilemap_data_size
0000014c a fg1_tilemap_data_size
00000200 t _Entry_Point 00000200 t _Entry_Point
0000023c t NoTMSS 0000023c t NoTMSS
00000242 t SkipInit 00000242 t SkipInit
@@ -15,7 +37,7 @@
0000025a t _EXTINT 0000025a t _EXTINT
00000262 a font_default_data_size 00000262 a font_default_data_size
0000026c t _VINT 0000026c t _VINT
00000270 a bg1_tilemap_data_size 00000270 a bgtest_tilemap_data_size
00000282 a bigTex1_animation0_frame0_tileset_data_size 00000282 a bigTex1_animation0_frame0_tileset_data_size
0000028e t unlock 0000028e t unlock
000002b0 t no_user_task 000002b0 t no_user_task
@@ -43,6 +65,7 @@
000003e6 t norm 000003e6 t norm
000003f6 t not1 000003f6 t not1
00000410 t slow 00000410 t slow
00000424 a bg1_tileset_data_size
0000043a a sgdk_logo_data_size 0000043a a sgdk_logo_data_size
0000043c t slower 0000043c t slower
00000440 t moreadj 00000440 t moreadj
@@ -51,6 +74,7 @@
00000468 T TSK_init 00000468 T TSK_init
0000048e t .loop 0000048e t .loop
00000496 T TSK_superPost 00000496 T TSK_superPost
000004a8 a fg1_tileset_data_size
000004ac t no_task 000004ac t no_task
000004ae T TSK_userYield 000004ae T TSK_userYield
000004b6 t userYield 000004b6 t userYield
@@ -89,7 +113,7 @@
00000798 T lz4w_unpack 00000798 T lz4w_unpack
0000079e t lz4w_unpack_a 0000079e t lz4w_unpack_a
000007b8 t .jump_table 000007b8 t .jump_table
000009b6 a bg1_tileset_data_size 000009b6 a bgtest_tileset_data_size
00000cb6 t .lmr_len_01 00000cb6 t .lmr_len_01
00000dca t .lmr_len_00 00000dca t .lmr_len_00
00000fdc t .lm_len_00 00000fdc t .lm_len_00
@@ -357,309 +381,407 @@
00001b18 t .lit5_matF 00001b18 t .lit5_matF
00001b1a t .lit3_matF 00001b1a t .lit3_matF
00001b1c t .lit1_matF 00001b1c t .lit1_matF
00001b58 t myJoyHandler 00001b58 t DMA_queueDmaFast
00001d0a t DMA_queueDmaFast 00001ca6 t Z80_getAndRequestBus.constprop.0
00001e58 t DMA_doDmaFast 00001cd4 t externalIntCB
00001fe8 t DMA_doCPUCopyDirect 00001e14 t _extint_dummy_callback
0000212c t DMA_doCPUCopy 00001e16 t read6Btn
000021e6 t Z80_getAndRequestBus.constprop.0 00001f5e t readMouse
00002214 t externalIntCB 00002366 t readTeamPlayer
00002354 t _extint_dummy_callback 00002b38 t readLightgun
00002356 t read6Btn 000030b8 t readTrackball
0000249e t readMouse 000032ec t MEM_alloc
000028a6 t readTeamPlayer 000033e4 t MEM_free
00003078 t readLightgun 000033f6 t DMA_setBufferSize
000035f8 t readTrackball 00003450 t MEM_pack
0000382c t MEM_alloc 000034b8 t DMA_queueDma.isra.0
00003902 t MEM_free 00003544 t _int_callback
00003914 t DMA_setBufferSize 00003546 t _vblank_dummy_callback
0000396e t MEM_pack 00003548 t _vint_dummy_callback
000039d6 t _int_callback 0000354a t _hint_dummy_callback
000039d8 t _vblank_dummy_callback 0000354c t VDP_setHVLatching
000039da t _vint_dummy_callback 0000358c t updateUserTileMaxIndex
000039dc t _hint_dummy_callback 0000358e t VDP_resetSprites
000039de t VDP_setHVLatching 000035b6 t VDP_getPlaneAddress
00003a1e t updateUserTileMaxIndex 00003668 t XGM_unloadDriver
00003a20 t VDP_resetSprites 00003680 t XGM2_unloadDriver
00003a48 t VDP_getPlaneAddress 00003688 t SND_DPCM2_unloadDriver
00003afa t XGM_unloadDriver 00003688 t SND_PCM_unloadDriver
00003b12 t XGM2_unloadDriver 00003688 t SND_PCM4_unloadDriver
00003b1a t SND_DPCM2_unloadDriver 0000368a t YM2612_reset
00003b1a t SND_PCM_unloadDriver 00003a96 t setNextXFrame.constprop.0
00003b1a t SND_PCM4_unloadDriver 00003ae4 t DMA_initEx.constprop.0
00003b1c t YM2612_reset 00003b5c t VRAM_createRegion.constprop.0
00003f28 t setNextXFrame.constprop.0 00003bba t VRAM_alloc.constprop.0
00003f76 t DMA_initEx.constprop.0 00003c88 t SPR_defragVRAM
00003fee t VRAM_createRegion.constprop.0 00003d32 t SPR_addSpriteEx.constprop.0
0000404c t VRAM_alloc.constprop.0 00003f5c t VDP_setTileMapDataEx.constprop.0
0000411a t SPR_defragVRAM 00004030 t JOY_update
000041c4 t VDP_setTileMapDataEx.constprop.0 000044f8 t Z80_clear
00004298 t releaseSprite.part.0.isra.0 000045ba t Z80_upload
00004300 t SPR_addSpriteEx.constprop.0 000046d4 t Z80_upload.constprop.0
0000446a t JOY_update 000047b0 t Z80_upload.constprop.1
00004932 t Z80_clear 0000488c t PAL_doFadeStep
000049f4 t Z80_upload 000048a6 t SPR_end
00004b0e t Z80_upload.constprop.0 00004934 t SND_NULL_loadDriver
00004bea t Z80_upload.constprop.1 00004a2c t Z80_loadDriverInternal
00004cc6 t PAL_doFadeStep 00004b3c t getAccess
00004ce0 t VDP_drawTextEx.constprop.0 00004c8c t setFMVolume
00004e50 t SND_NULL_loadDriver 00004d24 t setPSGVolume
00004f48 t Z80_loadDriverInternal 00004dbc t setMusicTempo.constprop.0
00005058 t getAccess 00004e52 t setLoopNumber.constprop.0
000051a8 t setFMVolume 00004ea0 t setTileMapDataRowEx.constprop.1
00005240 t setPSGVolume 00004fcc t VDP_drawText
000052d8 t setMusicTempo.constprop.0 00005128 t setTileMapDataColumnEx.constprop.0
0000536e t setLoopNumber.constprop.0 0000527c t VDP_setTileMapDataRectEx.constprop.0
000053bc t setTileMapDataColumnEx.constprop.0 000055f6 t unpack.isra.0
00005526 t VDP_setTileMapDataRectEx.constprop.0 0000562c t SPR_update
000057f0 t SPR_update 00005e34 t VDP_waitVBlank
00005ff8 t VDP_waitVBlank 00005fde T BMP_doVBlankProcess
000061a2 T BMP_doVBlankProcess 00005fe8 T memset
000061ac T VDP_setAutoInc 00006002 t XGM2_loadDriver
000061c6 T memset 00006182 t Z80_loadDriver
000061e0 t XGM2_loadDriver 00006264 t Z80_init
00006360 t Z80_loadDriver 000062ca t XGM2_stop
00006442 t Z80_init 00006350 t XGM2_pause
000064a8 t XGM2_stop 000063c2 t SYS_doVBlankProcessEx.constprop.0.isra.0
0000652e t XGM2_pause 00006900 t waitSubTick.part.0
000065a0 t SYS_doVBlankProcessEx.constprop.0.isra.0 00006abe t XGM_loadDriver
00006ade t waitSubTick.part.0 00006d6c t SND_DPCM2_loadDriver
00006c9c t XGM_loadDriver 00006f14 t SND_PCM_loadDriver
00006f4a t SND_DPCM2_loadDriver 000070bc t SND_PCM4_loadDriver
000070f2 t SND_PCM_loadDriver 0000726c t POOL_reset.constprop.0
0000729a t SND_PCM4_loadDriver 000072e2 t SPR_initEx.constprop.0
0000744a t POOL_reset.constprop.0 00007446 T memcpy
000074c0 T memcpy 00007456 T VDP_setAutoInc
000074d0 t DMA_transfer.isra.0 00007470 t DMA_doDmaFast
000076a8 t PAL_setPalette 000075f6 t DMA_doCPUCopyDirect
000076d0 t SPR_end 00007734 t DMA_transfer.isra.0
0000776e t SPR_initEx.constprop.0 000078c0 t PAL_setPalette
000078d2 t updateMapsAddress 000078e8 t VDP_loadTileSet
00007a80 t VDP_setReg.constprop.0 000079e2 t updateMapsAddress
00007a9a t JOY_setSupport 00007a6a t VDP_setReg.constprop.0
00007abe t JOY_reset 00007a84 t JOY_setSupport
0000818a t VDP_resetScreen 00007aa8 t JOY_reset
000086d6 t VDP_init 00008174 t VDP_resetScreen
000087d8 t internal_reset 000083c4 t VDP_init
0000891e t VDP_drawImageEx.constprop.0.isra.0 000084c6 t internal_reset
00008bb2 t main.isra.0 0000860c t VDP_drawImageEx.constprop.0.isra.0
00008cf6 T _start_entry 00008754 t main.isra.0
00008dbc T _reset_entry 00008bc8 T _start_entry
00008dc4 T XGM_doVBlankProcess 00008c8e T _reset_entry
00008e2c T MDDBG__SymbolDataPtr 00008c96 T XGM_doVBlankProcess
00008e30 t __ErrorHandler 00008cfc T MDDBG__SymbolDataPtr
00008e30 t MDDBG__ErrorHandler 00008d00 t __ErrorHandler
00008f58 t MDDBG__Error_IdleLoop 00008d00 t MDDBG__ErrorHandler
00008f72 t MDDBG__Error_InitConsole 00008e28 t MDDBG__Error_IdleLoop
00008f7e t MDDBG__Error_MaskStackBoundaries 00008e42 t MDDBG__Error_InitConsole
00008fe8 t MDDBG__Error_DrawOffsetLocation 00008e4e t MDDBG__Error_MaskStackBoundaries
00008fec t MDDBG__Error_DrawOffsetLocation2 00008eb8 t MDDBG__Error_DrawOffsetLocation
00008ff2 t MDDBG__Error_DrawOffsetLocation__inj 00008ebc t MDDBG__Error_DrawOffsetLocation2
00009080 t MDDBG__ErrorHandler_SetupVDP 00008ec2 t MDDBG__Error_DrawOffsetLocation__inj
000090b6 t MDDBG__ErrorHandler_VDPConfig 00008f50 t MDDBG__ErrorHandler_SetupVDP
000090cc t MDDBG__ErrorHandler_VDPConfig_Nametables 00008f86 t MDDBG__ErrorHandler_VDPConfig
00009108 t MDDBG__ErrorHandler_ConsoleConfig_Initial 00008f9c t MDDBG__ErrorHandler_VDPConfig_Nametables
0000910c t MDDBG__ErrorHandler_ConsoleConfig_Shared 00008fd8 t MDDBG__ErrorHandler_ConsoleConfig_Initial
0000913c t MDDBG__Str_OffsetLocation_24bit 00008fdc t MDDBG__ErrorHandler_ConsoleConfig_Shared
00009145 t MDDBG__Str_OffsetLocation_32bit 0000900c t MDDBG__Str_OffsetLocation_24bit
00009180 t MDDBG__Art1bpp_Font 00009015 t MDDBG__Str_OffsetLocation_32bit
0000947a t MDDBG__GetSymbolByOffset 00009050 t MDDBG__Art1bpp_Font
00009794 t MDDBG__FormatString 0000934a t MDDBG__GetSymbolByOffset
0000986e t MDDBG__Console_Init 00009664 t MDDBG__FormatString
000098ac t MDDBG__Console_Reset 0000973e t MDDBG__Console_Init
000098ae t MDDBG__Console_InitShared 0000977c t MDDBG__Console_Reset
000098f8 t MDDBG__Console_SetPosAsXY_Stack 0000977e t MDDBG__Console_InitShared
000098fe t MDDBG__Console_SetPosAsXY 000097c8 t MDDBG__Console_SetPosAsXY_Stack
00009932 t MDDBG__Console_GetPosAsXY 000097ce t MDDBG__Console_SetPosAsXY
00009958 t MDDBG__Console_StartNewLine 00009802 t MDDBG__Console_GetPosAsXY
00009986 t MDDBG__Console_SetBasePattern 00009828 t MDDBG__Console_StartNewLine
000099a2 t MDDBG__Console_SetWidth 00009856 t MDDBG__Console_SetBasePattern
000099c0 t MDDBG__Console_WriteLine_WithPattern 00009872 t MDDBG__Console_SetWidth
000099c2 t MDDBG__Console_WriteLine 00009890 t MDDBG__Console_WriteLine_WithPattern
000099c6 t MDDBG__Console_Write 00009892 t MDDBG__Console_WriteLine
00009a8c t MDDBG__Console_WriteLine_Formatted 00009896 t MDDBG__Console_Write
00009a90 t MDDBG__Console_Write_Formatted 0000995c t MDDBG__Console_WriteLine_Formatted
00009ac0 t MDDBG__Decomp1bpp 00009960 t MDDBG__Console_Write_Formatted
00009adc t MDDBG__KDebug_WriteLine_Formatted 00009990 t MDDBG__Decomp1bpp
00009ae0 t MDDBG__KDebug_Write_Formatted 000099ac t MDDBG__KDebug_WriteLine_Formatted
00009b34 t MDDBG__KDebug_FlushLine 000099b0 t MDDBG__KDebug_Write_Formatted
00009b3e t MDDBG__KDebug_WriteLine 00009a04 t MDDBG__KDebug_FlushLine
00009b42 t MDDBG__KDebug_Write 00009a0e t MDDBG__KDebug_WriteLine
00009b70 t MDDBG__ErrorHandler_ConsoleOnly 00009a12 t MDDBG__KDebug_Write
00009b96 t MDDBG__ErrorHandler_ClearConsole 00009a40 t MDDBG__ErrorHandler_ConsoleOnly
00009bc0 t MDDBG__ErrorHandler_PauseConsole 00009a66 t MDDBG__ErrorHandler_ClearConsole
00009bfa t MDDBG__ErrorHandler_PagesController 00009a90 t MDDBG__ErrorHandler_PauseConsole
00009c5a t MDDBG__VSync 00009aca t MDDBG__ErrorHandler_PagesController
00009c94 t MDDBG__ErrorHandler_ExtraDebuggerList 00009b2a t MDDBG__VSync
00009ca0 t MDDBG__Debugger_AddressRegisters 00009b64 t MDDBG__ErrorHandler_ExtraDebuggerList
00009cec t MDDBG__Debugger_Backtrace 00009b70 t MDDBG__Debugger_AddressRegisters
00009d8a T _Bus_Error 00009bbc t MDDBG__Debugger_Backtrace
00009d8a t MDDBG__BusError 00009c5a T _Bus_Error
00009d9e T _Address_Error 00009c5a t MDDBG__BusError
00009d9e t MDDBG__AddressError 00009c6e T _Address_Error
00009db6 T _Illegal_Instruction 00009c6e t MDDBG__AddressError
00009db6 t MDDBG__IllegalInstr 00009c86 T _Illegal_Instruction
00009dd4 T _Zero_Divide 00009c86 t MDDBG__IllegalInstr
00009dd4 t MDDBG__ZeroDivide 00009ca4 T _Zero_Divide
00009dea T _Chk_Instruction 00009ca4 t MDDBG__ZeroDivide
00009dea t MDDBG__ChkInstr 00009cba T _Chk_Instruction
00009e04 T _Trapv_Instruction 00009cba t MDDBG__ChkInstr
00009e04 t MDDBG__TrapvInstr 00009cd4 T _Trapv_Instruction
00009e20 T _Privilege_Violation 00009cd4 t MDDBG__TrapvInstr
00009e20 t MDDBG__PrivilegeViol 00009cf0 T _Privilege_Violation
00009e3e T _Trace 00009cf0 t MDDBG__PrivilegeViol
00009e3e t MDDBG__Trace 00009d0e T _Trace
00009e4e T _Line_1010_Emulation 00009d0e t MDDBG__Trace
00009e4e t MDDBG__Line1010Emu 00009d1e T _Line_1010_Emulation
00009e6a T _Line_1111_Emulation 00009d1e t MDDBG__Line1010Emu
00009e6a t MDDBG__Line1111Emu 00009d3a T _Line_1111_Emulation
00009e86 T _Error_Exception 00009d3a t MDDBG__Line1111Emu
00009e86 t MDDBG__ErrorExcept 00009d56 T _Error_Exception
00009f00 T smp_null 00009d56 t MDDBG__ErrorExcept
0000a000 T smp_null_dpcm 00009e00 T smp_null
0000a080 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 00009f00 T smp_null_dpcm
0000a080 T __mulsi3_internal /home/runner/work/m68k-elf-gcc/m68k-elf-gcc/.build/HOST-i686-w64-mingw32/m68k-elf/src/gcc/libgcc/config/m68k/lb1sf68.S:442 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
0000a0a4 T __CTOR_LIST__ 00009f80 T __mulsi3_internal /home/runner/work/m68k-elf-gcc/m68k-elf-gcc/.build/HOST-i686-w64-mingw32/m68k-elf/src/gcc/libgcc/config/m68k/lb1sf68.S:442
0000a0ac T __CTOR_END__ 00009fa4 T __modsi3 /home/runner/work/m68k-elf-gcc/m68k-elf-gcc/.build/HOST-i686-w64-mingw32/m68k-elf/src/gcc/libgcc/config/m68k/lb1sf68.S:611
0000a0ac T __DTOR_LIST__ 00009fd4 T __udivsi3 /home/runner/work/m68k-elf-gcc/m68k-elf-gcc/.build/HOST-i686-w64-mingw32/m68k-elf/src/gcc/libgcc/config/m68k/lb1sf68.S:469
0000a0b4 T __DTOR_END__ 00009fd4 T __udivsi3_internal /home/runner/work/m68k-elf-gcc/m68k-elf-gcc/.build/HOST-i686-w64-mingw32/m68k-elf/src/gcc/libgcc/config/m68k/lb1sf68.S:469
0000a0b4 t bg1_tileset 00009ffc t L3 /home/runner/work/m68k-elf-gcc/m68k-elf-gcc/.build/HOST-i686-w64-mingw32/m68k-elf/src/gcc/libgcc/config/m68k/lb1sf68.S:486
0000a0bc t bg1_tilemap 00009ffe t L4 /home/runner/work/m68k-elf-gcc/m68k-elf-gcc/.build/HOST-i686-w64-mingw32/m68k-elf/src/gcc/libgcc/config/m68k/lb1sf68.S:487
0000a0c6 t bg1_palette 0000a02a t L5 /home/runner/work/m68k-elf-gcc/m68k-elf-gcc/.build/HOST-i686-w64-mingw32/m68k-elf/src/gcc/libgcc/config/m68k/lb1sf68.S:508
0000a0cc T bg1 0000a02c t L6 /home/runner/work/m68k-elf-gcc/m68k-elf-gcc/.build/HOST-i686-w64-mingw32/m68k-elf/src/gcc/libgcc/config/m68k/lb1sf68.S:510
0000a0d8 t bigTex1_palette 0000a030 T __divsi3 /home/runner/work/m68k-elf-gcc/m68k-elf-gcc/.build/HOST-i686-w64-mingw32/m68k-elf/src/gcc/libgcc/config/m68k/lb1sf68.S:547
0000a0de t bigTex1_animation0_frame0_tileset 0000a030 T __divsi3_internal /home/runner/work/m68k-elf-gcc/m68k-elf-gcc/.build/HOST-i686-w64-mingw32/m68k-elf/src/gcc/libgcc/config/m68k/lb1sf68.S:547
0000a0e6 t bigTex1_animation0_frame0 0000a03e t L1 /home/runner/work/m68k-elf-gcc/m68k-elf-gcc/.build/HOST-i686-w64-mingw32/m68k-elf/src/gcc/libgcc/config/m68k/lb1sf68.S:558
0000a102 t bigTex1_animation0_frames 0000a048 t L2 /home/runner/work/m68k-elf-gcc/m68k-elf-gcc/.build/HOST-i686-w64-mingw32/m68k-elf/src/gcc/libgcc/config/m68k/lb1sf68.S:567
0000a106 t bigTex1_animation0 0000a05a t L3 /home/runner/work/m68k-elf-gcc/m68k-elf-gcc/.build/HOST-i686-w64-mingw32/m68k-elf/src/gcc/libgcc/config/m68k/lb1sf68.S:576
0000a10c t bigTex1_animations 0000a060 T __CTOR_LIST__
0000a110 T bigTex1 0000a068 T __CTOR_END__
0000a21e t tab_vol 0000a068 T __DTOR_LIST__
0000b21e t psgVolTable 0000a070 T __DTOR_END__
0000b282 t fmVolTable 0000a070 t bgtest_tileset
0000b2e6 t palette_blue 0000a078 t bgtest_tilemap
0000b306 t palette_green 0000a082 t bgtest_palette
0000b326 t palette_red 0000a088 T bgtest
0000b346 t palette_grey 0000a094 t bigTex1_palette
0000b366 t visibilityMask.0 0000a09a t bigTex1_animation0_frame0_tileset
0000b388 t xlt.1 0000a0a2 t bigTex1_animation0_frame0
0000b390 t xlt_all.0 0000a0be t bigTex1_animation0_frames
0000b3a0 t sgdk_logo_palette 0000a0c2 t bigTex1_animation0
0000b3a6 T sgdk_logo 0000a0c8 t bigTex1_animations
0000b3b4 T font_default 0000a0cc T bigTex1
0000b3bc T font_pal_default 0000a0de t bg1_tileset
0000b3c2 T drv_null 0000a0e6 t bg1_tilemap
0000b3fc T drv_xgm 0000a0f0 t bg1_palette
0000cafc T drv_dpcm2 0000a0f6 T bg1
0000d8fc T drv_pcm 0000a102 t fg1_tileset
0000e42c T drv_pcm4 0000a10a t fg1_tilemap
0000ee9a T drv_xgm2 0000a114 T fg1
00010e9c T __INIT_SECTION__ 0000a120 t titleSignSprite_palette
00010e9e T __FINI_SECTION__ 0000a126 t titleSignSprite_animation0_frame0_tileset
00010ea0 T _etext 0000a12e t titleSignSprite_animation0_frame0
00010ea0 t bg1_palette_data 0000a13e t titleSignSprite_animation0_frame1_tileset
00010f20 t bigTex1_palette_data 0000a146 t titleSignSprite_animation0_frame1
00010f40 t sgdk_logo_palette_data 0000a156 t titleSignSprite_animation0_frame2_tileset
00010f60 t font_pal_default_data 0000a15e t titleSignSprite_animation0_frame2
00010f80 T stop_xgm 0000a16e t titleSignSprite_animation0_frame3_tileset
0001102c t font_default_data 0000a176 t titleSignSprite_animation0_frame3
0001128e t sgdk_logo_data 0000a186 t titleSignSprite_animation0_frame4_tileset
000116c8 t bg1_tilemap_data 0000a18e t titleSignSprite_animation0_frame4
00011938 t bg1_tileset_data 0000a19e t titleSignSprite_animation0_frame5_tileset
000122ee t bigTex1_animation0_frame0_tileset_data 0000a1a6 t titleSignSprite_animation0_frame5
00012570 A _stext 0000a1b6 t titleSignSprite_animation0_frames
e0ff0000 D task_sr 0000a1ce t titleSignSprite_animation0
e0ff0002 D task_pc 0000a1d4 t titleSignSprite_animation1_frame0_tileset
e0ff0006 D task_regs 0000a1dc t titleSignSprite_animation1_frame0
e0ff0042 D task_lock 0000a1ec t titleSignSprite_animation1_frame1_tileset
e0ff0044 D _edata 0000a1f4 t titleSignSprite_animation1_frame1
e0ff0044 B _start 0000a204 t titleSignSprite_animation1_frame2_tileset
e0ff0044 B bmp_buffer_write 0000a20c t titleSignSprite_animation1_frame2
e0ff0048 B VBlankProcess 0000a21c t titleSignSprite_animation1_frame3_tileset
e0ff004a B hintCaller 0000a224 t titleSignSprite_animation1_frame3
e0ff0050 B vintCB 0000a234 t titleSignSprite_animation1_frame4_tileset
e0ff0054 B intCB 0000a23c t titleSignSprite_animation1_frame4
e0ff0058 B vtimer 0000a24c t titleSignSprite_animation1_frame5_tileset
e0ff005c B eintCB 0000a254 t titleSignSprite_animation1_frame5
e0ff0060 B intLevelSave 0000a264 t titleSignSprite_animation1_frames
e0ff0062 B intTrace 0000a27c t titleSignSprite_animation1
e0ff0064 B dmaQueues 0000a282 t titleSignSprite_animation2_frame0_tileset
e0ff0068 b state 0000a28a t titleSignSprite_animation2_frame0
e0ff006a b vscroll_update 0000a29a t titleSignSprite_animation2_frame1_tileset
e0ff006b b hscroll_update 0000a2a2 t titleSignSprite_animation2_frame1
e0ff006c b fadePSGVol 0000a2b2 t titleSignSprite_animation2_frame2_tileset
e0ff006e b fadeFMVol 0000a2ba t titleSignSprite_animation2_frame2
e0ff0070 b fadeCount 0000a2ca t titleSignSprite_animation2_frame3_tileset
e0ff0072 b usedVDPSprite 0000a2d2 t titleSignSprite_animation2_frame3
e0ff0074 b xgm2WaitTab 0000a2e2 t titleSignSprite_animation2_frame4_tileset
e0ff007c b xgm2IdleTab 0000a2ea t titleSignSprite_animation2_frame4
e0ff0084 b xgmTempoCnt 0000a2fa t titleSignSprite_animation2_frame5_tileset
e0ff0088 b xgmWaitTab 0000a302 t titleSignSprite_animation2_frame5
e0ff00c8 b xgmIdleTab 0000a312 t titleSignSprite_animation2_frames
e0ff0108 b xgmTempoDef 0000a32a t titleSignSprite_animation2
e0ff010a b xgmTempo 0000a330 t titleSignSprite_animations
e0ff010c b busProtectSignalAddress 0000a33c T titleSignSprite
e0ff010e b driverFlags 0000a3d4 t tab_vol
e0ff0110 b currentDriver 0000b3d4 t psgVolTable
e0ff0112 b allocStack 0000b438 t fmVolTable
e0ff0252 b lastVTimer.0 0000b49c t palette_blue
e0ff0254 b text_plan 0000b4bc t palette_green
e0ff0258 b text_basetile 0000b4dc t palette_red
e0ff025a b lastVCnt 0000b4fc t palette_grey
e0ff025c b windowWidthSft 0000b51c t visibilityMask.0
e0ff025e b planeWidthSft 0000b53e t xlt.1
e0ff0260 b windowWidth 0000b546 t xlt_all.0
e0ff0262 b planeHeight 0000b556 t sgdk_logo_palette
e0ff0264 b planeWidth 0000b55c T sgdk_logo
e0ff0266 b hscrl_addr 0000b56a T font_default
e0ff0268 b bgb_addr 0000b572 T font_pal_default
e0ff026a b bga_addr 0000b578 T drv_null
e0ff026c b window_addr 0000b5b2 T drv_xgm
e0ff026e b lastTick 0000ccb2 T drv_dpcm2
e0ff0272 b cpuFrameLoad 0000dab2 T drv_pcm
e0ff0274 b frameLoadIndex 0000e5e2 T drv_pcm4
e0ff0276 b frameLoads 0000f050 T drv_xgm2
e0ff0286 b vblankCB 00011050 T __INIT_SECTION__
e0ff028a b flags 00011052 T __FINI_SECTION__
e0ff028c b screenHeight 00011054 T _etext
e0ff028e b screenWidth 00011054 t bgtest_palette_data
e0ff0290 b maps_addr 000110d4 t bigTex1_palette_data
e0ff0292 b slist_addr 000110f4 t bg1_palette_data
e0ff0294 b vdpSpriteCache 00011174 t titleSignSprite_palette_data
e0ff0594 b spriteVramSize 00011194 t sgdk_logo_palette_data
e0ff0598 b vram 000111b4 t font_pal_default_data
e0ff05a4 b lastSprite 000111d4 T stop_xgm
e0ff05a8 b firstSprite 00011280 t font_default_data
e0ff05ac b spritesPool 000114e2 t sgdk_logo_data
e0ff05b0 b fadeCounter 0001191c t bgtest_tilemap_data
e0ff05b2 b heap 00011b8c t bg1_tilemap_data
e0ff05b6 b free.lto_priv.0 00011cd0 t fg1_tilemap_data
e0ff05ba b randomSeedSet 00011e1c t bgtest_tileset_data
e0ff05bc b joyEventCB 000127d2 t bigTex1_animation0_frame0_tileset_data
e0ff05c0 b retry 00012a54 t bg1_tileset_data
e0ff05c1 b phase.lto_priv.1 00012e78 t fg1_tileset_data
e0ff05c2 b gun 00013320 t titleSignSprite_animation0_frame0_tileset_data
e0ff05c3 b extSet 00013386 t titleSignSprite_animation0_frame1_tileset_data
e0ff05c4 b disableIntStack 0001346e t titleSignSprite_animation0_frame2_tileset_data
e0ff05c6 b joyAxisY 00013568 t titleSignSprite_animation0_frame3_tileset_data
e0ff05d6 b joyAxisX 0001365c t titleSignSprite_animation0_frame4_tileset_data
e0ff05e6 b joyState 00013778 t titleSignSprite_animation0_frame5_tileset_data
e0ff05f6 b portSupport 000137dc t titleSignSprite_animation1_frame0_tileset_data
e0ff05f8 b portType 000138b2 t titleSignSprite_animation1_frame1_tileset_data
e0ff05fa b gport 0001395a t titleSignSprite_animation1_frame2_tileset_data
e0ff05fc b regValues 00013a2c t titleSignSprite_animation1_frame3_tileset_data
e0ff0610 b flag 00013ae6 t titleSignSprite_animation1_frame4_tileset_data
e0ff0612 b maxTransferPerFrame 00013baa t titleSignSprite_animation1_frame5_tileset_data
e0ff0614 b queueSize 00013c5c t titleSignSprite_animation2_frame0_tileset_data
e0ff0616 b nextDataBuffer 00013cf2 t titleSignSprite_animation2_frame1_tileset_data
e0ff061a b queueTransferSize 00013d76 t titleSignSprite_animation2_frame2_tileset_data
e0ff061c b queueIndexLimit 00013df0 t titleSignSprite_animation2_frame3_tileset_data
e0ff061e b queueIndex 00013e54 t titleSignSprite_animation2_frame4_tileset_data
e0ff0620 b dmaDataBuffer 00013ebc t titleSignSprite_animation2_frame5_tileset_data
e0ff0624 b dataBufferSize 00013f58 A _stext
e0ff0626 b phase.lto_priv.0 e0ff0000 d ind
e0ff0628 b joyType e0ff0004 D task_sr
e0ff0630 b buttonString e0ff0006 D task_pc
e0ff0634 b debugString e0ff000a D task_regs
e0ff0684 B _bend e0ff0046 D task_lock
e0ff0048 D _edata
e0ff0048 B _start
e0ff0048 B bmp_buffer_write
e0ff004c B VBlankProcess
e0ff004e B hintCaller
e0ff0054 B vintCB
e0ff0058 B intCB
e0ff005c B vtimer
e0ff0060 B eintCB
e0ff0064 B intLevelSave
e0ff0066 B intTrace
e0ff0068 B dmaQueues
e0ff006c b state
e0ff006e b start_pressed
e0ff006f b start_press_ready
e0ff0070 b tile_scroll_array
e0ff00a8 b scrollFrameDelayHalved
e0ff00ac b scrollFrameDelay
e0ff00b0 b title_sign_sprite_arr
e0ff00f8 b sign_y
e0ff00fc b sign_x
e0ff0100 b player_y
e0ff0104 b player_x
e0ff0108 b vscroll_update
e0ff0109 b hscroll_update
e0ff010a b fadePSGVol
e0ff010c b fadeFMVol
e0ff010e b fadeCount
e0ff0110 b usedVDPSprite
e0ff0112 b xgm2WaitTab
e0ff011a b xgm2IdleTab
e0ff0122 b xgmTempoCnt
e0ff0124 b xgmWaitTab
e0ff0164 b xgmIdleTab
e0ff01a4 b xgmTempoDef
e0ff01a6 b xgmTempo
e0ff01a8 b busProtectSignalAddress
e0ff01aa b driverFlags
e0ff01ac b currentDriver
e0ff01ae b allocStack
e0ff02ee b lastVTimer.0
e0ff02f0 b text_plan
e0ff02f4 b text_basetile
e0ff02f6 b lastVCnt
e0ff02f8 b windowWidthSft
e0ff02fa b planeWidthSft
e0ff02fc b windowWidth
e0ff02fe b planeHeight
e0ff0300 b planeWidth
e0ff0302 b hscrl_addr
e0ff0304 b bgb_addr
e0ff0306 b bga_addr
e0ff0308 b window_addr
e0ff030a b lastTick
e0ff030e b cpuFrameLoad
e0ff0310 b frameLoadIndex
e0ff0312 b frameLoads
e0ff0322 b vblankCB
e0ff0326 b flags
e0ff0328 b screenHeight
e0ff032a b screenWidth
e0ff032c b maps_addr
e0ff032e b slist_addr
e0ff0330 b vdpSpriteCache
e0ff0630 b spriteVramSize
e0ff0634 b vram
e0ff0640 b lastSprite
e0ff0644 b firstSprite
e0ff0648 b spritesPool
e0ff064c b fadeCounter
e0ff064e b heap
e0ff0652 b free.lto_priv.0
e0ff0656 b randomSeedSet
e0ff0658 b joyEventCB
e0ff065c b retry
e0ff065d b phase.lto_priv.1
e0ff0660 b regValues
e0ff0673 b gun
e0ff0674 b extSet
e0ff0676 b disableIntStack
e0ff0678 b joyAxisY
e0ff0688 b joyAxisX
e0ff0698 b joyState
e0ff06a8 b joyType
e0ff06b0 b portSupport
e0ff06b2 b portType
e0ff06b4 b gport
e0ff06b6 b flag
e0ff06b8 b maxTransferPerFrame
e0ff06ba b queueSize
e0ff06bc b nextDataBuffer
e0ff06c0 b queueTransferSize
e0ff06c2 b queueIndexLimit
e0ff06c4 b queueIndex
e0ff06c6 b dmaDataBuffer
e0ff06ca b dataBufferSize
e0ff06cc b phase.lto_priv.0
e0ff06ce B _bend
e1000000 A __stack e1000000 A __stack

BIN
res/btwade_bg1_1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
res/btwade_bg2_1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -3,7 +3,10 @@
#ifndef _RES_RESOURCES_H_ #ifndef _RES_RESOURCES_H_
#define _RES_RESOURCES_H_ #define _RES_RESOURCES_H_
extern const Image bg1; extern const Image bgtest;
extern const SpriteDefinition bigTex1; extern const SpriteDefinition bigTex1;
extern const Image bg1;
extern const Image fg1;
extern const SpriteDefinition titleSignSprite;
#endif // _RES_RESOURCES_H_ #endif // _RES_RESOURCES_H_

View File

@@ -1,2 +1,5 @@
IMAGE bg1 "background1.png" BEST ALL IMAGE bgtest "background1.png" BEST ALL
SPRITE bigTex1 "Sprites\BTW-1.png" 8 8 FAST SPRITE bigTex1 "Sprites\BTW-1.png" 8 8 FAST
IMAGE bg1 "btwade_bg1_1.png" BEST ALL
IMAGE fg1 "btwade_bg2_1.png" BEST ALL
SPRITE titleSignSprite "BTW-TitleSign-merged.png" 4 4 FAST

View File

@@ -1,101 +1,39 @@
#include <genesis.h> #include <genesis.h>
#include <resources.h> #include <resources.h>
#include "title_screen.h"
char debugString[80];
char* buttonString;
char* clearString = " ";
Sprite* player;
void myJoyHandler( u16 joy, u16 changed, u16 state)
{
strcpy(debugString, "");
if (joy == JOY_1)
{
if (JOY_getJoypadType(JOY_1) == JOY_TYPE_PAD6 )
{
buttonString = "6 Button Connected";
}
else if (JOY_getJoypadType(JOY_1) == JOY_TYPE_PAD3)
{
buttonString = "3 Button Connected";
}
else
{
buttonString = "Controller Not Found";
}
if (state & BUTTON_START)
{
strcat(debugString, " Start ");
}
if (state & BUTTON_A)
{
strcat(debugString, " A ");
}
if (state & BUTTON_B)
{
strcat(debugString, " B ");
}
if (state & BUTTON_C)
{
strcat(debugString, " C ");
}
if(state & BUTTON_X){
strcat(debugString, " X ");
}
if(state & BUTTON_Y){
strcat(debugString, " Y ");
}
if(state & BUTTON_Z){
strcat(debugString, " Z ");
}
if ((strlen(debugString) == 0)){
strcpy(debugString, "None");
}
}
}
int main(bool hard) int main(bool hard)
{ {
JOY_init(); JOY_init();
JOY_setEventHandler( &myJoyHandler ); //JOY_setEventHandler( &myJoyHandler);
u16 ind = TILE_USER_INDEX;
SPR_init();
init_title_screen();
PAL_setPalette(PAL0, bg1.palette->data, DMA);
PAL_setPalette(PAL2, bigTex1.palette->data, DMA);
player = SPR_addSprite(&bigTex1, 0,0, TILE_ATTR(PAL2,false,false,false));
VDP_drawImageEx(BG_B, &bg1,TILE_ATTR_FULL(PAL0, false, false, false, ind), 0, 0, false, true);
while(TRUE) while(TRUE)
{ {
VDP_drawImageEx(BG_B, &bg1,TILE_ATTR_FULL(PAL0, false, false, false, ind), 0, 0, false, true);
//VDP_drawImageEx(BG_B, &bg1,TILE_ATTR_FULL(PAL0, false, false, false, ind), 0, 0, false, true);
SPR_update();
update_title_screen();
draw_title_screen();
// read input // read input
// move sprite // move sprite
// update score // update score
// draw current screen (logo, start screen, settings, game, gameover, credits...) // draw current screen (logo, start screen, settings, game, gameover, credits...)
VDP_drawText(clearString, 2, 5);
VDP_drawText(buttonString, 2, 5);
VDP_drawText(clearString, 14, 13);
VDP_drawText(debugString, 14, 13);
// wait for screen refresh and do all SGDK VBlank tasks // wait for screen refresh and do all SGDK VBlank tasks
SYS_doVBlankProcess(); SYS_doVBlankProcess();

194
src/title_screen.c Normal file
View File

@@ -0,0 +1,194 @@
#include <genesis.h>
#include <resources.h>
#include "title_screen.h"
u16 ind = TILE_USER_INDEX;
//Sprite* player_sprite;
Sprite* title_sign_sprite_arr [18] = {NULL};
// Sprite* title_sign_sprite_1;
// Sprite* title_sign_sprite_2;
// Sprite* title_sign_sprite_3;
// Sprite* title_sign_sprite_4;
// Sprite* title_sign_sprite_5;
int player_x;
int player_y;
int sign_x;
int sign_y;
int scrollFrameDelay = 0;
int scrollFrameDelayHalved = 0;
bool player_hflip;
bool start_pressed = false;
bool start_press_ready = false;
s16 tile_scroll_array [28] = {
0,0,0,0,0,
0,0,0,0,0,
0,0,0,0,0,
0,0,0,0,0,
0,0,0,0,0,
0,0,0
};
extern void init_title_screen () {
player_x = 50;
player_y = 50;
sign_x = 60;
sign_y = -120;
SPR_init();
PAL_setPalette(PAL0, bg1.palette->data, DMA);
PAL_setPalette(PAL1,fg1.palette->data,DMA);
PAL_setPalette(PAL2, titleSignSprite.palette->data, DMA);
//--------- initializing sprites, probably a better way to do this (Loops) but who cares for now tbh-----------------
for(int i = 0; i < 18; i++){
title_sign_sprite_arr[i] = SPR_addSprite(&titleSignSprite, 0,0, TILE_ATTR(PAL2,false,false,false));
if (i < 6)
{
title_sign_sprite_arr[i]-> frameInd += i;
}
else if (i < 12)
{
SPR_setAnim(title_sign_sprite_arr[i],1);
title_sign_sprite_arr[i]-> frameInd += (i-6);
}
else {
SPR_setAnim(title_sign_sprite_arr[i],2);
title_sign_sprite_arr[i]-> frameInd += (i-12);
}
}
// title_sign_sprite_0 = SPR_addSprite(&titleSignSprite, 0,0, TILE_ATTR(PAL2,false,false,false));
// title_sign_sprite_1 = SPR_addSprite(&titleSignSprite, 0,0, TILE_ATTR(PAL2,false,false,false));
// title_sign_sprite_2 = SPR_addSprite(&titleSignSprite, 0,0, TILE_ATTR(PAL2,false,false,false));
// title_sign_sprite_3 = SPR_addSprite(&titleSignSprite, 0,0, TILE_ATTR(PAL2,false,false,false));
// title_sign_sprite_4 = SPR_addSprite(&titleSignSprite, 0,0, TILE_ATTR(PAL2,false,false,false));
// title_sign_sprite_5 = SPR_addSprite(&titleSignSprite, 0,0, TILE_ATTR(PAL2,false,false,false));
// title_sign_sprite_1->frameInd ++;
// title_sign_sprite_2->frameInd +=2;
// title_sign_sprite_3->frameInd +=3;
// title_sign_sprite_4->frameInd +=4;
// title_sign_sprite_5->frameInd +=5;
// --------------------------------------------------------------------------------------------------------------------
VDP_drawImageEx(BG_B, &bg1,TILE_ATTR_FULL(PAL0, false, false, false, ind), 0, -4, false, true);
ind += bg1.tileset->numTile;
VDP_drawImageEx(BG_A, &fg1,TILE_ATTR_FULL(PAL1, false, false, false, ind), 0, -4, false, true);
ind += fg1.tileset->numTile;
VDP_setScrollingMode(HSCROLL_TILE,VSCROLL_PLANE);
}
static void handleInputs(){
u16 value = JOY_readJoypad(JOY_1);
if (value & BUTTON_RIGHT){
player_x += 1;
player_hflip = true;
}
if (value & BUTTON_LEFT){
player_x -= 1;
player_hflip = false;
}
if (value & BUTTON_UP){
player_y -= 1;
}
if (value & BUTTON_DOWN){
player_y += 1;
}
if (value & BUTTON_START)
{
start_pressed = true;
}
}
extern void update_title_screen(){
// -----------------Parallax BG ----------------------------
if (scrollFrameDelay > 1){
scrollFrameDelay = 0;
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[21] -=1;
tile_scroll_array[22] -=1; //1.5
tile_scroll_array[23] -=2;
tile_scroll_array[24] -=2;
tile_scroll_array[25] -=2; // 2.5
tile_scroll_array[26] -=3;
tile_scroll_array[27] -=3;
VDP_setHorizontalScrollTile(BG_A, 0, tile_scroll_array, 28, DMA_QUEUE);
scrollFrameDelay ++;
// -------------------Sign Dropdown-----------------------------------------------
if (sign_y < 20) sign_y +=2;
else start_press_ready = true;
if (start_press_ready && start_pressed && sign_x > -190) sign_x -=3;
handleInputs();
}
extern void draw_title_screen(){
for(int i =0; i < 18; i++){
int draw_sign_x = sign_x + (i % 6) *32;
int draw_sign_y = sign_y;
if (i >5)
{
draw_sign_y += 32;
}
if (i >11)
{
draw_sign_y += 32;
}
SPR_setPosition(title_sign_sprite_arr[i], draw_sign_x , draw_sign_y);
}
// SPR_setPosition(title_sign_sprite_1, sign_x+32,sign_y);
// SPR_setPosition(title_sign_sprite_2, sign_x+64,sign_y);
// SPR_setPosition(title_sign_sprite_3, sign_x+96,sign_y);
// SPR_setPosition(title_sign_sprite_4, sign_x+128,sign_y);
// SPR_setPosition(title_sign_sprite_5, sign_x+160,sign_y);
// SPR_setPosition(player_sprite, player_x,player_y);
// SPR_setHFlip(player_sprite, player_hflip);
SPR_update();
}