correction bug collision horizontale

This commit is contained in:
Tituya 2020-06-28 15:05:07 +02:00
parent 2326e202fd
commit af2a74322c
10 changed files with 283 additions and 287 deletions

BIN
AST3.g3a

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -165,9 +165,9 @@ LOAD /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a
LOAD /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a
LOAD /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/m4-nofpu/libgcc.a
0x0000000000300000 _brom = 0x300000
0x0000000000005440 _srom = (((SIZEOF (.text) + SIZEOF (.rodata)) + SIZEOF (.gint.drivers)) + SIZEOF (.gint.blocks))
0x0000000000005420 _srom = (((SIZEOF (.text) + SIZEOF (.rodata)) + SIZEOF (.gint.drivers)) + SIZEOF (.gint.blocks))
.text 0x0000000000300000 0x42a0
.text 0x0000000000300000 0x4280
*(.text.entry)
.text.entry 0x0000000000300000 0x12c /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(start.c.o)
0x0000000000300000 _start
@ -190,296 +190,296 @@ LOAD /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/m4-nofpu/libgc
0x00000000003001a0 _gint_tlbh
0x0000000000000074 _gint_tlbh_size = ABSOLUTE ((. - _gint_tlbh_start))
*(.text .text.*)
.text 0x0000000000300208 0x12a build-cg/src/collide.c.o
.text 0x0000000000300208 0x116 build-cg/src/collide.c.o
0x0000000000300208 _collide
0x00000000003002a0 _collide_solid
*fill* 0x0000000000300332 0x2
.text 0x0000000000300334 0x90 build-cg/src/drawlevel.c.o
0x0000000000300334 _draw_player
0x0000000000300344 _draw_level
.text 0x00000000003003c4 0x0 build-cg/src/main.c.o
.text.startup 0x00000000003003c4 0x2e4 build-cg/src/main.c.o
0x00000000003003c4 _main
.text 0x00000000003006a8 0x30 build-cg/src/setlevel.c.o
0x00000000003006a8 _set_level
.text 0x00000000003006d8 0xdc /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(memory.c.o)
0x00000000003006d8 _memcpy
0x0000000000300792 __memmove
0x0000000000300796 __memcmp
0x000000000030079a _memset
.text 0x00000000003007b4 0x7c /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(string.c.o)
0x00000000003007b4 _strlen
0x00000000003007c4 _strncpy
0x00000000003007dc _strcat
0x0000000000300820 _strcmp
.text 0x0000000000300830 0x3c /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(dupdate.c.o)
0x0000000000300830 _dupdate
0x0000000000300854 _dupdate_noint
.text 0x000000000030086c 0x1c /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(dclear.c.o)
0x000000000030086c _dclear
.text 0x0000000000300888 0x40 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(dimage.c.o)
0x0000000000300888 _dimage
0x00000000003008b0 _dsubimage
.text 0x00000000003008c8 0x6c /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(dvram.c.o)
0x00000000003008c8 _dsetvram
0x00000000003008f4 _dgetvram
0x0000000000300914 _dvram_switch
.text 0x0000000000300934 0x1e4 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(bopti.c.o)
0x0000000000300934 _bopti_render
0x0000000000300a24 _bopti_render_clip
0x0000000000300aec _bopti_render_noclip
.text 0x0000000000300b18 0xbc /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(dprint.c.o)
0x0000000000300b18 _dprint_opt
0x0000000000300b84 _dprint
.text 0x0000000000300bd4 0x2d4 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(r61524.c.o)
0x0000000000300c24 _r61524_win_get
0x0000000000300cdc _r61524_win_set
0x0000000000300d9c _r61524_display
.text 0x0000000000300ea8 0x420 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(dma.c.o)
0x0000000000301178 _dma_transfer
0x00000000003011b8 _dma_transfer_wait
0x000000000030125c _dma_transfer_noint
.text 0x00000000003012c8 0x0 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(inth.s.o)
.text 0x00000000003012c8 0x4c /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(memset.c.o)
0x00000000003012c8 _dma_memset
.text 0x0000000000301314 0xf4 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(intc.c.o)
0x0000000000301390 _intc_priority
.text 0x0000000000301408 0x30 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(start.c.o)
.text 0x0000000000301438 0x29c /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(exch.c.o)
0x00000000003016a4 _gint_panic
0x00000000003016b4 _gint_panic_set
0x00000000003016c8 _gint_exc_catch
.text 0x00000000003016d4 0x40 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(hardware.c.o)
0x00000000003016d4 _hw_detect
.text 0x0000000000301714 0x2b8 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(kernel.c.o)
0x0000000000301890 _kinit
0x0000000000301924 _gint_inthandler
0x0000000000301954 _gint_switch
0x00000000003019a4 _kquit
.text 0x00000000003019cc 0x0 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(tlbh.S.o)
.text 0x00000000003019cc 0x424 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(keysc.c.o)
0x0000000000301ba4 _pollevent
0x0000000000301ce0 _waitevent
0x0000000000301d2c _clearevents
0x0000000000301d4c _keydown
0x0000000000301d78 _keydown_all
0x0000000000301db4 _keydown_any
.text 0x0000000000301df0 0x1f8 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(getkey.c.o)
0x0000000000301df0 _getkey_opt
0x0000000000301fa0 _getkey
0x0000000000301fac _getkey_repeat
.text 0x0000000000301fe8 0x69c /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(tmu.c.o)
0x00000000003022b4 _timer_delay
0x0000000000302360 _timer_setup
0x0000000000302560 _timer_start
0x0000000000302598 _timer_reload
0x00000000003025d0 _timer_pause
0x000000000030260c _timer_wait
0x0000000000302674 _timer_timeout
.text 0x0000000000302684 0x0 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(inth.s.o)
.text 0x0000000000302684 0xcec /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(stdio.c.o)
0x0000000000303080 _kprint_opt
0x00000000003031c8 _kprint
0x00000000003032a8 _kvsprint
0x00000000003032f0 _sprintf
0x0000000000303318 _vsprintf
0x0000000000303338 _snprintf
0x0000000000303358 _vsnprintf
.text 0x0000000000303370 0xb8 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(cpg.c.o)
0x000000000030341c _clock_freq
*fill* 0x0000000000303428 0x8
.text 0x0000000000303430 0x100 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(bopti-asm.s.o)
0x0000000000303430 _bopti_r5g6b5
0x0000000000303480 _bopti_r5g6b5a
0x00000000003034b0 _bopti_p8
0x00000000003034e0 _bopti_p4
.text 0x0000000000303530 0x2b4 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(topti.c.o)
0x0000000000303530 _topti_render
0x0000000000303720 _dtext_opt
0x00000000003037c4 _dtext
.text 0x00000000003037e4 0x1ac /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(topti.c.o)
0x00000000003037e4 _dfont
0x00000000003037fc _charset_size
0x0000000000303828 _charset_decode
0x0000000000303896 _topti_offset
0x00000000003038f4 _dsize
.text 0x0000000000303990 0x30 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(cpu.s.o)
0x0000000000303990 _cpu_setCPUOPM
0x00000000003039a2 _cpu_getCPUOPM
.text 0x00000000003039c0 0x0 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(exch.s.o)
.text 0x00000000003039c0 0xfc /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(osmenu.c.o)
0x0000000000303aac _gint_osmenu
*fill* 0x0000000000303abc 0x4
.text 0x0000000000303ac0 0x190 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(syscalls.S.o)
0x0000000000303ac0 _malloc
0x0000000000303ad4 _free
0x0000000000303ae4 _calloc
0x0000000000303af4 _realloc
0x0000000000303b04 _BFile_Remove
0x0000000000303b14 _BFile_Create
0x0000000000303b24 _BFile_Open
0x0000000000303b34 _BFile_Close
0x0000000000303b44 _BFile_Size
0x0000000000303b54 _BFile_Write
0x0000000000303b64 _BFile_Read
0x0000000000303b74 _BFile_FindFirst
0x0000000000303b84 _BFile_FindNext
0x0000000000303b94 _BFile_FindClose
0x0000000000303ba4 ___Timer_Install
0x0000000000303bb4 ___Timer_Start
0x0000000000303bc4 ___Timer_Stop
0x0000000000303bd4 ___Timer_Deinstall
0x0000000000303be4 ___PutKeyCode
0x0000000000303bf4 ___GetKeyWait
0x0000000000303c04 ___ClearKeyBuffer
0x0000000000303c14 ___GetVRAMAddress
0x0000000000303c24 ___ConfigureStatusArea
0x0000000000303c34 ___SpecialMatrixCodeProcessing
.text 0x0000000000303c50 0x0 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(inth.S.o)
.text 0x0000000000303c50 0xc0 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(drect.c.o)
0x0000000000303c50 _drect
.text 0x0000000000303d10 0xd0 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(topti-asm.s.o)
0x0000000000303d10 _topti_glyph_fg_bg
0x0000000000303d4e _topti_glyph_fg
0x0000000000303d88 _topti_glyph_bg
.text 0x0000000000303de0 0x78 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/m4-nofpu/libgcc.a(_movmem.o)
0x0000000000303de0 ___movstr
0x0000000000303de0 ___movmem
0x0000000000303e14 ___movmemSI64
0x0000000000303e14 ___movstrSI64
0x0000000000303e18 ___movstrSI60
0x0000000000303e18 ___movmemSI60
0x0000000000303e1c ___movmemSI56
0x0000000000303e1c ___movstrSI56
0x0000000000303e20 ___movstrSI52
0x0000000000303e20 ___movmemSI52
0x0000000000303e24 ___movstrSI48
0x0000000000303e24 ___movmemSI48
0x0000000000303e28 ___movstrSI44
0x0000000000303e28 ___movmemSI44
0x0000000000303e2c ___movstrSI40
0x0000000000303e2c ___movmemSI40
0x0000000000303e30 ___movstrSI36
0x0000000000303e30 ___movmemSI36
0x0000000000303e34 ___movmemSI32
0x0000000000303e34 ___movstrSI32
0x0000000000303e38 ___movmemSI28
0x0000000000303e38 ___movstrSI28
0x0000000000303e3c ___movstrSI24
0x0000000000303e3c ___movmemSI24
0x0000000000303e40 ___movmemSI20
0x0000000000303e40 ___movstrSI20
0x0000000000303e44 ___movstrSI16
0x0000000000303e44 ___movmemSI16
0x0000000000303e48 ___movmemSI12
0x0000000000303e48 ___movstrSI12
0x0000000000303e4c ___movmemSI8
0x0000000000303e4c ___movstrSI8
0x0000000000303e50 ___movmemSI4
0x0000000000303e50 ___movstrSI4
.text 0x0000000000303e58 0x1e0 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/m4-nofpu/libgcc.a(_udivdi3.o)
0x0000000000303e58 ___udivdi3
.text 0x0000000000304038 0x208 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/m4-nofpu/libgcc.a(_umoddi3.o)
0x0000000000304038 ___umoddi3
.text 0x0000000000304240 0x60 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/m4-nofpu/libgcc.a(_udiv_qrnnd_16.o)
0x0000000000304240 ___udiv_qrnnd_16
.text 0x00000000003042a0 0x0 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/m4-nofpu/libgcc.a(_clz.o)
*fill* 0x000000000030031e 0x2
.text 0x0000000000300320 0x90 build-cg/src/drawlevel.c.o
0x0000000000300320 _draw_player
0x0000000000300330 _draw_level
.text 0x00000000003003b0 0x0 build-cg/src/main.c.o
.text.startup 0x00000000003003b0 0x2d4 build-cg/src/main.c.o
0x00000000003003b0 _main
.text 0x0000000000300684 0x30 build-cg/src/setlevel.c.o
0x0000000000300684 _set_level
.text 0x00000000003006b4 0xdc /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(memory.c.o)
0x00000000003006b4 _memcpy
0x000000000030076e __memmove
0x0000000000300772 __memcmp
0x0000000000300776 _memset
.text 0x0000000000300790 0x7c /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(string.c.o)
0x0000000000300790 _strlen
0x00000000003007a0 _strncpy
0x00000000003007b8 _strcat
0x00000000003007fc _strcmp
.text 0x000000000030080c 0x3c /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(dupdate.c.o)
0x000000000030080c _dupdate
0x0000000000300830 _dupdate_noint
.text 0x0000000000300848 0x1c /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(dclear.c.o)
0x0000000000300848 _dclear
.text 0x0000000000300864 0x40 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(dimage.c.o)
0x0000000000300864 _dimage
0x000000000030088c _dsubimage
.text 0x00000000003008a4 0x6c /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(dvram.c.o)
0x00000000003008a4 _dsetvram
0x00000000003008d0 _dgetvram
0x00000000003008f0 _dvram_switch
.text 0x0000000000300910 0x1e4 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(bopti.c.o)
0x0000000000300910 _bopti_render
0x0000000000300a00 _bopti_render_clip
0x0000000000300ac8 _bopti_render_noclip
.text 0x0000000000300af4 0xbc /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(dprint.c.o)
0x0000000000300af4 _dprint_opt
0x0000000000300b60 _dprint
.text 0x0000000000300bb0 0x2d4 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(r61524.c.o)
0x0000000000300c00 _r61524_win_get
0x0000000000300cb8 _r61524_win_set
0x0000000000300d78 _r61524_display
.text 0x0000000000300e84 0x420 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(dma.c.o)
0x0000000000301154 _dma_transfer
0x0000000000301194 _dma_transfer_wait
0x0000000000301238 _dma_transfer_noint
.text 0x00000000003012a4 0x0 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(inth.s.o)
.text 0x00000000003012a4 0x4c /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(memset.c.o)
0x00000000003012a4 _dma_memset
.text 0x00000000003012f0 0xf4 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(intc.c.o)
0x000000000030136c _intc_priority
.text 0x00000000003013e4 0x30 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(start.c.o)
.text 0x0000000000301414 0x29c /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(exch.c.o)
0x0000000000301680 _gint_panic
0x0000000000301690 _gint_panic_set
0x00000000003016a4 _gint_exc_catch
.text 0x00000000003016b0 0x40 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(hardware.c.o)
0x00000000003016b0 _hw_detect
.text 0x00000000003016f0 0x2b8 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(kernel.c.o)
0x000000000030186c _kinit
0x0000000000301900 _gint_inthandler
0x0000000000301930 _gint_switch
0x0000000000301980 _kquit
.text 0x00000000003019a8 0x0 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(tlbh.S.o)
.text 0x00000000003019a8 0x424 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(keysc.c.o)
0x0000000000301b80 _pollevent
0x0000000000301cbc _waitevent
0x0000000000301d08 _clearevents
0x0000000000301d28 _keydown
0x0000000000301d54 _keydown_all
0x0000000000301d90 _keydown_any
.text 0x0000000000301dcc 0x1f8 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(getkey.c.o)
0x0000000000301dcc _getkey_opt
0x0000000000301f7c _getkey
0x0000000000301f88 _getkey_repeat
.text 0x0000000000301fc4 0x69c /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(tmu.c.o)
0x0000000000302290 _timer_delay
0x000000000030233c _timer_setup
0x000000000030253c _timer_start
0x0000000000302574 _timer_reload
0x00000000003025ac _timer_pause
0x00000000003025e8 _timer_wait
0x0000000000302650 _timer_timeout
.text 0x0000000000302660 0x0 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(inth.s.o)
.text 0x0000000000302660 0xcec /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(stdio.c.o)
0x000000000030305c _kprint_opt
0x00000000003031a4 _kprint
0x0000000000303284 _kvsprint
0x00000000003032cc _sprintf
0x00000000003032f4 _vsprintf
0x0000000000303314 _snprintf
0x0000000000303334 _vsnprintf
.text 0x000000000030334c 0xb8 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(cpg.c.o)
0x00000000003033f8 _clock_freq
*fill* 0x0000000000303404 0xc
.text 0x0000000000303410 0x100 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(bopti-asm.s.o)
0x0000000000303410 _bopti_r5g6b5
0x0000000000303460 _bopti_r5g6b5a
0x0000000000303490 _bopti_p8
0x00000000003034c0 _bopti_p4
.text 0x0000000000303510 0x2b4 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(topti.c.o)
0x0000000000303510 _topti_render
0x0000000000303700 _dtext_opt
0x00000000003037a4 _dtext
.text 0x00000000003037c4 0x1ac /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(topti.c.o)
0x00000000003037c4 _dfont
0x00000000003037dc _charset_size
0x0000000000303808 _charset_decode
0x0000000000303876 _topti_offset
0x00000000003038d4 _dsize
.text 0x0000000000303970 0x30 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(cpu.s.o)
0x0000000000303970 _cpu_setCPUOPM
0x0000000000303982 _cpu_getCPUOPM
.text 0x00000000003039a0 0x0 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(exch.s.o)
.text 0x00000000003039a0 0xfc /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(osmenu.c.o)
0x0000000000303a8c _gint_osmenu
*fill* 0x0000000000303a9c 0x4
.text 0x0000000000303aa0 0x190 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(syscalls.S.o)
0x0000000000303aa0 _malloc
0x0000000000303ab4 _free
0x0000000000303ac4 _calloc
0x0000000000303ad4 _realloc
0x0000000000303ae4 _BFile_Remove
0x0000000000303af4 _BFile_Create
0x0000000000303b04 _BFile_Open
0x0000000000303b14 _BFile_Close
0x0000000000303b24 _BFile_Size
0x0000000000303b34 _BFile_Write
0x0000000000303b44 _BFile_Read
0x0000000000303b54 _BFile_FindFirst
0x0000000000303b64 _BFile_FindNext
0x0000000000303b74 _BFile_FindClose
0x0000000000303b84 ___Timer_Install
0x0000000000303b94 ___Timer_Start
0x0000000000303ba4 ___Timer_Stop
0x0000000000303bb4 ___Timer_Deinstall
0x0000000000303bc4 ___PutKeyCode
0x0000000000303bd4 ___GetKeyWait
0x0000000000303be4 ___ClearKeyBuffer
0x0000000000303bf4 ___GetVRAMAddress
0x0000000000303c04 ___ConfigureStatusArea
0x0000000000303c14 ___SpecialMatrixCodeProcessing
.text 0x0000000000303c30 0x0 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(inth.S.o)
.text 0x0000000000303c30 0xc0 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(drect.c.o)
0x0000000000303c30 _drect
.text 0x0000000000303cf0 0xd0 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(topti-asm.s.o)
0x0000000000303cf0 _topti_glyph_fg_bg
0x0000000000303d2e _topti_glyph_fg
0x0000000000303d68 _topti_glyph_bg
.text 0x0000000000303dc0 0x78 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/m4-nofpu/libgcc.a(_movmem.o)
0x0000000000303dc0 ___movstr
0x0000000000303dc0 ___movmem
0x0000000000303df4 ___movmemSI64
0x0000000000303df4 ___movstrSI64
0x0000000000303df8 ___movstrSI60
0x0000000000303df8 ___movmemSI60
0x0000000000303dfc ___movmemSI56
0x0000000000303dfc ___movstrSI56
0x0000000000303e00 ___movstrSI52
0x0000000000303e00 ___movmemSI52
0x0000000000303e04 ___movstrSI48
0x0000000000303e04 ___movmemSI48
0x0000000000303e08 ___movstrSI44
0x0000000000303e08 ___movmemSI44
0x0000000000303e0c ___movstrSI40
0x0000000000303e0c ___movmemSI40
0x0000000000303e10 ___movstrSI36
0x0000000000303e10 ___movmemSI36
0x0000000000303e14 ___movmemSI32
0x0000000000303e14 ___movstrSI32
0x0000000000303e18 ___movmemSI28
0x0000000000303e18 ___movstrSI28
0x0000000000303e1c ___movstrSI24
0x0000000000303e1c ___movmemSI24
0x0000000000303e20 ___movmemSI20
0x0000000000303e20 ___movstrSI20
0x0000000000303e24 ___movstrSI16
0x0000000000303e24 ___movmemSI16
0x0000000000303e28 ___movmemSI12
0x0000000000303e28 ___movstrSI12
0x0000000000303e2c ___movmemSI8
0x0000000000303e2c ___movstrSI8
0x0000000000303e30 ___movmemSI4
0x0000000000303e30 ___movstrSI4
.text 0x0000000000303e38 0x1e0 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/m4-nofpu/libgcc.a(_udivdi3.o)
0x0000000000303e38 ___udivdi3
.text 0x0000000000304018 0x208 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/m4-nofpu/libgcc.a(_umoddi3.o)
0x0000000000304018 ___umoddi3
.text 0x0000000000304220 0x60 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/m4-nofpu/libgcc.a(_udiv_qrnnd_16.o)
0x0000000000304220 ___udiv_qrnnd_16
.text 0x0000000000304280 0x0 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/m4-nofpu/libgcc.a(_clz.o)
.gint.blocks 0x00000000003042a0 0x160
.gint.blocks 0x0000000000304280 0x160
*(.gint.blocks)
.gint.blocks 0x00000000003042a0 0x40 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(inth.s.o)
0x00000000003042a0 _inth_dma_te
0x00000000003042c0 _inth_dma_ae
.gint.blocks 0x00000000003042e0 0xe0 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(inth.s.o)
0x00000000003042e0 _inth_tmu
0x0000000000304360 _inth_etmu2
0x0000000000304380 _inth_etmu_help
0x00000000003043a0 _inth_etmux
.gint.blocks 0x00000000003043c0 0x40 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(inth.S.o)
0x00000000003043c0 _gint_inth_7305
.gint.blocks 0x0000000000304280 0x40 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(inth.s.o)
0x0000000000304280 _inth_dma_te
0x00000000003042a0 _inth_dma_ae
.gint.blocks 0x00000000003042c0 0xe0 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(inth.s.o)
0x00000000003042c0 _inth_tmu
0x0000000000304340 _inth_etmu2
0x0000000000304360 _inth_etmu_help
0x0000000000304380 _inth_etmux
.gint.blocks 0x00000000003043a0 0x40 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(inth.S.o)
0x00000000003043a0 _gint_inth_7305
.gint.drivers 0x0000000000304400 0xc0
0x0000000000304400 _bdrv = .
.gint.drivers 0x00000000003043e0 0xc0
0x00000000003043e0 _bdrv = .
*(.gint.drivers.0)
.gint.drivers.0
0x0000000000304400 0x20 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(intc.c.o)
0x0000000000304400 _drv_intc
0x00000000003043e0 0x20 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(intc.c.o)
0x00000000003043e0 _drv_intc
*(.gint.drivers.1)
.gint.drivers.1
0x0000000000304420 0x20 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(cpg.c.o)
0x0000000000304420 _drv_cpg
0x0000000000304400 0x20 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(cpg.c.o)
0x0000000000304400 _drv_cpg
*(.gint.drivers.2)
.gint.drivers.2
0x0000000000304440 0x20 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(dma.c.o)
0x0000000000304440 _drv_dma0
0x0000000000304420 0x20 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(dma.c.o)
0x0000000000304420 _drv_dma0
.gint.drivers.2
0x0000000000304460 0x20 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(tmu.c.o)
0x0000000000304460 _drv_tmu
0x0000000000304440 0x20 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(tmu.c.o)
0x0000000000304440 _drv_tmu
*(.gint.drivers.3)
*(.gint.drivers.4)
.gint.drivers.4
0x0000000000304480 0x20 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(keysc.c.o)
0x0000000000304480 _drv_keysc
0x0000000000304460 0x20 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(keysc.c.o)
0x0000000000304460 _drv_keysc
*(.gint.drivers.5)
.gint.drivers.5
0x00000000003044a0 0x20 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(r61524.c.o)
0x00000000003044a0 _drv_r61524
0x0000000000304480 0x20 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(r61524.c.o)
0x0000000000304480 _drv_r61524
*(.gint.drivers.6)
0x00000000003044c0 _edrv = .
0x00000000003044a0 _edrv = .
.rodata 0x00000000003044c0 0xf80
.rodata 0x00000000003044a0 0xf80
*(.rodata.4)
*(.rodata .rodata.*)
.rodata.str1.4
0x00000000003044c0 0x7 build-cg/src/main.c.o
*fill* 0x00000000003044c7 0x1
0x00000000003044a0 0x7 build-cg/src/main.c.o
*fill* 0x00000000003044a7 0x1
.rodata.str1.4
0x00000000003044c8 0x16a build-cg/src/setlevel.c.o
*fill* 0x0000000000304632 0x2
.rodata 0x0000000000304634 0x208 build-cg/assets/img/solid_1.png.o
0x0000000000304634 _img_solid_1
0x000000000030483c _img_solid_1_end
.rodata 0x000000000030483c 0x128 build-cg/assets/img/player.png.o
0x000000000030483c _img_player
0x0000000000304964 _img_player_end
.rodata 0x0000000000304964 0x208 build-cg/assets/img/solid_0.png.o
0x0000000000304964 _img_solid_0
0x0000000000304b6c _img_solid_0_end
0x00000000003044a8 0x16a build-cg/src/setlevel.c.o
*fill* 0x0000000000304612 0x2
.rodata 0x0000000000304614 0x208 build-cg/assets/img/solid_1.png.o
0x0000000000304614 _img_solid_1
0x000000000030481c _img_solid_1_end
.rodata 0x000000000030481c 0x128 build-cg/assets/img/player.png.o
0x000000000030481c _img_player
0x0000000000304944 _img_player_end
.rodata 0x0000000000304944 0x208 build-cg/assets/img/solid_0.png.o
0x0000000000304944 _img_solid_0
0x0000000000304b4c _img_solid_0_end
.rodata.str1.4
0x0000000000304b6c 0x7 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(r61524.c.o)
*fill* 0x0000000000304b73 0x1
.rodata 0x0000000000304b74 0x30 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(dma.c.o)
0x0000000000304b4c 0x7 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(r61524.c.o)
*fill* 0x0000000000304b53 0x1
.rodata 0x0000000000304b54 0x30 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(dma.c.o)
.rodata.str1.4
0x0000000000304ba4 0x5 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(dma.c.o)
*fill* 0x0000000000304ba9 0x3
0x0000000000304b84 0x5 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(dma.c.o)
*fill* 0x0000000000304b89 0x3
.rodata.str1.4
0x0000000000304bac 0x5 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(intc.c.o)
*fill* 0x0000000000304bb1 0x3
0x0000000000304b8c 0x5 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(intc.c.o)
*fill* 0x0000000000304b91 0x3
.rodata.str1.4
0x0000000000304bb4 0x288 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(exch.c.o)
0x0000000000304b94 0x288 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(exch.c.o)
0x28c (size before relaxing)
.rodata.str1.4
0x0000000000304e3c 0x6 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(keysc.c.o)
*fill* 0x0000000000304e42 0x2
.rodata 0x0000000000304e44 0xc /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(tmu.c.o)
0x0000000000304e1c 0x6 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(keysc.c.o)
*fill* 0x0000000000304e22 0x2
.rodata 0x0000000000304e24 0xc /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(tmu.c.o)
.rodata.str1.4
0x0000000000304e50 0x4 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(tmu.c.o)
0x0000000000304e30 0x4 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(tmu.c.o)
.rodata.str1.4
0x0000000000304e54 0x31 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(stdio.c.o)
*fill* 0x0000000000304e85 0x3
0x0000000000304e34 0x31 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(stdio.c.o)
*fill* 0x0000000000304e65 0x3
.rodata.str1.4
0x0000000000304e88 0x4 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(cpg.c.o)
.rodata 0x0000000000304e8c 0x18 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(topti.c.o)
.rodata 0x0000000000304ea4 0x49c /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(font8x9.png.o)
0x0000000000304ea4 _gint_font8x9
0x0000000000305340 _gint_font8x9_end
.rodata 0x0000000000305340 0x100 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/m4-nofpu/libgcc.a(_clz.o)
0x0000000000305340 ___clz_tab
0x0000000000304e68 0x4 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(cpg.c.o)
.rodata 0x0000000000304e6c 0x18 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(topti.c.o)
.rodata 0x0000000000304e84 0x49c /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(font8x9.png.o)
0x0000000000304e84 _gint_font8x9
0x0000000000305320 _gint_font8x9_end
.rodata 0x0000000000305320 0x100 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/m4-nofpu/libgcc.a(_clz.o)
0x0000000000305320 ___clz_tab
.rela.dyn 0x0000000000305440 0x0
.rela.text 0x0000000000305440 0x0 build-cg/src/drawlevel.c.o
.rela.dyn 0x0000000000305420 0x0
.rela.text 0x0000000000305420 0x0 build-cg/src/drawlevel.c.o
.rela.text.entry
0x0000000000305440 0x0 build-cg/src/drawlevel.c.o
0x0000000000305420 0x0 build-cg/src/drawlevel.c.o
0x0000000008101400 . = ORIGIN (ram)
.bss 0x0000000008101400 0x150
@ -532,8 +532,8 @@ LOAD /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/m4-nofpu/libgc
*fill* 0x0000000008101548 0x8
0x0000000000000150 _sbss = SIZEOF (.bss)
.data 0x0000000008101550 0x170 load address 0x0000000000305440
0x0000000000305440 _ldata = LOADADDR (.data)
.data 0x0000000008101550 0x170 load address 0x0000000000305420
0x0000000000305420 _ldata = LOADADDR (.data)
0x0000000008101550 _rdata = .
*(.data .data.*)
.data 0x0000000008101550 0x0 build-cg/src/collide.c.o
@ -587,14 +587,14 @@ LOAD /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/m4-nofpu/libgc
0x00000000081016c0 . = ALIGN (0x10)
*fill* 0x00000000081016b8 0x8
.data.4 0x00000000081016c0 0x0 load address 0x00000000003055b0
.data.4 0x00000000081016c0 0x0 load address 0x0000000000305590
*(.data.4)
0x00000000081016c0 . = ALIGN (0x10)
0x0000000000000170 _sdata = (SIZEOF (.data) + SIZEOF (.data.4))
0x00000000e5200000 . = ORIGIN (ilram)
.ilram 0x00000000e5200000 0x160 load address 0x00000000003055b0
0x00000000003055b0 _lilram = LOADADDR (.ilram)
.ilram 0x00000000e5200000 0x160 load address 0x0000000000305590
0x0000000000305590 _lilram = LOADADDR (.ilram)
0x00000000e5200000 _rilram = .
*(.ilram)
.ilram 0x00000000e5200000 0x20 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(memset.c.o)
@ -613,15 +613,15 @@ LOAD /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/m4-nofpu/libgc
*fill* 0x00000000e5200154 0xc
0x00000000e5007000 . = ORIGIN (xram)
.xram 0x00000000e5007000 0x0 load address 0x0000000000305710
0x0000000000305710 _lxram = LOADADDR (.xram)
.xram 0x00000000e5007000 0x0 load address 0x00000000003056f0
0x00000000003056f0 _lxram = LOADADDR (.xram)
0x00000000e5007000 _rxram = .
*(.xram)
0x00000000e5007000 . = ALIGN (0x10)
0x00000000e5017000 . = ORIGIN (yram)
.yram 0x00000000e5017000 0x0 load address 0x0000000000305710
0x0000000000305710 _lyram = LOADADDR (.yram)
.yram 0x00000000e5017000 0x0 load address 0x00000000003056f0
0x00000000003056f0 _lyram = LOADADDR (.yram)
0x00000000e5017000 _ryram = .
*(.yram)
0x00000000e5017000 . = ALIGN (0x10)
@ -632,8 +632,8 @@ LOAD /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/m4-nofpu/libgc
0x000000008815ff00 _gint_vbr_fxcg20 = (ORIGIN (vbr20) - 0x100)
0x00000000081016c0 . = ((ORIGIN (ram) + _sbss) + _sdata)
.gint.data 0x00000000081016c0 0xa0 load address 0x0000000000305710
0x0000000000305710 _lgdata = LOADADDR (.gint.data)
.gint.data 0x00000000081016c0 0xa0 load address 0x00000000003056f0
0x00000000003056f0 _lgdata = LOADADDR (.gint.data)
0x00000000081016c0 _rgdata = .
*(.gint.data .gint.data.*)
.gint.data 0x00000000081016c0 0x8 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(r61524.c.o)
@ -651,7 +651,7 @@ LOAD /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/m4-nofpu/libgc
*fill* 0x0000000008101758 0x8
0x00000000000000a0 _sgdata = SIZEOF (.gint.data)
.gint.bss 0x0000000008101760 0x530 load address 0x00000000003057b0
.gint.bss 0x0000000008101760 0x530 load address 0x0000000000305790
*(.gint.bss .gint.bss.*)
.gint.bss 0x0000000008101760 0x10 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(r61524.c.o)
.gint.bss 0x0000000008101770 0xd0 /home/benjamingr/Documents/casio/gcc/lib/gcc/sh3eb-elf/9.3.0/libgint-cg.a(dma.c.o)

Binary file not shown.

Binary file not shown.

View File

@ -1,3 +1,3 @@
#define PLAYER_SPEED 2
#define PLAYER_GRAVITY 5
#define PLAYER_GRAVITY 4
#define PLAYER_HEIGHT 12

View File

@ -5,14 +5,14 @@
int collide(int x, int y, char block, char level[], char gravity)
{
if((level[(int)(x/16)+(int)((y-1)/16*25)] == block ||
level[(int)((x+PLAYER_HEIGHT)/16)+(int)((y-1)/16*25)] == block) && !gravity) //return true if player is touching a block on top of him
level[(int)((x+PLAYER_HEIGHT-1)/16)+(int)((y-1)/16*25)] == block) && gravity) //return true if player is touching a block on top of him
{
return 1;
}
else if((level[(int)(x/16)+(int)((y+PLAYER_HEIGHT)/16*25)] == block ||
level[(int)((x+PLAYER_HEIGHT)/16)+(int)((y+PLAYER_HEIGHT)/16*25)] == block) && gravity) //return true if player is touching a block on the bottom of him
level[(int)((x+PLAYER_HEIGHT-1)/16)+(int)((y+PLAYER_HEIGHT)/16*25)] == block) && !gravity) //return true if player is touching a block on the bottom of him
{
return 1;
return 2;
}
else return 0;
}
@ -20,12 +20,12 @@ int collide(int x, int y, char block, char level[], char gravity)
int collide_solid(int x, int y, char block, char level[])
{
if(level[(int)((x+PLAYER_HEIGHT+1)/16)+(int)(y/16*25)] == block ||
level[(int)((x+PLAYER_HEIGHT+1)/16)+(int)((y+PLAYER_HEIGHT-1)/16*25)] == block) //return true if player is next to a block on his right
level[(int)((x+PLAYER_HEIGHT+1)/16)+(int)((y+PLAYER_HEIGHT-1)/16*25)] == block) //return if player is next to a block on his right
{
return 1;
}
else if(level[(int)((x-1)/16)+(int)(y/16*25)] == block ||
level[(int)((x-1)/16)+(int)((y+PLAYER_HEIGHT)/16*25)] == block) //return true if player is next to a block on his left
level[(int)((x-1)/16)+(int)((y+PLAYER_HEIGHT-1)/16*25)] == block) //return if player is next to a block on his left
{
return 2;
}

View File

@ -47,17 +47,13 @@ int main(void)
switch (collide(player_x, player_y, '1', level, gravity))
{
case 0:
if(gravity) player_y+=PLAYER_GRAVITY;
if(!gravity) player_y+=PLAYER_GRAVITY;
else player_y-=PLAYER_GRAVITY;
break;
case 1:
if((player_y-4)%16!=0 && gravity) player_y--;
else if((player_y)%16!=0 && !gravity) player_y++;
case 1 || 2:
if((player_y-4)%16!=0 && !gravity) player_y--;
else if((player_y)%16!=0 && gravity) player_y++;
break;
/*case '2':
if((player_x+PLAYER_HEIGHT)%16!=0) player_x--;
case '3':
if((player_x+PLAYER_HEIGHT)%16!=0) player_x--;*/
}
draw_level(level);
draw_player(player_x,player_y);
@ -65,8 +61,8 @@ int main(void)
int y = player_y;
dprint(150,100,C_BLACK,"%d",player_x);
dprint(150,150,C_BLACK,"%d",player_y);
dprint(100,180,C_BLACK,"%c",level[(int)((x+PLAYER_HEIGHT+1)/16)+(int)(y/16*25)]);
dprint(120,180,C_BLACK,"%c",level[(int)((x+PLAYER_HEIGHT+1)/16)+(int)((y+PLAYER_HEIGHT-1)/16*25)]);
dprint(100,180,C_BLACK,"%c",level[(int)((x+PLAYER_HEIGHT)/16)+(int)(y/16*25)]);
dprint(120,180,C_BLACK,"%c",level[(int)((x+PLAYER_HEIGHT)/16)+(int)((y+PLAYER_HEIGHT-1)/16*25)]);
dprint(100,120,C_BLACK,"%d",collide(player_x, player_y, '1', level, gravity));
dprint(100,140,C_BLACK,"%d",collide_solid(player_x, player_y, '1', level));
dprint(200,120,C_BLACK,"%c",level[(int)(x/16)+(int)(y/16*25)]);

View File

@ -6,7 +6,7 @@ void set_level(int id_level, char level[])
switch(id_level)
{
case 1:
memcpy(level,"11111111111111111111111111000000000000000000000001100000000000011111100000110000000000000000000000011000000000000000000000001100000000000000000000000110000000011111111000000011000000000000000000000001100200000000020000000000110020000000000000000000011002000000000000001111001100000000000000000000000110000000000000000000000011111111111111111111111111",350);
memcpy(level,"11111111111111111111111111000000000000000000000001100000000000000111111000100000000000000010000000000000000000011111000000000100000000000000000001111110000000000000000020000011000000011111110002000001100000000000000000200000110000000000000000020000010000000000010000002000000000111100001000000200000010000000000100000020000011111111111111111111111111",350);
break;
case 2:
memcpy(level,"000001110",350);