diff --git a/Debug/MyProject.axf b/Debug/MyProject.axf index d4d0eab..f676303 100755 Binary files a/Debug/MyProject.axf and b/Debug/MyProject.axf differ diff --git a/Debug/MyProject.map b/Debug/MyProject.map index 57b8ae3..8fb9552 100644 --- a/Debug/MyProject.map +++ b/Debug/MyProject.map @@ -160,6 +160,7 @@ Discarded input sections 0x00000000 0x4 ./src/main.o .text.scroll_array 0x00000000 0x7e ./src/main.o + .text.max 0x00000000 0x22 ./src/main.o .debug_macro 0x00000000 0xab4 ./src/main.o .debug_macro 0x00000000 0x196 ./src/main.o .debug_macro 0x00000000 0x10 ./src/main.o @@ -675,7 +676,7 @@ END GROUP 0x20084000 __top_RamAHB32 = 0x20084000 0x20084000 __top_RAM2 = 0x20084000 -.text 0x00000000 0x5262c +.text 0x00000000 0x5282c FILL mask 0xff 0x00000000 __vectors_start__ = ABSOLUTE (.) *(.isr_vector) @@ -684,15 +685,15 @@ END GROUP 0x000000cc . = ALIGN (0x4) 0x000000cc __section_table_start = . 0x000000cc __data_section_table = . - 0x000000cc 0x4 LONG 0x5262c LOADADDR (.data) + 0x000000cc 0x4 LONG 0x5282c LOADADDR (.data) 0x000000d0 0x4 LONG 0x10000000 ADDR (.data) - 0x000000d4 0x4 LONG 0x110 SIZEOF (.data) - 0x000000d8 0x4 LONG 0x5262c LOADADDR (.data_RAM2) + 0x000000d4 0x4 LONG 0x114 SIZEOF (.data) + 0x000000d8 0x4 LONG 0x5282c LOADADDR (.data_RAM2) 0x000000dc 0x4 LONG 0x2007c000 ADDR (.data_RAM2) 0x000000e0 0x4 LONG 0x0 SIZEOF (.data_RAM2) 0x000000e4 __data_section_table_end = . 0x000000e4 __bss_section_table = . - 0x000000e4 0x4 LONG 0x10000110 ADDR (.bss) + 0x000000e4 0x4 LONG 0x10000114 ADDR (.bss) 0x000000e8 0x4 LONG 0x94 SIZEOF (.bss) 0x000000ec 0x4 LONG 0x2007c000 ADDR (.bss_RAM2) 0x000000f0 0x4 LONG 0x0 SIZEOF (.bss_RAM2) @@ -818,134 +819,140 @@ END GROUP 0x000008fc Resize_Window .text.scroll 0x000009c0 0x38 ./src/SPI.o 0x000009c0 scroll - .text.Get_Color_From_Background - 0x000009f8 0x80 ./src/SPI.o - 0x000009f8 Get_Color_From_Background - .text.Get_Color_From_Sprite - 0x00000a78 0x58 ./src/SPI.o - 0x00000a78 Get_Color_From_Sprite - .text.auto_screen_roloff - 0x00000ad0 0x66 ./src/SPI.o - 0x00000ad0 auto_screen_roloff - .text.Refresh_Area - 0x00000b36 0xa6 ./src/SPI.o - 0x00000b36 Refresh_Area - .text.Draw_Walls - 0x00000bdc 0x9c ./src/SPI.o - 0x00000bdc Draw_Walls - .text.Refresh_Player_Area - 0x00000c78 0x1a0 ./src/SPI.o - 0x00000c78 Refresh_Player_Area - .text.Draw_stars - 0x00000e18 0x64 ./src/SPI.o - 0x00000e18 Draw_stars - .text.strLen 0x00000e7c 0x3a ./src/SPI.o - 0x00000e7c strLen - *fill* 0x00000eb6 0x2 ff - .text.DrawChar - 0x00000eb8 0x108 ./src/SPI.o - 0x00000eb8 DrawChar - .text.DrawText - 0x00000fc0 0x8c ./src/SPI.o - 0x00000fc0 DrawText - .text.SystemInit - 0x0000104c 0x144 ./src/init_clk.o - 0x0000104c SystemInit - .text.init 0x00001190 0x1c ./src/main.o - 0x00001190 init - .text.TIMER0_IRQHandler - 0x000011ac 0x40 ./src/main.o - 0x000011ac TIMER0_IRQHandler - .text.EINT3_IRQHandler - 0x000011ec 0x30 ./src/main.o - 0x000011ec EINT3_IRQHandler - .text.increment_scroll - 0x0000121c 0x50 ./src/main.o - 0x0000121c increment_scroll - .text.SysTick_Handler - 0x0000126c 0x48 ./src/main.o - 0x0000126c SysTick_Handler - .text.number_of_digits - 0x000012b4 0x40 ./src/main.o - 0x000012b4 number_of_digits - .text.convert_to_string - 0x000012f4 0x7c ./src/main.o - 0x000012f4 convert_to_string - .text.min 0x00001370 0x22 ./src/main.o - 0x00001370 min - .text.max 0x00001392 0x22 ./src/main.o - 0x00001392 max - .text.CreatePlayer - 0x000013b4 0xac ./src/main.o - 0x000013b4 CreatePlayer - .text.CreateWalls - 0x00001460 0xd0 ./src/main.o - 0x00001460 CreateWalls .text.checkCollision - 0x00001530 0x50 ./src/main.o - 0x00001530 checkCollision + 0x000009f8 0x50 ./src/SPI.o + 0x000009f8 checkCollision + .text.Get_Color_From_Background + 0x00000a48 0x80 ./src/SPI.o + 0x00000a48 Get_Color_From_Background + .text.Get_Color_From_Walls + 0x00000ac8 0x9c ./src/SPI.o + 0x00000ac8 Get_Color_From_Walls + .text.Get_Color_From_Sprite + 0x00000b64 0x58 ./src/SPI.o + 0x00000b64 Get_Color_From_Sprite + .text.auto_screen_roloff + 0x00000bbc 0x66 ./src/SPI.o + 0x00000bbc auto_screen_roloff + .text.checkInWall + 0x00000c22 0x44 ./src/SPI.o + 0x00000c22 checkInWall + .text.Refresh_Area + 0x00000c66 0x142 ./src/SPI.o + 0x00000c66 Refresh_Area + .text.Draw_Walls + 0x00000da8 0xc6 ./src/SPI.o + 0x00000da8 Draw_Walls + *fill* 0x00000e6e 0x2 ff + .text.Refresh_Player_Area + 0x00000e70 0x1a0 ./src/SPI.o + 0x00000e70 Refresh_Player_Area + .text.Draw_stars + 0x00001010 0x64 ./src/SPI.o + 0x00001010 Draw_stars + .text.strLen 0x00001074 0x3a ./src/SPI.o + 0x00001074 strLen + *fill* 0x000010ae 0x2 ff + .text.DrawChar + 0x000010b0 0x108 ./src/SPI.o + 0x000010b0 DrawChar + .text.DrawText + 0x000011b8 0x8c ./src/SPI.o + 0x000011b8 DrawText + .text.SystemInit + 0x00001244 0x144 ./src/init_clk.o + 0x00001244 SystemInit + .text.init 0x00001388 0x1c ./src/main.o + 0x00001388 init + .text.TIMER0_IRQHandler + 0x000013a4 0x40 ./src/main.o + 0x000013a4 TIMER0_IRQHandler + .text.EINT3_IRQHandler + 0x000013e4 0x4c ./src/main.o + 0x000013e4 EINT3_IRQHandler + .text.increment_scroll + 0x00001430 0x50 ./src/main.o + 0x00001430 increment_scroll + .text.SysTick_Handler + 0x00001480 0x48 ./src/main.o + 0x00001480 SysTick_Handler + .text.number_of_digits + 0x000014c8 0x40 ./src/main.o + 0x000014c8 number_of_digits + .text.convert_to_string + 0x00001508 0x7c ./src/main.o + 0x00001508 convert_to_string + .text.min 0x00001584 0x22 ./src/main.o + 0x00001584 min + *fill* 0x000015a6 0x2 ff + .text.CreatePlayer + 0x000015a8 0xac ./src/main.o + 0x000015a8 CreatePlayer + .text.CreateWalls + 0x00001654 0x10c ./src/main.o + 0x00001654 CreateWalls .text.RefreshPlayer - 0x00001580 0x198 ./src/main.o - 0x00001580 RefreshPlayer + 0x00001760 0x1a4 ./src/main.o + 0x00001760 RefreshPlayer .text.InitGame - 0x00001718 0x64 ./src/main.o - 0x00001718 InitGame - .text.main 0x0000177c 0x264 ./src/main.o - 0x0000177c main + 0x00001904 0x64 ./src/main.o + 0x00001904 InitGame + .text.main 0x00001968 0x278 ./src/main.o + 0x00001968 main .text.__weak_main - 0x000019e0 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) - 0x000019e0 __main - 0x000019e0 __weak_main - .text.rand 0x000019e4 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) - 0x000019e4 rand - .text.srand 0x00001a2c 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) - 0x00001a2c srand - .text.abs 0x00001a6c 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) - 0x00001a6c abs + 0x00001be0 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) + 0x00001be0 __main + 0x00001be0 __weak_main + .text.rand 0x00001be4 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) + 0x00001be4 rand + .text.srand 0x00001c2c 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) + 0x00001c2c srand + .text.abs 0x00001c6c 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) + 0x00001c6c abs *(.rodata .rodata.* .constdata .constdata.*) - .rodata.SMPTE 0x00001a74 0x38410 ./src/SPI.o + .rodata.SMPTE 0x00001c74 0x38410 ./src/SPI.o .rodata.ShipSprite1 - 0x00039e84 0xc10 ./src/SPI.o + 0x0003a084 0xc10 ./src/SPI.o .rodata.SmallFont - 0x0003aa94 0x478 ./src/fonts.o - 0x0003aa94 SmallFont + 0x0003ac94 0x478 ./src/fonts.o + 0x0003ac94 SmallFont .rodata.AllMyFellas_wav - 0x0003af0c 0x17700 ./src/main.o - 0x0003af0c AllMyFellas_wav + 0x0003b10c 0x17700 ./src/main.o + 0x0003b10c AllMyFellas_wav .rodata.SCREEN - 0x0005260c 0x10 ./src/main.o - 0x0005260c SCREEN - .rodata 0x0005261c 0x10 ./src/main.o - 0x0005262c . = ALIGN (0x4) + 0x0005280c 0x10 ./src/main.o + 0x0005280c SCREEN + .rodata 0x0005281c 0x10 ./src/main.o + 0x0005282c . = ALIGN (0x4) -.glue_7 0x0005262c 0x0 - .glue_7 0x0005262c 0x0 linker stubs +.glue_7 0x0005282c 0x0 + .glue_7 0x0005282c 0x0 linker stubs -.glue_7t 0x0005262c 0x0 - .glue_7t 0x0005262c 0x0 linker stubs +.glue_7t 0x0005282c 0x0 + .glue_7t 0x0005282c 0x0 linker stubs -.vfp11_veneer 0x0005262c 0x0 - .vfp11_veneer 0x0005262c 0x0 linker stubs +.vfp11_veneer 0x0005282c 0x0 + .vfp11_veneer 0x0005282c 0x0 linker stubs -.v4_bx 0x0005262c 0x0 - .v4_bx 0x0005262c 0x0 linker stubs +.v4_bx 0x0005282c 0x0 + .v4_bx 0x0005282c 0x0 linker stubs -.iplt 0x0005262c 0x0 - .iplt 0x0005262c 0x0 ./src/SPI.o +.iplt 0x0005282c 0x0 + .iplt 0x0005282c 0x0 ./src/SPI.o -.rel.dyn 0x0005262c 0x0 - .rel.iplt 0x0005262c 0x0 ./src/SPI.o +.rel.dyn 0x0005282c 0x0 + .rel.iplt 0x0005282c 0x0 ./src/SPI.o .ARM.extab *(.ARM.extab* .gnu.linkonce.armextab.*) -.ARM.exidx 0x0005262c 0x0 - 0x0005262c __exidx_start = . +.ARM.exidx 0x0005282c 0x0 + 0x0005282c __exidx_start = . *(.ARM.exidx* .gnu.linkonce.armexidx.*) - 0x0005262c __exidx_end = . - 0x0005262c _etext = . + 0x0005282c __exidx_end = . + 0x0005282c _etext = . -.data_RAM2 0x2007c000 0x0 load address 0x0005262c +.data_RAM2 0x2007c000 0x0 load address 0x0005282c FILL mask 0xff [!provide] PROVIDE (__start_data_RAM2 = .) [!provide] PROVIDE (__start_data_RamAHB32 = .) @@ -966,7 +973,7 @@ END GROUP 0x10000000 . = ALIGN (0x4) 0x10000000 _end_uninit_RESERVED = . -.data 0x10000000 0x110 load address 0x0005262c +.data 0x10000000 0x114 load address 0x0005282c FILL mask 0xff 0x10000000 _data = . [!provide] PROVIDE (__start_data_RAM = .) @@ -983,33 +990,36 @@ END GROUP .data.numberOfWalls 0x10000010 0x4 ./src/main.o 0x10000010 numberOfWalls - .data.maxWallSize + .data.defaultWallSize 0x10000014 0x8 ./src/main.o - 0x10000014 maxWallSize + 0x10000014 defaultWallSize .data.seed 0x1000001c 0x4 ./src/main.o 0x1000001c seed .data.maxPlayerSpeed 0x10000020 0x4 ./src/main.o 0x10000020 maxPlayerSpeed - .data.scroller_divider + .data.hitboxActivated 0x10000024 0x4 ./src/main.o - 0x10000024 scroller_divider - .data.scroll_increment + 0x10000024 hitboxActivated + .data.scroller_divider 0x10000028 0x4 ./src/main.o - 0x10000028 scroll_increment + 0x10000028 scroller_divider + .data.scroll_increment + 0x1000002c 0x4 ./src/main.o + 0x1000002c scroll_increment .data._random_k - 0x1000002c 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(stdlib.o) - .data._random_j 0x10000030 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(stdlib.o) + .data._random_j + 0x10000034 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(stdlib.o) .data._random_number_seed - 0x10000034 0xdc /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) - 0x10000110 . = ALIGN (0x4) - 0x10000110 _edata = . + 0x10000038 0xdc /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) + 0x10000114 . = ALIGN (0x4) + 0x10000114 _edata = . [!provide] PROVIDE (__end_data_RAM = .) [!provide] PROVIDE (__end_data_RamLoc32 = .) -.igot.plt 0x10000110 0x0 load address 0x0005273c - .igot.plt 0x10000110 0x0 ./src/SPI.o +.igot.plt 0x10000114 0x0 load address 0x00052940 + .igot.plt 0x10000114 0x0 ./src/SPI.o .bss_RAM2 0x2007c000 0x0 [!provide] PROVIDE (__start_bss_RAM2 = .) @@ -1022,38 +1032,38 @@ END GROUP [!provide] PROVIDE (__end_bss_RAM2 = .) [!provide] PROVIDE (__end_bss_RamAHB32 = .) -.bss 0x10000110 0x94 - 0x10000110 _bss = . +.bss 0x10000114 0x94 + 0x10000114 _bss = . [!provide] PROVIDE (__start_bss_RAM = .) [!provide] PROVIDE (__start_bss_RamLoc32 = .) *(.bss*) .bss.showDebug - 0x10000110 0x4 ./src/SPI.o - 0x10000110 showDebug - .bss.momentum 0x10000114 0x8 ./src/main.o - 0x10000114 momentum - .bss.walls 0x1000011c 0x60 ./src/main.o - 0x1000011c walls - .bss.score 0x1000017c 0x4 ./src/main.o - 0x1000017c score - .bss.player 0x10000180 0x14 ./src/main.o - 0x10000180 player + 0x10000114 0x4 ./src/SPI.o + 0x10000114 showDebug + .bss.momentum 0x10000118 0x8 ./src/main.o + 0x10000118 momentum + .bss.walls 0x10000120 0x60 ./src/main.o + 0x10000120 walls + .bss.score 0x10000180 0x4 ./src/main.o + 0x10000180 score + .bss.player 0x10000184 0x14 ./src/main.o + 0x10000184 player .bss.scrolling - 0x10000194 0x4 ./src/main.o - 0x10000194 scrolling + 0x10000198 0x4 ./src/main.o + 0x10000198 scrolling .bss.need_to_scroll - 0x10000198 0x1 ./src/main.o - 0x10000198 need_to_scroll - *fill* 0x10000199 0x3 + 0x1000019c 0x1 ./src/main.o + 0x1000019c need_to_scroll + *fill* 0x1000019d 0x3 .bss.audioValue - 0x1000019c 0x4 ./src/main.o - 0x1000019c audioValue - .bss.timer_count 0x100001a0 0x4 ./src/main.o - 0x100001a0 timer_count + 0x100001a0 audioValue + .bss.timer_count + 0x100001a4 0x4 ./src/main.o + 0x100001a4 timer_count *(COMMON) - 0x100001a4 . = ALIGN (0x4) - 0x100001a4 _ebss = . + 0x100001a8 . = ALIGN (0x4) + 0x100001a8 _ebss = . [!provide] PROVIDE (__end_bss_RAM = .) [!provide] PROVIDE (__end_bss_RamLoc32 = .) [!provide] PROVIDE (end = .) @@ -1069,74 +1079,74 @@ END GROUP [!provide] PROVIDE (__end_noinit_RAM2 = .) [!provide] PROVIDE (__end_noinit_RamAHB32 = .) -.noinit 0x100001a4 0x0 - 0x100001a4 _noinit = . +.noinit 0x100001a8 0x0 + 0x100001a8 _noinit = . [!provide] PROVIDE (__start_noinit_RAM = .) [!provide] PROVIDE (__start_noinit_RamLoc32 = .) *(.noinit*) - 0x100001a4 . = ALIGN (0x4) - 0x100001a4 _end_noinit = . + 0x100001a8 . = ALIGN (0x4) + 0x100001a8 _end_noinit = . [!provide] PROVIDE (__end_noinit_RAM = .) [!provide] PROVIDE (__end_noinit_RamLoc32 = .) - 0x100001a4 PROVIDE (_pvHeapStart = DEFINED (__user_heap_base)?__user_heap_base:.) + 0x100001a8 PROVIDE (_pvHeapStart = DEFINED (__user_heap_base)?__user_heap_base:.) 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)))) 0x00000000 _image_start = LOADADDR (.text) - 0x0005273c _image_end = (LOADADDR (.data) + SIZEOF (.data)) - 0x0005273c _image_size = (_image_end - _image_start) + 0x00052940 _image_end = (LOADADDR (.data) + SIZEOF (.data)) + 0x00052940 _image_size = (_image_end - _image_start) OUTPUT(MyProject.axf elf32-littlearm) LOAD linker stubs -.debug_info 0x00000000 0x207f +.debug_info 0x00000000 0x221d .debug_info 0x00000000 0x208 ./src/GPIO.o - .debug_info 0x00000208 0xbe8 ./src/SPI.o - .debug_info 0x00000df0 0x29d ./src/cr_startup_lpc175x_6x.o - .debug_info 0x0000108d 0x40 ./src/crp.o - .debug_info 0x000010cd 0xc9 ./src/fonts.o - .debug_info 0x00001196 0xb5 ./src/init_clk.o - .debug_info 0x0000124b 0x92f ./src/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 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_info 0x00000208 0xd0a ./src/SPI.o + .debug_info 0x00000f12 0x29d ./src/cr_startup_lpc175x_6x.o + .debug_info 0x000011af 0x40 ./src/crp.o + .debug_info 0x000011ef 0xc9 ./src/fonts.o + .debug_info 0x000012b8 0xb5 ./src/init_clk.o + .debug_info 0x0000136d 0x9ab ./src/main.o + .debug_info 0x00001d18 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 0x00001d62 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 0xc0c +.debug_abbrev 0x00000000 0xc4e .debug_abbrev 0x00000000 0x12b ./src/GPIO.o - .debug_abbrev 0x0000012b 0x2c8 ./src/SPI.o - .debug_abbrev 0x000003f3 0x14d ./src/cr_startup_lpc175x_6x.o - .debug_abbrev 0x00000540 0x38 ./src/crp.o - .debug_abbrev 0x00000578 0x73 ./src/fonts.o - .debug_abbrev 0x000005eb 0x83 ./src/init_clk.o - .debug_abbrev 0x0000066e 0x298 ./src/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 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_abbrev 0x0000012b 0x2d9 ./src/SPI.o + .debug_abbrev 0x00000404 0x14d ./src/cr_startup_lpc175x_6x.o + .debug_abbrev 0x00000551 0x38 ./src/crp.o + .debug_abbrev 0x00000589 0x73 ./src/fonts.o + .debug_abbrev 0x000005fc 0x83 ./src/init_clk.o + .debug_abbrev 0x0000067f 0x2c9 ./src/main.o + .debug_abbrev 0x00000948 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 0x00000997 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 0x370 +.debug_aranges 0x00000000 0x380 .debug_aranges 0x00000000 0x78 ./src/GPIO.o .debug_aranges - 0x00000078 0xe0 ./src/SPI.o + 0x00000078 0xf8 ./src/SPI.o .debug_aranges - 0x00000158 0x80 ./src/cr_startup_lpc175x_6x.o + 0x00000170 0x80 ./src/cr_startup_lpc175x_6x.o .debug_aranges - 0x000001d8 0x18 ./src/crp.o + 0x000001f0 0x18 ./src/crp.o .debug_aranges - 0x000001f0 0x18 ./src/fonts.o + 0x00000208 0x18 ./src/fonts.o .debug_aranges - 0x00000208 0x28 ./src/init_clk.o + 0x00000220 0x28 ./src/init_clk.o .debug_aranges - 0x00000230 0x98 ./src/main.o + 0x00000248 0x90 ./src/main.o .debug_aranges - 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) + 0x000002d8 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 - 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) + 0x000002f8 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 0x2d0 +.debug_ranges 0x00000000 0x2e0 .debug_ranges 0x00000000 0x68 ./src/GPIO.o - .debug_ranges 0x00000068 0xd0 ./src/SPI.o - .debug_ranges 0x00000138 0x70 ./src/cr_startup_lpc175x_6x.o - .debug_ranges 0x000001a8 0x18 ./src/init_clk.o - .debug_ranges 0x000001c0 0x88 ./src/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 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_ranges 0x00000068 0xe8 ./src/SPI.o + .debug_ranges 0x00000150 0x70 ./src/cr_startup_lpc175x_6x.o + .debug_ranges 0x000001c0 0x18 ./src/init_clk.o + .debug_ranges 0x000001d8 0x80 ./src/main.o + .debug_ranges 0x00000258 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 0x00000268 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 0x58 ./src/GPIO.o @@ -1157,35 +1167,35 @@ LOAD linker stubs .debug_macro 0x0000167b 0xc4 ./src/main.o .debug_macro 0x0000173f 0x28 ./src/main.o -.debug_line 0x00000000 0x1ff0 +.debug_line 0x00000000 0x212c .debug_line 0x00000000 0x358 ./src/GPIO.o - .debug_line 0x00000358 0xade ./src/SPI.o - .debug_line 0x00000e36 0x161 ./src/cr_startup_lpc175x_6x.o - .debug_line 0x00000f97 0xb9 ./src/crp.o - .debug_line 0x00001050 0x3a ./src/fonts.o - .debug_line 0x0000108a 0x3c8 ./src/init_clk.o - .debug_line 0x00001452 0x815 ./src/main.o - .debug_line 0x00001c67 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 0x00001cb1 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 0x00000358 0xc99 ./src/SPI.o + .debug_line 0x00000ff1 0x161 ./src/cr_startup_lpc175x_6x.o + .debug_line 0x00001152 0xb9 ./src/crp.o + .debug_line 0x0000120b 0x3a ./src/fonts.o + .debug_line 0x00001245 0x3c8 ./src/init_clk.o + .debug_line 0x0000160d 0x796 ./src/main.o + .debug_line 0x00001da3 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 0x00001ded 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 0x651d +.debug_str 0x00000000 0x6593 .debug_str 0x00000000 0x5145 ./src/GPIO.o 0x51c4 (size before relaxing) - .debug_str 0x00005145 0x446 ./src/SPI.o - 0x5590 (size before relaxing) - .debug_str 0x0000558b 0x1ef ./src/cr_startup_lpc175x_6x.o + .debug_str 0x00005145 0x493 ./src/SPI.o + 0x55e3 (size before relaxing) + .debug_str 0x000055d8 0x1ef ./src/cr_startup_lpc175x_6x.o 0x2ff0 (size before relaxing) - .debug_str 0x0000577a 0xe9 ./src/crp.o + .debug_str 0x000057c7 0xe9 ./src/crp.o 0x2ee4 (size before relaxing) - .debug_str 0x00005863 0x27 ./src/fonts.o + .debug_str 0x000058b0 0x27 ./src/fonts.o 0x2e69 (size before relaxing) - .debug_str 0x0000588a 0x2e1 ./src/init_clk.o + .debug_str 0x000058d7 0x2e1 ./src/init_clk.o 0x53e9 (size before relaxing) - .debug_str 0x00005b6b 0x7a3 ./src/main.o - 0x5a7b (size before relaxing) - .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) + .debug_str 0x00005bb8 0x7cc ./src/main.o + 0x5ab3 (size before relaxing) + .debug_str 0x00006384 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) - .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) + .debug_str 0x000064a9 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) .comment 0x00000000 0x45 @@ -1221,14 +1231,14 @@ LOAD linker stubs .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) -.debug_frame 0x00000000 0xb28 +.debug_frame 0x00000000 0xb80 .debug_frame 0x00000000 0x1b4 ./src/GPIO.o - .debug_frame 0x000001b4 0x3cc ./src/SPI.o - .debug_frame 0x00000580 0x170 ./src/cr_startup_lpc175x_6x.o - .debug_frame 0x000006f0 0x64 ./src/init_clk.o - .debug_frame 0x00000754 0x270 ./src/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 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_frame 0x000001b4 0x448 ./src/SPI.o + .debug_frame 0x000005fc 0x170 ./src/cr_startup_lpc175x_6x.o + .debug_frame 0x0000076c 0x64 ./src/init_clk.o + .debug_frame 0x000007d0 0x24c ./src/main.o + .debug_frame 0x00000a1c 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 0x00000a3c 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 /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) @@ -1278,6 +1288,7 @@ ENET_IRQHandler ./src/cr_startup_lpc175x_6x.o Fill_Gradient ./src/SPI.o Get_Color_From_Background ./src/SPI.o Get_Color_From_Sprite ./src/SPI.o +Get_Color_From_Walls ./src/SPI.o HardFault_Handler ./src/cr_startup_lpc175x_6x.o I2C0_IRQHandler ./src/cr_startup_lpc175x_6x.o I2C1_IRQHandler ./src/cr_startup_lpc175x_6x.o @@ -1475,9 +1486,12 @@ audioValue ./src/main.o auto_screen_roloff ./src/SPI.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) -checkCollision ./src/main.o +checkCollision ./src/SPI.o + ./src/main.o +checkInWall ./src/SPI.o convert_to_string ./src/main.o data_init ./src/cr_startup_lpc175x_6x.o +defaultWallSize ./src/main.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) errno /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(errno.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(_cr_sbrk.o) @@ -1497,6 +1511,7 @@ fseek /Applications/MCUXpressoIDE_11 ftell /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(ftell.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(fseek.o) g_pfnVectors ./src/cr_startup_lpc175x_6x.o +hitboxActivated ./src/main.o increment ./src/main.o increment_scroll ./src/main.o init ./src/main.o @@ -1509,7 +1524,6 @@ main ./src/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) max ./src/main.o maxPlayerSpeed ./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) /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) ./src/SPI.o diff --git a/Debug/MyProject_Debug.ld b/Debug/MyProject_Debug.ld index f19049b..fab7ae8 100644 --- a/Debug/MyProject_Debug.ld +++ b/Debug/MyProject_Debug.ld @@ -5,7 +5,7 @@ * Generated linker script file for LPC1769 * Created from linkscript.ldt by FMCreateLinkLibraries * Using Freemarker v2.3.30 - * MCUXpresso IDE v11.9.0 [Build 2144] [2024-01-05] on Jun 15, 2024, 11:50:43 AM + * MCUXpresso IDE v11.9.0 [Build 2144] [2024-01-05] on Jun 21, 2024, 10:28:42 AM */ INCLUDE "MyProject_Debug_library.ld" diff --git a/Debug/MyProject_Debug_library.ld b/Debug/MyProject_Debug_library.ld index 81e338d..c1d9eb4 100644 --- a/Debug/MyProject_Debug_library.ld +++ b/Debug/MyProject_Debug_library.ld @@ -5,7 +5,7 @@ * Generated linker script file for LPC1769 * Created from library.ldt by FMCreateLinkLibraries * Using Freemarker v2.3.30 - * MCUXpresso IDE v11.9.0 [Build 2144] [2024-01-05] on Jun 15, 2024, 11:50:43 AM + * MCUXpresso IDE v11.9.0 [Build 2144] [2024-01-05] on Jun 21, 2024, 10:28:42 AM */ GROUP ( diff --git a/Debug/MyProject_Debug_memory.ld b/Debug/MyProject_Debug_memory.ld index fd8fe62..01b75b1 100644 --- a/Debug/MyProject_Debug_memory.ld +++ b/Debug/MyProject_Debug_memory.ld @@ -5,7 +5,7 @@ * Generated linker script file for LPC1769 * Created from memory.ldt by FMCreateLinkMemory * Using Freemarker v2.3.30 - * MCUXpresso IDE v11.9.0 [Build 2144] [2024-01-05] on Jun 15, 2024, 11:50:43 AM + * MCUXpresso IDE v11.9.0 [Build 2144] [2024-01-05] on Jun 21, 2024, 10:28:42 AM */ MEMORY diff --git a/Debug/src/SPI.o b/Debug/src/SPI.o index b2096f0..48e4733 100644 Binary files a/Debug/src/SPI.o and b/Debug/src/SPI.o differ diff --git a/Debug/src/SPI.su b/Debug/src/SPI.su index 134d65b..834453e 100644 --- a/Debug/src/SPI.su +++ b/Debug/src/SPI.su @@ -10,16 +10,19 @@ ../src/SPI.c:199:6:SendPixel 24 static ../src/SPI.c:212:6:Resize_Window 64 static ../src/SPI.c:246:6:scroll 24 static -../src/SPI.c:256:6:Get_Color_From_Background 32 static -../src/SPI.c:269:6:Get_Color_From_Sprite 32 static -../src/SPI.c:275:6:auto_screen_roloff 64 static -../src/SPI.c:285:6:Refresh_Area 72 static -../src/SPI.c:298:6:Draw_Walls 72 static -../src/SPI.c:313:6:Refresh_Player_Area 88 static -../src/SPI.c:338:6:DrawPlayer 3144 static -../src/SPI.c:359:6:Draw_stars 32 static -../src/SPI.c:369:5:strLen 24 static -../src/SPI.c:379:6:DrawChar 72 static -../src/SPI.c:400:6:DrawText 72 static -../src/SPI.c:408:6:DrawSolidBackground 24 static -../src/SPI.c:416:6:Fill_Gradient 48 static +../src/SPI.c:255:5:checkCollision 24 static +../src/SPI.c:262:6:Get_Color_From_Background 32 static +../src/SPI.c:274:6:Get_Color_From_Walls 24 static +../src/SPI.c:288:6:Get_Color_From_Sprite 32 static +../src/SPI.c:294:6:auto_screen_roloff 64 static +../src/SPI.c:303:5:checkInWall 24 static +../src/SPI.c:313:6:Refresh_Area 96 static +../src/SPI.c:340:6:Draw_Walls 72 static +../src/SPI.c:360:6:Refresh_Player_Area 88 static +../src/SPI.c:385:6:DrawPlayer 3144 static +../src/SPI.c:406:6:Draw_stars 32 static +../src/SPI.c:416:5:strLen 24 static +../src/SPI.c:426:6:DrawChar 72 static +../src/SPI.c:447:6:DrawText 72 static +../src/SPI.c:455:6:DrawSolidBackground 24 static +../src/SPI.c:463:6:Fill_Gradient 48 static diff --git a/Debug/src/main.o b/Debug/src/main.o index 25295b1..6f525a4 100644 Binary files a/Debug/src/main.o and b/Debug/src/main.o differ diff --git a/Debug/src/main.su b/Debug/src/main.su index 2901ad2..eb08001 100644 --- a/Debug/src/main.su +++ b/Debug/src/main.su @@ -1,16 +1,15 @@ -../src/main.c:35:6:init 8 static -../src/main.c:46:6:TIMER0_IRQHandler 8 static -../src/main.c:55:6:EINT3_IRQHandler 24 static -../src/main.c:69:6:increment_scroll 16 static -../src/main.c:78:6:SysTick_Handler 8 static -../src/main.c:88:5:number_of_digits 24 static -../src/main.c:98:6:convert_to_string 40 static -../src/main.c:109:6:scroll_array 32 static -../src/main.c:118:5:min 16 static -../src/main.c:125:5:max 16 static -../src/main.c:133:8:CreatePlayer 88 static -../src/main.c:142:6:CreateWalls 88 static -../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 +../src/main.c:37:6:init 8 static +../src/main.c:48:6:TIMER0_IRQHandler 8 static +../src/main.c:57:6:EINT3_IRQHandler 24 static +../src/main.c:76:6:increment_scroll 16 static +../src/main.c:85:6:SysTick_Handler 8 static +../src/main.c:95:5:number_of_digits 24 static +../src/main.c:105:6:convert_to_string 40 static +../src/main.c:116:6:scroll_array 32 static +../src/main.c:125:5:min 16 static +../src/main.c:132:5:max 16 static +../src/main.c:140:8:CreatePlayer 88 static +../src/main.c:149:6:CreateWalls 96 static +../src/main.c:174:6:RefreshPlayer 80 static +../src/main.c:217:6:InitGame 40 static +../src/main.c:227:5:main 112 dynamic diff --git a/src/SPI.c b/src/SPI.c index cb60726..46b0eff 100644 --- a/src/SPI.c +++ b/src/SPI.c @@ -252,7 +252,13 @@ void scroll(uint16_t scroll){ Write_Cmd_Data(first_command); Write_Cmd_Data(second_command); } - +int checkCollision(Rectangle A, Rectangle B) { + if (A.Position.X + A.Size.Width < B.Position.X || B.Position.X + B.Size.Width < A.Position.X) + return 0; + if (A.Position.Y + A.Size.Height < B.Position.Y || B.Position.Y + B.Size.Height < A.Position.Y) + return 0; + return 1; +} void Get_Color_From_Background(Point whereToLook,Color *color){ if(whereToLook.Y < 0) whereToLook.Y = whereToLook.Y % SCREEN_HEIGHT; @@ -265,7 +271,20 @@ void Get_Color_From_Background(Point whereToLook,Color *color){ color->Green = SMPTE.pixel_data[index+1]; color->Blue = SMPTE.pixel_data[index+2]; } - +void Get_Color_From_Walls(Point whereToLook,Color *color,Obstacle *walls,int wallId){ + if(whereToLook.X == walls[wallId].Hitbox.Position.X || + whereToLook.Y == walls[wallId].Hitbox.Position.Y || + whereToLook.Y == walls[wallId].Hitbox.Position.Y+walls[wallId].Hitbox.Size.Height || + whereToLook.X == walls[wallId].Hitbox.Position.X+walls[wallId].Hitbox.Size.Width){ + color->Red = 0xFF; + color->Green = 0xFF; + color->Blue = 0xFF; + }else{ + color->Red = 0; + color->Green = 0; + color->Blue = 0; + } +} void Get_Color_From_Sprite(Point whereToLook, Color *color){ int index = ((whereToLook.Y << 5)+whereToLook.X)*3; color->Red = ShipSprite1.pixel_data[index]; @@ -281,15 +300,38 @@ void auto_screen_roloff(Rectangle area,Point currentPos){ Write_Cmd(0x2C); } } - -void Refresh_Area(Rectangle area){ +int checkInWall(Obstacle wall,Point pos){ + if(pos.X >= wall.Hitbox.Position.X && + pos.X <= wall.Hitbox.Position.X + wall.Hitbox.Size.Width && + pos.Y >= wall.Hitbox.Position.Y && + pos.Y <= wall.Hitbox.Position.Y + wall.Hitbox.Size.Height){ + return 1; + }else{ + return 0; + } +} +void Refresh_Area(Rectangle area,Obstacle *walls,int number_of_walls){ Resize_Window(area); Write_Cmd(0x2C); + int inWall = 0; for(int y= 0; y < area.Size.Height;y++){ auto_screen_roloff(area,(Point){0,y}); for(int x = 0; x < area.Size.Width+1;x++){ Color color; - Get_Color_From_Background((Point){x+area.Position.X,(y+area.Position.Y)%SCREEN_HEIGHT},&color); + inWall = 0; + int wallId = 0; + for(int w = 0; w < number_of_walls;w++){ + if(checkInWall(walls[w],(Point){x + area.Position.X,y+area.Position.Y})){ + inWall = 1; + wallId = w; + } + } + if(inWall){ + Get_Color_From_Walls((Point){x+area.Position.X,(y+area.Position.Y)%SCREEN_HEIGHT},&color,walls,wallId); + }else{ + Get_Color_From_Background((Point){x+area.Position.X,(y+area.Position.Y)%SCREEN_HEIGHT},&color); + } + SendPixel(color.Red,color.Green,color.Blue); } } @@ -304,7 +346,12 @@ void Draw_Walls(Obstacle *walls,int numberOfWalls){ for(int y = 0; y < currentRect.Size.Height;y++){ auto_screen_roloff(currentRect,(Point){0,y}); for(int x = 0; x < currentRect.Size.Width+1; x++){ - SendPixel(0,0,0); + if( x == 0 || y == 0 || y == currentRect.Size.Height-1 || x == currentRect.Size.Width){ + SendPixel(0xFF,0xFF,0xFF); + }else{ + SendPixel(0,0,0); + } + } } } diff --git a/src/SPI.h b/src/SPI.h index b2af9a3..0d47ad7 100644 --- a/src/SPI.h +++ b/src/SPI.h @@ -39,10 +39,9 @@ typedef struct Obstacle_t{ }Obstacle; void ILI9341_Initial(void); -void Refresh_Area(Rectangle area); void Draw_stars(); void Resize_Window(Rectangle area); -void Refresh_Area(Rectangle area); +void Refresh_Area(Rectangle area,Obstacle *walls,int number_of_walls); void DrawPlayer(Player player, Rectangle areaToDraw); void DrawText(Point starting_point,char text[],Size charSize); void Refresh_Player_Area(Rectangle area,Rectangle Hitbox); diff --git a/src/main.c b/src/main.c index 7581dac..cb7a0e4 100644 --- a/src/main.c +++ b/src/main.c @@ -24,12 +24,14 @@ const Rectangle SCREEN = {SCREEN_ORIGIN,SCREEN_SIZE}; Point momentum = {0,0}; int numberOfWalls = 6; -Size maxWallSize = {50,50}; +Size defaultWallSize = {32,32}; Obstacle walls[6]; int seed = 1234567; int maxPlayerSpeed = 7; int score = 0; +int hitboxActivated = 1; + Player player; void init(void) @@ -59,6 +61,11 @@ void EINT3_IRQHandler(void){ momentum = (Point){0,0}; }else{ //button B pressed + if(hitboxActivated){ + hitboxActivated = 0; + }else{ + hitboxActivated = 1; + } } ClearButtons(); } @@ -140,21 +147,30 @@ Player CreatePlayer(){ return player; } void CreateWalls(){ + int loadedWalls = 0; for(int i =0; i < numberOfWalls;i++){ - int x = rand() % SCREEN_SIZE.Width; + int x = rand() % (SCREEN_SIZE.Width - defaultWallSize.Width - 1)+1; int y = rand() % SCREEN_SIZE.Height; - int width = rand() % maxWallSize.Width; - int height = rand() % maxWallSize.Height; - walls[i] = (Obstacle){(Rectangle){(Point){x,y},(Size){max(width,height),max(width,height)}}}; + Rectangle rect = {(Point){x,y},defaultWallSize}; + + int positionalConflict = 0; + //Check for potentials conflicts between walls + for(int j = 0; j < loadedWalls; j++){ + if(checkCollision(walls[j].Hitbox,rect)) + positionalConflict = 1; + } + if(checkCollision(player.Hitbox,rect)) + positionalConflict = 1; + + if(positionalConflict){ + i--; + }else{ + walls[i] = (Obstacle){rect}; + loadedWalls ++; + } } } -int checkCollision(Rectangle A, Rectangle B) { - if (A.Position.X + A.Size.Width < B.Position.X || B.Position.X + B.Size.Width < A.Position.X) - return 0; - if (A.Position.Y + A.Size.Height < B.Position.Y || B.Position.Y + B.Size.Height < A.Position.Y) - return 0; - return 1; -} + void RefreshPlayer(Point vector){ if(player.Hitbox.Position.Y + vector.Y < 0){ player.Hitbox.Position.Y = SCREEN_SIZE.Height + (player.Hitbox.Position.Y - (0-vector.Y)); @@ -191,12 +207,11 @@ void RefreshPlayer(Point vector){ for(int i = 0; i < numberOfWalls; i++){ - if(checkCollision(player.Hitbox,walls[i].Hitbox)) + if(checkCollision(player.Hitbox,walls[i].Hitbox) && hitboxActivated) InitGame(); } Refresh_Player_Area((Rectangle){bigPos,bigSize},player.Hitbox); - } void InitGame(){ @@ -218,7 +233,6 @@ int main(void) { int increment = 1; Size charSize = {7,11}; - InitGame(); while (true) @@ -253,7 +267,8 @@ int main(void) { Point new_origin = {text_origin.X,(text_origin.Y + scrolling)%320}; Rectangle areaToRefresh = {{new_origin.X,new_origin.Y+3},{charSize.Width*digits,charSize.Height+charSize.Height/2}}; - Refresh_Area(areaToRefresh); + //Refresh_Area(areaToRefresh); + Refresh_Area(areaToRefresh,walls,numberOfWalls); DrawText(new_origin,newStr,charSize); }