The game is now 'playable'

This commit is contained in:
2024-06-15 11:36:36 +02:00
parent 4bad589f9b
commit b0d194f333
8 changed files with 191 additions and 146 deletions
Binary file not shown.
+123 -110
View File
@@ -675,7 +675,7 @@ END GROUP
0x20084000 __top_RamAHB32 = 0x20084000 0x20084000 __top_RamAHB32 = 0x20084000
0x20084000 __top_RAM2 = 0x20084000 0x20084000 __top_RAM2 = 0x20084000
.text 0x00000000 0x524f0 .text 0x00000000 0x52620
FILL mask 0xff FILL mask 0xff
0x00000000 __vectors_start__ = ABSOLUTE (.) 0x00000000 __vectors_start__ = ABSOLUTE (.)
*(.isr_vector) *(.isr_vector)
@@ -684,16 +684,16 @@ END GROUP
0x000000cc . = ALIGN (0x4) 0x000000cc . = ALIGN (0x4)
0x000000cc __section_table_start = . 0x000000cc __section_table_start = .
0x000000cc __data_section_table = . 0x000000cc __data_section_table = .
0x000000cc 0x4 LONG 0x524f0 LOADADDR (.data) 0x000000cc 0x4 LONG 0x52620 LOADADDR (.data)
0x000000d0 0x4 LONG 0x10000000 ADDR (.data) 0x000000d0 0x4 LONG 0x10000000 ADDR (.data)
0x000000d4 0x4 LONG 0x110 SIZEOF (.data) 0x000000d4 0x4 LONG 0x110 SIZEOF (.data)
0x000000d8 0x4 LONG 0x524f0 LOADADDR (.data_RAM2) 0x000000d8 0x4 LONG 0x52620 LOADADDR (.data_RAM2)
0x000000dc 0x4 LONG 0x2007c000 ADDR (.data_RAM2) 0x000000dc 0x4 LONG 0x2007c000 ADDR (.data_RAM2)
0x000000e0 0x4 LONG 0x0 SIZEOF (.data_RAM2) 0x000000e0 0x4 LONG 0x0 SIZEOF (.data_RAM2)
0x000000e4 __data_section_table_end = . 0x000000e4 __data_section_table_end = .
0x000000e4 __bss_section_table = . 0x000000e4 __bss_section_table = .
0x000000e4 0x4 LONG 0x10000110 ADDR (.bss) 0x000000e4 0x4 LONG 0x10000110 ADDR (.bss)
0x000000e8 0x4 LONG 0x90 SIZEOF (.bss) 0x000000e8 0x4 LONG 0x94 SIZEOF (.bss)
0x000000ec 0x4 LONG 0x2007c000 ADDR (.bss_RAM2) 0x000000ec 0x4 LONG 0x2007c000 ADDR (.bss_RAM2)
0x000000f0 0x4 LONG 0x0 SIZEOF (.bss_RAM2) 0x000000f0 0x4 LONG 0x0 SIZEOF (.bss_RAM2)
0x000000f4 __bss_section_table_end = . 0x000000f4 __bss_section_table_end = .
@@ -860,85 +860,92 @@ END GROUP
0x000011ec 0x30 ./src/main.o 0x000011ec 0x30 ./src/main.o
0x000011ec EINT3_IRQHandler 0x000011ec EINT3_IRQHandler
.text.increment_scroll .text.increment_scroll
0x0000121c 0x44 ./src/main.o 0x0000121c 0x50 ./src/main.o
0x0000121c increment_scroll 0x0000121c increment_scroll
.text.SysTick_Handler .text.SysTick_Handler
0x00001260 0x48 ./src/main.o 0x0000126c 0x48 ./src/main.o
0x00001260 SysTick_Handler 0x0000126c SysTick_Handler
.text.number_of_digits .text.number_of_digits
0x000012a8 0x40 ./src/main.o 0x000012b4 0x40 ./src/main.o
0x000012a8 number_of_digits 0x000012b4 number_of_digits
.text.convert_to_string .text.convert_to_string
0x000012e8 0x7c ./src/main.o 0x000012f4 0x7c ./src/main.o
0x000012e8 convert_to_string 0x000012f4 convert_to_string
.text.min 0x00001370 0x22 ./src/main.o
0x00001370 min
.text.max 0x00001392 0x22 ./src/main.o
0x00001392 max
.text.CreatePlayer .text.CreatePlayer
0x00001364 0x9c ./src/main.o 0x000013b4 0xac ./src/main.o
0x00001364 CreatePlayer 0x000013b4 CreatePlayer
.text.CreateWalls .text.CreateWalls
0x00001400 0xc0 ./src/main.o 0x00001460 0xd0 ./src/main.o
0x00001400 CreateWalls 0x00001460 CreateWalls
.text.min 0x000014c0 0x22 ./src/main.o .text.checkCollision
0x000014c0 min 0x00001530 0x50 ./src/main.o
*fill* 0x000014e2 0x2 ff 0x00001530 checkCollision
.text.RefreshPlayer .text.RefreshPlayer
0x000014e4 0x154 ./src/main.o 0x00001580 0x198 ./src/main.o
0x000014e4 RefreshPlayer 0x00001580 RefreshPlayer
.text.main 0x00001638 0x264 ./src/main.o .text.InitGame
0x00001638 main 0x00001718 0x64 ./src/main.o
0x00001718 InitGame
.text.main 0x0000177c 0x258 ./src/main.o
0x0000177c main
.text.__weak_main .text.__weak_main
0x0000189c 0x4 /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(__weak__main.o) 0x000019d4 0x4 /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(__weak__main.o)
0x0000189c __main 0x000019d4 __main
0x0000189c __weak_main 0x000019d4 __weak_main
.text.rand 0x000018a0 0x48 /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(stdlib.o) .text.rand 0x000019d8 0x48 /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(stdlib.o)
0x000018a0 rand 0x000019d8 rand
.text.srand 0x000018e8 0x40 /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(stdlib.o) .text.srand 0x00001a20 0x40 /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(stdlib.o)
0x000018e8 srand 0x00001a20 srand
.text.abs 0x00001928 0x8 /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(stdlib.o) .text.abs 0x00001a60 0x8 /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(stdlib.o)
0x00001928 abs 0x00001a60 abs
*(.rodata .rodata.* .constdata .constdata.*) *(.rodata .rodata.* .constdata .constdata.*)
.rodata.SMPTE 0x00001930 0x38410 ./src/SPI.o .rodata.SMPTE 0x00001a68 0x38410 ./src/SPI.o
.rodata.ShipSprite1 .rodata.ShipSprite1
0x00039d40 0xc10 ./src/SPI.o 0x00039e78 0xc10 ./src/SPI.o
.rodata.SmallFont .rodata.SmallFont
0x0003a950 0x478 ./src/fonts.o 0x0003aa88 0x478 ./src/fonts.o
0x0003a950 SmallFont 0x0003aa88 SmallFont
.rodata.AllMyFellas_wav .rodata.AllMyFellas_wav
0x0003adc8 0x17700 ./src/main.o 0x0003af00 0x17700 ./src/main.o
0x0003adc8 AllMyFellas_wav 0x0003af00 AllMyFellas_wav
.rodata.SCREEN .rodata.SCREEN
0x000524c8 0x10 ./src/main.o 0x00052600 0x10 ./src/main.o
0x000524c8 SCREEN 0x00052600 SCREEN
.rodata 0x000524d8 0x18 ./src/main.o .rodata 0x00052610 0x10 ./src/main.o
0x000524f0 . = ALIGN (0x4) 0x00052620 . = ALIGN (0x4)
.glue_7 0x000524f0 0x0 .glue_7 0x00052620 0x0
.glue_7 0x000524f0 0x0 linker stubs .glue_7 0x00052620 0x0 linker stubs
.glue_7t 0x000524f0 0x0 .glue_7t 0x00052620 0x0
.glue_7t 0x000524f0 0x0 linker stubs .glue_7t 0x00052620 0x0 linker stubs
.vfp11_veneer 0x000524f0 0x0 .vfp11_veneer 0x00052620 0x0
.vfp11_veneer 0x000524f0 0x0 linker stubs .vfp11_veneer 0x00052620 0x0 linker stubs
.v4_bx 0x000524f0 0x0 .v4_bx 0x00052620 0x0
.v4_bx 0x000524f0 0x0 linker stubs .v4_bx 0x00052620 0x0 linker stubs
.iplt 0x000524f0 0x0 .iplt 0x00052620 0x0
.iplt 0x000524f0 0x0 ./src/SPI.o .iplt 0x00052620 0x0 ./src/SPI.o
.rel.dyn 0x000524f0 0x0 .rel.dyn 0x00052620 0x0
.rel.iplt 0x000524f0 0x0 ./src/SPI.o .rel.iplt 0x00052620 0x0 ./src/SPI.o
.ARM.extab .ARM.extab
*(.ARM.extab* .gnu.linkonce.armextab.*) *(.ARM.extab* .gnu.linkonce.armextab.*)
.ARM.exidx 0x000524f0 0x0 .ARM.exidx 0x00052620 0x0
0x000524f0 __exidx_start = . 0x00052620 __exidx_start = .
*(.ARM.exidx* .gnu.linkonce.armexidx.*) *(.ARM.exidx* .gnu.linkonce.armexidx.*)
0x000524f0 __exidx_end = . 0x00052620 __exidx_end = .
0x000524f0 _etext = . 0x00052620 _etext = .
.data_RAM2 0x2007c000 0x0 load address 0x000524f0 .data_RAM2 0x2007c000 0x0 load address 0x00052620
FILL mask 0xff FILL mask 0xff
[!provide] PROVIDE (__start_data_RAM2 = .) [!provide] PROVIDE (__start_data_RAM2 = .)
[!provide] PROVIDE (__start_data_RamAHB32 = .) [!provide] PROVIDE (__start_data_RamAHB32 = .)
@@ -959,7 +966,7 @@ END GROUP
0x10000000 . = ALIGN (0x4) 0x10000000 . = ALIGN (0x4)
0x10000000 _end_uninit_RESERVED = . 0x10000000 _end_uninit_RESERVED = .
.data 0x10000000 0x110 load address 0x000524f0 .data 0x10000000 0x110 load address 0x00052620
FILL mask 0xff FILL mask 0xff
0x10000000 _data = . 0x10000000 _data = .
[!provide] PROVIDE (__start_data_RAM = .) [!provide] PROVIDE (__start_data_RAM = .)
@@ -1001,7 +1008,7 @@ END GROUP
[!provide] PROVIDE (__end_data_RAM = .) [!provide] PROVIDE (__end_data_RAM = .)
[!provide] PROVIDE (__end_data_RamLoc32 = .) [!provide] PROVIDE (__end_data_RamLoc32 = .)
.igot.plt 0x10000110 0x0 load address 0x00052600 .igot.plt 0x10000110 0x0 load address 0x00052730
.igot.plt 0x10000110 0x0 ./src/SPI.o .igot.plt 0x10000110 0x0 ./src/SPI.o
.bss_RAM2 0x2007c000 0x0 .bss_RAM2 0x2007c000 0x0
@@ -1015,7 +1022,7 @@ END GROUP
[!provide] PROVIDE (__end_bss_RAM2 = .) [!provide] PROVIDE (__end_bss_RAM2 = .)
[!provide] PROVIDE (__end_bss_RamAHB32 = .) [!provide] PROVIDE (__end_bss_RamAHB32 = .)
.bss 0x10000110 0x90 .bss 0x10000110 0x94
0x10000110 _bss = . 0x10000110 _bss = .
[!provide] PROVIDE (__start_bss_RAM = .) [!provide] PROVIDE (__start_bss_RAM = .)
[!provide] PROVIDE (__start_bss_RamLoc32 = .) [!provide] PROVIDE (__start_bss_RamLoc32 = .)
@@ -1027,24 +1034,26 @@ END GROUP
0x10000114 momentum 0x10000114 momentum
.bss.walls 0x1000011c 0x60 ./src/main.o .bss.walls 0x1000011c 0x60 ./src/main.o
0x1000011c walls 0x1000011c walls
.bss.player 0x1000017c 0x14 ./src/main.o .bss.score 0x1000017c 0x4 ./src/main.o
0x1000017c player 0x1000017c score
.bss.player 0x10000180 0x14 ./src/main.o
0x10000180 player
.bss.scrolling .bss.scrolling
0x10000190 0x4 ./src/main.o 0x10000194 0x4 ./src/main.o
0x10000190 scrolling 0x10000194 scrolling
.bss.need_to_scroll .bss.need_to_scroll
0x10000194 0x1 ./src/main.o 0x10000198 0x1 ./src/main.o
0x10000194 need_to_scroll 0x10000198 need_to_scroll
*fill* 0x10000195 0x3 *fill* 0x10000199 0x3
.bss.audioValue .bss.audioValue
0x10000198 0x4 ./src/main.o
0x10000198 audioValue
.bss.timer_count
0x1000019c 0x4 ./src/main.o 0x1000019c 0x4 ./src/main.o
0x1000019c timer_count 0x1000019c audioValue
.bss.timer_count
0x100001a0 0x4 ./src/main.o
0x100001a0 timer_count
*(COMMON) *(COMMON)
0x100001a0 . = ALIGN (0x4) 0x100001a4 . = ALIGN (0x4)
0x100001a0 _ebss = . 0x100001a4 _ebss = .
[!provide] PROVIDE (__end_bss_RAM = .) [!provide] PROVIDE (__end_bss_RAM = .)
[!provide] PROVIDE (__end_bss_RamLoc32 = .) [!provide] PROVIDE (__end_bss_RamLoc32 = .)
[!provide] PROVIDE (end = .) [!provide] PROVIDE (end = .)
@@ -1060,47 +1069,47 @@ END GROUP
[!provide] PROVIDE (__end_noinit_RAM2 = .) [!provide] PROVIDE (__end_noinit_RAM2 = .)
[!provide] PROVIDE (__end_noinit_RamAHB32 = .) [!provide] PROVIDE (__end_noinit_RamAHB32 = .)
.noinit 0x100001a0 0x0 .noinit 0x100001a4 0x0
0x100001a0 _noinit = . 0x100001a4 _noinit = .
[!provide] PROVIDE (__start_noinit_RAM = .) [!provide] PROVIDE (__start_noinit_RAM = .)
[!provide] PROVIDE (__start_noinit_RamLoc32 = .) [!provide] PROVIDE (__start_noinit_RamLoc32 = .)
*(.noinit*) *(.noinit*)
0x100001a0 . = ALIGN (0x4) 0x100001a4 . = ALIGN (0x4)
0x100001a0 _end_noinit = . 0x100001a4 _end_noinit = .
[!provide] PROVIDE (__end_noinit_RAM = .) [!provide] PROVIDE (__end_noinit_RAM = .)
[!provide] PROVIDE (__end_noinit_RamLoc32 = .) [!provide] PROVIDE (__end_noinit_RamLoc32 = .)
0x100001a0 PROVIDE (_pvHeapStart = DEFINED (__user_heap_base)?__user_heap_base:.) 0x100001a4 PROVIDE (_pvHeapStart = DEFINED (__user_heap_base)?__user_heap_base:.)
0x10008000 PROVIDE (_vStackTop = DEFINED (__user_stack_top)?__user_stack_top:(__top_RamLoc32 - 0x0)) 0x10008000 PROVIDE (_vStackTop = DEFINED (__user_stack_top)?__user_stack_top:(__top_RamLoc32 - 0x0))
0xefff74b2 PROVIDE (__valid_user_code_checksum = (0x0 - ((((((_vStackTop + (ResetISR + 0x1)) + (NMI_Handler + 0x1)) + (HardFault_Handler + 0x1)) + (DEFINED (MemManage_Handler)?MemManage_Handler:0x0 + 0x1)) + (DEFINED (BusFault_Handler)?BusFault_Handler:0x0 + 0x1)) + (DEFINED (UsageFault_Handler)?UsageFault_Handler:0x0 + 0x1)))) 0xefff74b2 PROVIDE (__valid_user_code_checksum = (0x0 - ((((((_vStackTop + (ResetISR + 0x1)) + (NMI_Handler + 0x1)) + (HardFault_Handler + 0x1)) + (DEFINED (MemManage_Handler)?MemManage_Handler:0x0 + 0x1)) + (DEFINED (BusFault_Handler)?BusFault_Handler:0x0 + 0x1)) + (DEFINED (UsageFault_Handler)?UsageFault_Handler:0x0 + 0x1))))
0x00000000 _image_start = LOADADDR (.text) 0x00000000 _image_start = LOADADDR (.text)
0x00052600 _image_end = (LOADADDR (.data) + SIZEOF (.data)) 0x00052730 _image_end = (LOADADDR (.data) + SIZEOF (.data))
0x00052600 _image_size = (_image_end - _image_start) 0x00052730 _image_size = (_image_end - _image_start)
OUTPUT(MyProject.axf elf32-littlearm) OUTPUT(MyProject.axf elf32-littlearm)
LOAD linker stubs LOAD linker stubs
.debug_info 0x00000000 0x1fc1 .debug_info 0x00000000 0x207f
.debug_info 0x00000000 0x208 ./src/GPIO.o .debug_info 0x00000000 0x208 ./src/GPIO.o
.debug_info 0x00000208 0xbe8 ./src/SPI.o .debug_info 0x00000208 0xbe8 ./src/SPI.o
.debug_info 0x00000df0 0x29d ./src/cr_startup_lpc175x_6x.o .debug_info 0x00000df0 0x29d ./src/cr_startup_lpc175x_6x.o
.debug_info 0x0000108d 0x40 ./src/crp.o .debug_info 0x0000108d 0x40 ./src/crp.o
.debug_info 0x000010cd 0xc9 ./src/fonts.o .debug_info 0x000010cd 0xc9 ./src/fonts.o
.debug_info 0x00001196 0xb5 ./src/init_clk.o .debug_info 0x00001196 0xb5 ./src/init_clk.o
.debug_info 0x0000124b 0x871 ./src/main.o .debug_info 0x0000124b 0x92f ./src/main.o
.debug_info 0x00001abc 0x4a /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(__weak__main.o) .debug_info 0x00001b7a 0x4a /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(__weak__main.o)
.debug_info 0x00001b06 0x4bb /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(stdlib.o) .debug_info 0x00001bc4 0x4bb /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(stdlib.o)
.debug_abbrev 0x00000000 0xbf9 .debug_abbrev 0x00000000 0xc0c
.debug_abbrev 0x00000000 0x12b ./src/GPIO.o .debug_abbrev 0x00000000 0x12b ./src/GPIO.o
.debug_abbrev 0x0000012b 0x2c8 ./src/SPI.o .debug_abbrev 0x0000012b 0x2c8 ./src/SPI.o
.debug_abbrev 0x000003f3 0x14d ./src/cr_startup_lpc175x_6x.o .debug_abbrev 0x000003f3 0x14d ./src/cr_startup_lpc175x_6x.o
.debug_abbrev 0x00000540 0x38 ./src/crp.o .debug_abbrev 0x00000540 0x38 ./src/crp.o
.debug_abbrev 0x00000578 0x73 ./src/fonts.o .debug_abbrev 0x00000578 0x73 ./src/fonts.o
.debug_abbrev 0x000005eb 0x83 ./src/init_clk.o .debug_abbrev 0x000005eb 0x83 ./src/init_clk.o
.debug_abbrev 0x0000066e 0x285 ./src/main.o .debug_abbrev 0x0000066e 0x298 ./src/main.o
.debug_abbrev 0x000008f3 0x4f /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(__weak__main.o) .debug_abbrev 0x00000906 0x4f /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(__weak__main.o)
.debug_abbrev 0x00000942 0x2b7 /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(stdlib.o) .debug_abbrev 0x00000955 0x2b7 /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(stdlib.o)
.debug_aranges 0x00000000 0x358 .debug_aranges 0x00000000 0x370
.debug_aranges .debug_aranges
0x00000000 0x78 ./src/GPIO.o 0x00000000 0x78 ./src/GPIO.o
.debug_aranges .debug_aranges
@@ -1114,20 +1123,20 @@ LOAD linker stubs
.debug_aranges .debug_aranges
0x00000208 0x28 ./src/init_clk.o 0x00000208 0x28 ./src/init_clk.o
.debug_aranges .debug_aranges
0x00000230 0x80 ./src/main.o 0x00000230 0x98 ./src/main.o
.debug_aranges .debug_aranges
0x000002b0 0x20 /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(__weak__main.o) 0x000002c8 0x20 /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(__weak__main.o)
.debug_aranges .debug_aranges
0x000002d0 0x88 /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(stdlib.o) 0x000002e8 0x88 /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(stdlib.o)
.debug_ranges 0x00000000 0x2b8 .debug_ranges 0x00000000 0x2d0
.debug_ranges 0x00000000 0x68 ./src/GPIO.o .debug_ranges 0x00000000 0x68 ./src/GPIO.o
.debug_ranges 0x00000068 0xd0 ./src/SPI.o .debug_ranges 0x00000068 0xd0 ./src/SPI.o
.debug_ranges 0x00000138 0x70 ./src/cr_startup_lpc175x_6x.o .debug_ranges 0x00000138 0x70 ./src/cr_startup_lpc175x_6x.o
.debug_ranges 0x000001a8 0x18 ./src/init_clk.o .debug_ranges 0x000001a8 0x18 ./src/init_clk.o
.debug_ranges 0x000001c0 0x70 ./src/main.o .debug_ranges 0x000001c0 0x88 ./src/main.o
.debug_ranges 0x00000230 0x10 /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(__weak__main.o) .debug_ranges 0x00000248 0x10 /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(__weak__main.o)
.debug_ranges 0x00000240 0x78 /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(stdlib.o) .debug_ranges 0x00000258 0x78 /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(stdlib.o)
.debug_macro 0x00000000 0x1767 .debug_macro 0x00000000 0x1767
.debug_macro 0x00000000 0x58 ./src/GPIO.o .debug_macro 0x00000000 0x58 ./src/GPIO.o
@@ -1148,18 +1157,18 @@ LOAD linker stubs
.debug_macro 0x0000167b 0xc4 ./src/main.o .debug_macro 0x0000167b 0xc4 ./src/main.o
.debug_macro 0x0000173f 0x28 ./src/main.o .debug_macro 0x0000173f 0x28 ./src/main.o
.debug_line 0x00000000 0x1e95 .debug_line 0x00000000 0x1fe2
.debug_line 0x00000000 0x358 ./src/GPIO.o .debug_line 0x00000000 0x358 ./src/GPIO.o
.debug_line 0x00000358 0xade ./src/SPI.o .debug_line 0x00000358 0xade ./src/SPI.o
.debug_line 0x00000e36 0x161 ./src/cr_startup_lpc175x_6x.o .debug_line 0x00000e36 0x161 ./src/cr_startup_lpc175x_6x.o
.debug_line 0x00000f97 0xb9 ./src/crp.o .debug_line 0x00000f97 0xb9 ./src/crp.o
.debug_line 0x00001050 0x3a ./src/fonts.o .debug_line 0x00001050 0x3a ./src/fonts.o
.debug_line 0x0000108a 0x3c8 ./src/init_clk.o .debug_line 0x0000108a 0x3c8 ./src/init_clk.o
.debug_line 0x00001452 0x6ba ./src/main.o .debug_line 0x00001452 0x807 ./src/main.o
.debug_line 0x00001b0c 0x4a /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(__weak__main.o) .debug_line 0x00001c59 0x4a /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(__weak__main.o)
.debug_line 0x00001b56 0x33f /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(stdlib.o) .debug_line 0x00001ca3 0x33f /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(stdlib.o)
.debug_str 0x00000000 0x64ff .debug_str 0x00000000 0x651d
.debug_str 0x00000000 0x5145 ./src/GPIO.o .debug_str 0x00000000 0x5145 ./src/GPIO.o
0x51c4 (size before relaxing) 0x51c4 (size before relaxing)
.debug_str 0x00005145 0x446 ./src/SPI.o .debug_str 0x00005145 0x446 ./src/SPI.o
@@ -1172,11 +1181,11 @@ LOAD linker stubs
0x2e69 (size before relaxing) 0x2e69 (size before relaxing)
.debug_str 0x0000588a 0x2e1 ./src/init_clk.o .debug_str 0x0000588a 0x2e1 ./src/init_clk.o
0x53e9 (size before relaxing) 0x53e9 (size before relaxing)
.debug_str 0x00005b6b 0x785 ./src/main.o .debug_str 0x00005b6b 0x7a3 ./src/main.o
0x5a5d (size before relaxing) 0x5a7b (size before relaxing)
.debug_str 0x000062f0 0x125 /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(__weak__main.o) .debug_str 0x0000630e 0x125 /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(__weak__main.o)
0x12a (size before relaxing) 0x12a (size before relaxing)
.debug_str 0x00006415 0xea /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(stdlib.o) .debug_str 0x00006433 0xea /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(stdlib.o)
0x27b (size before relaxing) 0x27b (size before relaxing)
.comment 0x00000000 0x45 .comment 0x00000000 0x45
@@ -1212,14 +1221,14 @@ LOAD linker stubs
.ARM.attributes .ARM.attributes
0x00000168 0x2d /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(stdlib.o) 0x00000168 0x2d /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(stdlib.o)
.debug_frame 0x00000000 0xaac .debug_frame 0x00000000 0xb28
.debug_frame 0x00000000 0x1b4 ./src/GPIO.o .debug_frame 0x00000000 0x1b4 ./src/GPIO.o
.debug_frame 0x000001b4 0x3cc ./src/SPI.o .debug_frame 0x000001b4 0x3cc ./src/SPI.o
.debug_frame 0x00000580 0x170 ./src/cr_startup_lpc175x_6x.o .debug_frame 0x00000580 0x170 ./src/cr_startup_lpc175x_6x.o
.debug_frame 0x000006f0 0x64 ./src/init_clk.o .debug_frame 0x000006f0 0x64 ./src/init_clk.o
.debug_frame 0x00000754 0x1f4 ./src/main.o .debug_frame 0x00000754 0x270 ./src/main.o
.debug_frame 0x00000948 0x20 /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(__weak__main.o) .debug_frame 0x000009c4 0x20 /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(__weak__main.o)
.debug_frame 0x00000968 0x144 /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(stdlib.o) .debug_frame 0x000009e4 0x144 /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(stdlib.o)
.debug_loc 0x00000000 0x2a5 .debug_loc 0x00000000 0x2a5
.debug_loc 0x00000000 0x2a5 /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(stdlib.o) .debug_loc 0x00000000 0x2a5 /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(stdlib.o)
@@ -1280,6 +1289,7 @@ InitAudio ./src/GPIO.o
./src/main.o ./src/main.o
InitButtons ./src/GPIO.o InitButtons ./src/GPIO.o
./src/main.o ./src/main.o
InitGame ./src/main.o
InitTimer ./src/GPIO.o InitTimer ./src/GPIO.o
./src/main.o ./src/main.o
Init_SPI ./src/SPI.o Init_SPI ./src/SPI.o
@@ -1465,6 +1475,7 @@ audioValue ./src/main.o
auto_screen_roloff ./src/SPI.o auto_screen_roloff ./src/SPI.o
bss_init ./src/cr_startup_lpc175x_6x.o bss_init ./src/cr_startup_lpc175x_6x.o
calloc /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(alloc.o) calloc /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(alloc.o)
checkCollision ./src/main.o
convert_to_string ./src/main.o convert_to_string ./src/main.o
data_init ./src/cr_startup_lpc175x_6x.o data_init ./src/cr_startup_lpc175x_6x.o
div /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(stdlib.o) div /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(stdlib.o)
@@ -1496,6 +1507,7 @@ lldiv /Applications/MCUXpressoIDE_11
main ./src/main.o main ./src/main.o
/Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(__weak__main.o) /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(__weak__main.o)
malloc /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(alloc.o) malloc /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(alloc.o)
max ./src/main.o
maxPlayerSpeed ./src/main.o maxPlayerSpeed ./src/main.o
maxWallSize ./src/main.o maxWallSize ./src/main.o
memcpy /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(memcpy.o) memcpy /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(memcpy.o)
@@ -1518,6 +1530,7 @@ realloc /Applications/MCUXpressoIDE_11
remove /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(remove.o) remove /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(remove.o)
/Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(fclose.o) /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(fclose.o)
rename /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(remove.o) rename /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(remove.o)
score ./src/main.o
scroll ./src/SPI.o scroll ./src/SPI.o
./src/main.o ./src/main.o
scroll_array ./src/main.o scroll_array ./src/main.o
+1 -1
View File
@@ -5,7 +5,7 @@
* Generated linker script file for LPC1769 * Generated linker script file for LPC1769
* Created from linkscript.ldt by FMCreateLinkLibraries * Created from linkscript.ldt by FMCreateLinkLibraries
* Using Freemarker v2.3.30 * Using Freemarker v2.3.30
* MCUXpresso IDE v11.9.0 [Build 2144] [2024-01-05] on Jun 15, 2024, 11:05:06 AM * MCUXpresso IDE v11.9.0 [Build 2144] [2024-01-05] on Jun 15, 2024, 11:32:54 AM
*/ */
INCLUDE "MyProject_Debug_library.ld" INCLUDE "MyProject_Debug_library.ld"
+1 -1
View File
@@ -5,7 +5,7 @@
* Generated linker script file for LPC1769 * Generated linker script file for LPC1769
* Created from library.ldt by FMCreateLinkLibraries * Created from library.ldt by FMCreateLinkLibraries
* Using Freemarker v2.3.30 * Using Freemarker v2.3.30
* MCUXpresso IDE v11.9.0 [Build 2144] [2024-01-05] on Jun 15, 2024, 11:05:06 AM * MCUXpresso IDE v11.9.0 [Build 2144] [2024-01-05] on Jun 15, 2024, 11:32:54 AM
*/ */
GROUP ( GROUP (
+1 -1
View File
@@ -5,7 +5,7 @@
* Generated linker script file for LPC1769 * Generated linker script file for LPC1769
* Created from memory.ldt by FMCreateLinkMemory * Created from memory.ldt by FMCreateLinkMemory
* Using Freemarker v2.3.30 * Using Freemarker v2.3.30
* MCUXpresso IDE v11.9.0 [Build 2144] [2024-01-05] on Jun 15, 2024, 11:05:06 AM * MCUXpresso IDE v11.9.0 [Build 2144] [2024-01-05] on Jun 15, 2024, 11:32:54 AM
*/ */
MEMORY MEMORY
BIN
View File
Binary file not shown.
+16 -13
View File
@@ -1,13 +1,16 @@
../src/main.c:34:6:init 8 static ../src/main.c:35:6:init 8 static
../src/main.c:45:6:TIMER0_IRQHandler 8 static ../src/main.c:46:6:TIMER0_IRQHandler 8 static
../src/main.c:54:6:EINT3_IRQHandler 24 static ../src/main.c:55:6:EINT3_IRQHandler 24 static
../src/main.c:68:6:increment_scroll 16 static ../src/main.c:69:6:increment_scroll 16 static
../src/main.c:75:6:SysTick_Handler 8 static ../src/main.c:78:6:SysTick_Handler 8 static
../src/main.c:85:5:number_of_digits 24 static ../src/main.c:88:5:number_of_digits 24 static
../src/main.c:95:6:convert_to_string 40 static ../src/main.c:98:6:convert_to_string 40 static
../src/main.c:106:6:scroll_array 32 static ../src/main.c:109:6:scroll_array 32 static
../src/main.c:115:8:CreatePlayer 80 static ../src/main.c:118:5:min 16 static
../src/main.c:123:6:CreateWalls 80 static ../src/main.c:125:5:max 16 static
../src/main.c:133:5:min 16 static ../src/main.c:133:8:CreatePlayer 88 static
../src/main.c:141:6:RefreshPlayer 72 static ../src/main.c:142:6:CreateWalls 88 static
../src/main.c:179:5:main 136 dynamic ../src/main.c:151:5:checkCollision 24 static
../src/main.c:158:6:RefreshPlayer 80 static
../src/main.c:202:6:InitGame 40 static
../src/main.c:212:5:main 112 dynamic
+49 -20
View File
@@ -28,6 +28,7 @@ Size maxWallSize = {50,50};
Obstacle walls[6]; Obstacle walls[6];
int seed = 1234567; int seed = 1234567;
int maxPlayerSpeed = 7; int maxPlayerSpeed = 7;
int score = 0;
Player player; Player player;
@@ -71,6 +72,8 @@ void increment_scroll(int value){
scrolling = 319; scrolling = 319;
if(scrolling >= 320) if(scrolling >= 320)
scrolling = 1; scrolling = 1;
score += 1;
} }
void SysTick_Handler(){ void SysTick_Handler(){
timer_count += 1; timer_count += 1;
@@ -112,12 +115,28 @@ void scroll_array(int **array,int **newArray,int width,int height){
} }
} }
int min(int x,int y){
if(x > y){
return y;
}else{
return x;
}
}
int max(int x, int y){
if(x > y){
return x;
}else{
return y;
}
}
Player CreatePlayer(){ Player CreatePlayer(){
int HP = 100; int HP = 100;
Size playerSize = {32,32}; Size playerSize = {32,32};
Point position = {SCREEN_SIZE.Width / 2 - playerSize.Width /2,SCREEN_SIZE.Height / 2 - playerSize.Height/2}; Point position = {SCREEN_SIZE.Width / 2 - playerSize.Width /2,SCREEN_SIZE.Height / 2 - playerSize.Height/2};
Rectangle playerHitbox = {position,playerSize}; Rectangle playerHitbox = {position,playerSize};
Player player = {playerHitbox,HP}; Player player = {playerHitbox,HP};
momentum = (Point){0,0};
return player; return player;
} }
void CreateWalls(){ void CreateWalls(){
@@ -126,18 +145,16 @@ void CreateWalls(){
int y = rand() % SCREEN_SIZE.Height; int y = rand() % SCREEN_SIZE.Height;
int width = rand() % maxWallSize.Width; int width = rand() % maxWallSize.Width;
int height = rand() % maxWallSize.Height; int height = rand() % maxWallSize.Height;
walls[i] = (Obstacle){(Rectangle){(Point){x,y},(Size){width,height}}}; walls[i] = (Obstacle){(Rectangle){(Point){x,y},(Size){max(width,height),max(width,height)}}};
} }
} }
int checkCollision(Rectangle A, Rectangle B) {
int min(int x,int y){ if (A.Position.X + A.Size.Width < B.Position.X || B.Position.X + B.Size.Width < A.Position.X)
if(x > y){ return 0;
return y; if (A.Position.Y + A.Size.Height < B.Position.Y || B.Position.Y + B.Size.Height < A.Position.Y)
}else{ return 0;
return x; return 1;
}
} }
void RefreshPlayer(Point vector){ void RefreshPlayer(Point vector){
if(player.Hitbox.Position.Y + vector.Y < 0){ if(player.Hitbox.Position.Y + vector.Y < 0){
player.Hitbox.Position.Y = SCREEN_SIZE.Height + (player.Hitbox.Position.Y - (0-vector.Y)); player.Hitbox.Position.Y = SCREEN_SIZE.Height + (player.Hitbox.Position.Y - (0-vector.Y));
@@ -172,30 +189,41 @@ void RefreshPlayer(Point vector){
bigPos.Y = SCREEN_SIZE.Height + bigPos.Y; bigPos.Y = SCREEN_SIZE.Height + bigPos.Y;
//bigPos.Y = bigPos.Y % SCREEN_SIZE.Height; //bigPos.Y = bigPos.Y % SCREEN_SIZE.Height;
for(int i = 0; i < numberOfWalls; i++){
if(checkCollision(player.Hitbox,walls[i].Hitbox))
InitGame();
}
Refresh_Player_Area((Rectangle){bigPos,bigSize},player.Hitbox); Refresh_Player_Area((Rectangle){bigPos,bigSize},player.Hitbox);
} }
void InitGame(){
scrolling = 0;
score = 0;
Resize_Window(SCREEN);
Draw_stars();
player = CreatePlayer();
CreateWalls();
Draw_Walls(&walls,numberOfWalls);
}
int main(void) { int main(void) {
init(); init();
InitButtons(); InitButtons();
InitTimer(); InitTimer();
InitAudio(); InitAudio();
LedSetState8(128+32+8+2); LedSetState8(128+32+8+2);
Point text_origin = {240 / 2 - 8/2,(320 / 6) * 5 - 4};
Resize_Window(SCREEN);
Draw_stars();
player = CreatePlayer();
CreateWalls();
Draw_Walls(&walls,numberOfWalls);
int increment = 1; int increment = 1;
Size charSize = {7,11}; Size charSize = {7,11};
InitGame();
while (true) while (true)
{ {
int JoystickState = JoystickGetState(); int JoystickState = JoystickGetState();
Point vec = {0,0}; Point vec = {0,0};
@@ -213,14 +241,15 @@ int main(void) {
} }
if(need_to_scroll){ if(need_to_scroll){
//Refresh_Area((Rectangle){text_origin,(Size){charSize.Width * 3,charSize.Height}});
scroll(scrolling); scroll(scrolling);
player.Hitbox.Position.Y -= 1; player.Hitbox.Position.Y -= 1;
need_to_scroll = false; need_to_scroll = false;
int digits = number_of_digits(scrolling); int digits = number_of_digits(score);
char newStr[digits+1]; char newStr[digits+1];
convert_to_string(scrolling,digits,&newStr); convert_to_string(score,digits,&newStr);
Point text_origin = {SCREEN_SIZE.Width / 2 - (digits*charSize.Width)/2,SCREEN_SIZE.Height / 10 * 9 - (charSize.Height/2)};
Point new_origin = {text_origin.X,(text_origin.Y + scrolling)%320}; Point new_origin = {text_origin.X,(text_origin.Y + scrolling)%320};
Rectangle areaToRefresh = {{new_origin.X,new_origin.Y+3},{charSize.Width* 4,charSize.Height+5}}; Rectangle areaToRefresh = {{new_origin.X,new_origin.Y+3},{charSize.Width* 4,charSize.Height+5}};