Browse Source

changed project name

changed rock texture
dev
milangames-art 2 years ago
parent
commit
5537bb7a5b
  1. 12
      AddinInfo.txt
  2. 100
      Debug/Addin.mak
  3. BIN
      Debug/FXADDINror.abs
  4. BIN
      Debug/FXADDINror.bin
  5. BIN
      Debug/FXADDINror.dbg
  6. 51
      Debug/FXADDINror.fsy
  7. 234
      Debug/FXADDINror.map
  8. 269
      Debug/MARIOBR.lst
  9. BIN
      Debug/MARIOBR.obj
  10. 0
      INIT/CasioRAM.mem
  11. 0
      INIT/CasioRAMCPU.mem
  12. 1
      MARIOBRS.dlr
  13. 112
      MARIOBRS.dlw
  14. 15
      MARIOBRS.g1w
  15. 155
      Makefile
  16. 0
      README.md
  17. BIN
      SuperCbr.g1a
  18. 0
      assets-cg/icon-cg-sel.png
  19. 0
      assets-cg/icon-cg-uns.png
  20. BIN
      assets-fx/Sans titre.png
  21. 0
      assets-fx/icon-fx.png
  22. 0
      assets-fx/img/brick.png
  23. 0
      assets-fx/img/coin.png
  24. 0
      assets-fx/img/death.png
  25. 0
      assets-fx/img/error.png
  26. 0
      assets-fx/img/gift.png
  27. 0
      assets-fx/img/level.png
  28. 0
      assets-fx/img/main.png
  29. 0
      assets-fx/img/mario.png
  30. 0
      assets-fx/img/mariosmall.png
  31. BIN
      assets-fx/img/stone.png
  32. 0
      assets-fx/img/tuyau.png
  33. BIN
      build-fx/SuperCbr.bin
  34. BIN
      build-fx/SuperCbr.elf
  35. BIN
      build-fx/aaa.bin
  36. BIN
      build-fx/aaa.elf
  37. BIN
      build-fx/assets/img/sprites.png.o
  38. BIN
      build-fx/assets/img/stone.png.o
  39. 1066
      build-fx/map
  40. BIN
      build-fx/src/MARIOBRS.elf
  41. 5
      build-fx/src/box.c.d
  42. BIN
      build-fx/src/box.c.o
  43. 5
      build-fx/src/box.d
  44. 8
      build-fx/src/keyboard.c.d
  45. BIN
      build-fx/src/keyboard.c.o
  46. 8
      build-fx/src/keyboard.d
  47. 7
      build-fx/src/main.c.d
  48. BIN
      build-fx/src/main.c.o
  49. 7
      build-fx/src/main.d
  50. BIN
      build-fx/src/main.o
  51. 2
      build-fx/src/mario.c.d
  52. BIN
      build-fx/src/mario.c.o
  53. 5
      build-fx/src/sprite.d
  54. BIN
      build-fx/src/sprite.o
  55. 3
      build-fx/src/tile.c.d
  56. BIN
      build-fx/src/tile.c.o
  57. 3
      build-fx/src/tile.d
  58. 5
      build-fx/src/world.c.d
  59. BIN
      build-fx/src/world.c.o
  60. 5
      build-fx/src/world.d
  61. 80
      project.cfg
  62. 10
      src/box.c
  63. 0
      src/box.h
  64. 0
      src/keyboard.c
  65. 0
      src/keyboard.h
  66. 25
      src/main.c
  67. 2
      src/mario.c
  68. 0
      src/mario.h
  69. 17
      src/sprite.c
  70. 7
      src/sprite.h
  71. 0
      src/tile.c
  72. 0
      src/tile.h
  73. 0
      src/world.c
  74. 0
      src/world.h

12
AddinInfo.txt

@ -1,12 +0,0 @@
//------------------------------------------------------------------
// Addin-Application header control file, created with the CASIO SDK
//------------------------------------------------------------------
[OUTPUT] : "MARIOBRS.G1A"
[BINDATA] : "FXADDINror.bin"
[DISPNAME] : "MARIOBRS"
[APPNAME] : "@MARIOBR"
[VERSION] : "00.00.0000"
[APL_ICON] : "MainIcon.bmp"
[MODULE_NUM] : 0
[MOD1_TITLE] : "MARIOBR"
[MOD1_ICON] : "eActivityIcon.bmp"

100
Debug/Addin.mak

@ -1,100 +0,0 @@
################################################
# Make file for CASIO fx-9860G SDK Addin
#
############################
# Directory defines
TCDIR = C:\CASIO\fx-9860G SDK\OS\SH
OSDIR = C:\CASIO\fx-9860G SDK\OS
APPDIR = Z:\home\gmilan\dev\c\supercasiobros
OUTDIR = Z:\home\gmilan\dev\c\supercasiobros\Debug
################
# Main Defines
SH_EXEDIR=$(TCDIR)\bin
# Hitachi SH C/C++ Compiler02 phase
SHCC02_EXE=shc.exe
SHCC02_DEP="$(OSDIR)\FX\include\fxlib.h"
# Hitachi SH Assembler03 phase
SHASM03_EXE=asmsh.exe
# Hitachi OptLinker04 phase
SHLINK04_EXE=Optlnk.exe
SHLINK04_DEP="$(OSDIR)\FX\lib\fx9860G_library.lib"
SHLINK04_DEP2="$(OSDIR)\FX\lib\setup.obj"
#######################
# Files to build
FILE0=MARIOBR
FILESRC0="$(APPDIR)\$(FILE0).c"
FILEOBJ0="$(OUTDIR)\$(FILE0).obj"
RFILE=FXADDINror
USERALLOBJ=$(FILEOBJ0)
#######################
# nmake "all" statement
ALL: SH_ENV \
$(USERALLOBJ) \
$(OUTDIR)\$(RFILE).bin \
####################
# Description blocks
!MESSAGE %3#C$z`&'0?
!MESSAGE
!MESSAGE Executing Hitachi SH C/C++ Compiler/Assembler phase
!MESSAGE
SH_ENV :
set SHC_INC=$(TCDIR)\include
set PATH=$(TCDIR)\bin
set SHC_LIB=$(TCDIR)\bin
set SHC_TMP=$(OUTDIR)
$(FILEOBJ0) : $(FILESRC0) $(SHCC02_DEP)
"$(SH_EXEDIR)\$(SHCC02_EXE)" -subcommand=<<
-cpu=sh3
-include="$(OSDIR)\FX\include","$(APPDIR)"
-objectfile=$(FILEOBJ0)
-show=source
-listfile="$(OUTDIR)\$(FILE0).lst"
-size
-noinline
-chgincpath
-errorpath
$(FILESRC0)
-lang=c
-nologo
-debug
<<
!MESSAGE
!MESSAGE Executing Hitachi OptLinker04 phase
!MESSAGE
"$(OUTDIR)\$(RFILE).bin" : $(USERALLOBJ) $(SHLINK04_DEP2) $(SHLINK04_DEP)
"$(SH_EXEDIR)\$(SHLINK04_EXE)" -subcommand=<<
noprelink
sdebug
rom D=R
nomessage
list "$(OUTDIR)\$(RFILE).map"
show symbol
nooptimize
start P_TOP,P,C,D,C$VTBL,C$INIT/0300200,B_BR_Size,B,R/08100000
fsymbol P
nologo
input $(USERALLOBJ)
input $(SHLINK04_DEP2)
library $(SHLINK04_DEP)
output "$(OUTDIR)\$(RFILE).abs"
-nomessage=1100
end
input "$(OUTDIR)\$(RFILE).abs"
form binary
output "$(OUTDIR)\$(RFILE).bin"
exit
<<

BIN
Debug/FXADDINror.abs

Binary file not shown.

BIN
Debug/FXADDINror.bin

Binary file not shown.

BIN
Debug/FXADDINror.dbg

Binary file not shown.

51
Debug/FXADDINror.fsy

@ -1,51 +0,0 @@
;HITACHI OPTIMIZING LINKAGE EDITOR GENERATED FILE 2019.11.17
;fsymbol = P
;SECTION NAME = P
.export _AddIn_main
_AddIn_main: .equ h'0030020c
.export ___LINK_PROTECT
___LINK_PROTECT: .equ h'00300258
.export _SetQuitHandler
_SetQuitHandler: .equ h'0030025c
.export _OnAppCloseDefault
_OnAppCloseDefault: .equ h'00300262
.export __INITSCT_ADDIN
__INITSCT_ADDIN: .equ h'003002b6
.export _INIT_ADDIN_APPLICATION
_INIT_ADDIN_APPLICATION: .equ h'003002fe
.export _Bdel_cychdr
_Bdel_cychdr: .equ h'00300374
.export _Bdisp_AllClr_DDVRAM
_Bdisp_AllClr_DDVRAM: .equ h'00300384
.export _BfileFLS_CloseFile
_BfileFLS_CloseFile: .equ h'00300394
.export _Bkey_Set_RepeatTime_Default
_Bkey_Set_RepeatTime_Default: .equ h'003003a4
.export _CallbackAtQuitMainFunction
_CallbackAtQuitMainFunction: .equ h'003003b4
.export _flsFindClose
_flsFindClose: .equ h'003003c4
.export _GetKey
_GetKey: .equ h'003003d4
.export _GLibAddinAplExecutionCheck
_GLibAddinAplExecutionCheck: .equ h'003003e4
.export _Hmem_SetMMU
_Hmem_SetMMU: .equ h'003003f4
.export _Print
_Print: .equ h'00300404
.export _PrintMini
_PrintMini: .equ h'00300414
.export _locate
_locate: .equ h'00300430
.export _Bdisp_ReadArea_DD
_Bdisp_ReadArea_DD: .equ h'00300458
.export __divls
__divls: .equ h'0030058c
.export _DD_GET
_DD_GET: .equ h'00300640
.export _locate_OS
_locate_OS: .equ h'00300650
.export _PrintMiniSd
_PrintMiniSd: .equ h'00300660
.end

234
Debug/FXADDINror.map

@ -1,234 +0,0 @@
Hitachi Optimizing Linkage Editor (Ver. 7.1.03.000)17-Nov-2019 15:42:13
*** Options ***
-subcommand=C:\users\gmilan\Temp\hmkaf9b.tmp
noprelink
sdebug
rom D=R
nomessage
list "Z:\home\gmilan\dev\c\supercasiobros\Debug\FXADDINror.map"
show symbol
nooptimize
start P_TOP,P,C,D,C$VTBL,C$INIT/0300200,B_BR_Size,B,R/08100000
fsymbol P
nologo
input "Z:\home\gmilan\dev\c\supercasiobros\Debug\MARIOBR.obj"
input "C:\CASIO\fx-9860G SDK\OS\FX\lib\setup.obj"
library "C:\CASIO\fx-9860G SDK\OS\FX\lib\fx9860G_library.lib"
output "Z:\home\gmilan\dev\c\supercasiobros\Debug\FXADDINror.abs"
-nomessage=1100
end
*** Error information ***
*** Mapping List ***
SECTION START END SIZE ALIGN
P_TOP
00300200 0030020b c 4
P
0030020c 0030066f 464 4
C
00300670 003006a7 38 4
D
003006a8 003006ab 4 4
B_BR_Size
08100000 08100003 4 4
B
08100004 08100007 4 4
R
08100008 0810000b 4 4
*** Symbol List ***
SECTION=
FILE= START END SIZE
SYMBOL ADDR SIZE INFO COUNTS OPT
SECTION=P_TOP
FILE=Z:\home\gmilan\dev\c\supercasiobros\Debug\MARIOBR.obj
00300200 0030020b c
_InitializeSystem
00300200 c func ,g *
SECTION=P
FILE=Z:\home\gmilan\dev\c\supercasiobros\Debug\MARIOBR.obj
0030020c 00300257 4c
_AddIn_main
0030020c 4c func ,g *
FILE=C:\CASIO\fx-9860G SDK\OS\FX\lib\setup.obj
00300258 00300373 11c
___LINK_PROTECT
00300258 4 func ,g *
_SetQuitHandler
0030025c 6 func ,g *
_OnAppCloseDefault
00300262 54 func ,g *
__INITSCT_ADDIN
003002b6 48 func ,g *
_INIT_ADDIN_APPLICATION
003002fe 76 func ,g *
FILE=_Bdel_cychdr
00300374 00300383 10
_Bdel_cychdr
00300374 0 none ,g *
FILE=_Bdisp_AllClr_DDVRAM
00300384 00300393 10
_Bdisp_AllClr_DDVRAM
00300384 0 none ,g *
FILE=_BfileFLS_CloseFile
00300394 003003a3 10
_BfileFLS_CloseFile
00300394 0 none ,g *
FILE=_Bkey_Set_RepeatTime_Default
003003a4 003003b3 10
_Bkey_Set_RepeatTime_Default
003003a4 0 none ,g *
FILE=_CallbackAtQuitMainFunction
003003b4 003003c3 10
_CallbackAtQuitMainFunction
003003b4 0 none ,g *
FILE=_flsFindClose
003003c4 003003d3 10
_flsFindClose
003003c4 0 none ,g *
FILE=_getkey
003003d4 003003e3 10
_GetKey
003003d4 0 none ,g *
FILE=_GLibAddinAplExecutionCheck
003003e4 003003f3 10
_GLibAddinAplExecutionCheck
003003e4 0 none ,g *
FILE=_Hmem_SetMMU
003003f4 00300403 10
_Hmem_SetMMU
003003f4 0 none ,g *
FILE=_Print
00300404 00300413 10
_Print
00300404 0 none ,g *
FILE=dispbios
00300414 00300589 176
_PrintMini
00300414 1c func ,g *
_locate
00300430 28 func ,g *
_Bdisp_ReadArea_DD
00300458 132 func ,g *
FILE=__divls
0030058c 0030063f b4
__divls
0030058c 0 none ,g *
divls_zero
0030062a 0 none ,l *
A_errno
00300638 0 none ,l *
n_zerono
0030063c 0 none ,l *
FILE=_DD_GET
00300640 0030064f 10
_DD_GET
00300640 0 none ,g *
FILE=_locate
00300650 0030065f 10
_locate_OS
00300650 0 none ,g *
FILE=_PrintMiniSd
00300660 0030066f 10
_PrintMiniSd
00300660 0 none ,g *
SECTION=C
FILE=addin_sct
00300694 003006a7 14
_B_BGN
00300694 0 none ,g *
_B_END
00300698 0 none ,g *
_R_BGN
0030069c 0 none ,g *
_R_END
003006a0 0 none ,g *
_D_ROM
003006a4 0 none ,g *
SECTION=B_BR_Size
FILE=Z:\home\gmilan\dev\c\supercasiobros\Debug\MARIOBR.obj
08100000 08100003 4
_BR_Size
08100000 4 data ,g *
SECTION=B
FILE=_errno
08100004 08100007 4
__errno
08100004 4 data ,g *
SECTION=R
FILE=C:\CASIO\fx-9860G SDK\OS\FX\lib\setup.obj
08100008 0810000b 4
_gb_OnAppClose
08100008 4 data ,g *
Absolute value symbols
FILE=_Bdel_cychdr
__JumpTableTOP
80010070 0 none ,l *
FILE=_Bdisp_AllClr_DDVRAM
__JumpTableTOP
80010070 0 none ,l *
FILE=_BfileFLS_CloseFile
__JumpTableTOP
80010070 0 none ,l *
FILE=_Bkey_Set_RepeatTime_Default
__JumpTableTOP
80010070 0 none ,l *
FILE=_CallbackAtQuitMainFunction
__JumpTableTOP
80010070 0 none ,l *
FILE=_flsFindClose
__JumpTableTOP
80010070 0 none ,l *
FILE=_getkey
__JumpTableTOP
80010070 0 none ,l *
FILE=_GLibAddinAplExecutionCheck
__JumpTableTOP
80010070 0 none ,l *
FILE=_Hmem_SetMMU
__JumpTableTOP
80010070 0 none ,l *
FILE=_Print
__JumpTableTOP
80010070 0 none ,l *
FILE=__divls
zerodiv
0000044e 0 none ,l *
FILE=_DD_GET
__JumpTableTOP
80010070 0 none ,l *
FILE=_locate
__JumpTableTOP
80010070 0 none ,l *
FILE=_PrintMiniSd
__JumpTableTOP
80010070 0 none ,l *
*** Delete Symbols ***
SYMBOL SIZE INFO
*** Variable Accessible with Abs8 ***
SYMBOL SIZE COUNTS OPTIMIZE
*** Variable Accessible with Abs16 ***
SYMBOL SIZE COUNTS OPTIMIZE
*** Function Call ***
SYMBOL COUNTS OPTIMIZE

269
Debug/MARIOBR.lst

@ -1,269 +0,0 @@
SH SERIES C/C++ Compiler (Ver. 6.0C) 17-Nov-2019 15:42:12 PAGE 1
************ OBJECT LISTING ************
FILE NAME: Z:\home\gmilan\dev\c\supercasiobros\MARIOBR.c
SCT OFFSET CODE C LABEL INSTRUCTION OPERAND COMMENT
MARIOBR.c 1 /*****************************************************************/
MARIOBR.c 2 /* */
MARIOBR.c 3 /* CASIO fx-9860G SDK Library */
MARIOBR.c 4 /* */
MARIOBR.c 5 /* File name : [ProjectName].c */
MARIOBR.c 6 /* */
MARIOBR.c 7 /* Copyright (c) 2006 CASIO COMPUTER CO., LTD. */
MARIOBR.c 8 /* */
MARIOBR.c 9 /*****************************************************************/
MARIOBR.c 10 #include "fxlib.h"
MARIOBR.c 11
MARIOBR.c 12
MARIOBR.c 13 //****************************************************************************
MARIOBR.c 14 // AddIn_main (Sample program main function)
MARIOBR.c 15 //
MARIOBR.c 16 // param : isAppli : 1 = This application is launched by MAIN MENU.
MARIOBR.c 17 // : 0 = This application is launched by a strip in eACT application.
MARIOBR.c 18 //
MARIOBR.c 19 // OptionNum : Strip number (0~3)
MARIOBR.c 20 // (This parameter is only used when isAppli parameter is 0.)
MARIOBR.c 21 //
MARIOBR.c 22 // retval : 1 = No error / 0 = Error
MARIOBR.c 23 //
MARIOBR.c 24 //****************************************************************************
MARIOBR.c 25 int AddIn_main(int isAppli, unsigned short OptionNum)
P 00000000 _AddIn_main: ; function: AddIn_main
; frame size=4
MARIOBR.c 26 {
MARIOBR.c 27 unsigned int key;
MARIOBR.c 28
MARIOBR.c 29 Bdisp_AllClr_DDVRAM();
00000000 D30C MOV.L L316+2,R3 ; _Bdisp_AllClr_DDVRAM
00000002 7FFC ADD #-4,R15
00000004 430B JSR @R3
00000006 0009 NOP
MARIOBR.c 30
MARIOBR.c 31 locate(1,4);
00000008 D20B MOV.L L316+6,R2 ; _locate
0000000A E504 MOV #4,R5
0000000C 420B JSR @R2
0000000E E401 MOV #1,R4
MARIOBR.c 32 Print((unsigned char*)"This application is");
00000010 D40A MOV.L L316+10,R4 ; L302
00000012 D30B MOV.L L316+14,R3 ; _Print
00000014 430B JSR @R3
00000016 0009 NOP
MARIOBR.c 33 locate(1,5);
00000018 D207 MOV.L L316+6,R2 ; _locate
0000001A E505 MOV #5,R5
0000001C 420B JSR @R2
0000001E E401 MOV #1,R4
MARIOBR.c 34 Print((unsigned char*)" sample Add-In.");
00000020 D408 MOV.L L316+18,R4 ; L303
00000022 D307 MOV.L L316+14,R3 ; _Print
SH SERIES C/C++ Compiler (Ver. 6.0C) 17-Nov-2019 15:42:12 PAGE 2
SCT OFFSET CODE C LABEL INSTRUCTION OPERAND COMMENT
00000024 430B JSR @R3
00000026 0009 NOP
00000028 DE07 MOV.L L316+22,R14; _GetKey
MARIOBR.c 35
MARIOBR.c 36 while(1){
0000002A L313:
MARIOBR.c 37 GetKey(&key);
0000002A 4E0B JSR @R14
0000002C 64F3 MOV R15,R4
0000002E AFFC BRA L313
00000030 0009 NOP
00000032 L316:
00000032 0000 .DATA.W 0
00000034 <00000000> .DATA.L _Bdisp_AllClr_DDVRAM
00000038 <00000000> .DATA.L _locate
0000003C <00000000> .DATA.L L302
00000040 <00000000> .DATA.L _Print
00000044 <00000000> .DATA.L L303
00000048 <00000000> .DATA.L _GetKey
MARIOBR.c 38 }
MARIOBR.c 39
MARIOBR.c 40 return 1;
MARIOBR.c 41 }
MARIOBR.c 42
MARIOBR.c 43
MARIOBR.c 44
MARIOBR.c 45
MARIOBR.c 46 //****************************************************************************
MARIOBR.c 47 //************** ****************
MARIOBR.c 48 //************** Notice! ****************
MARIOBR.c 49 //************** ****************
MARIOBR.c 50 //************** Please do not change the following source. ****************
MARIOBR.c 51 //************** ****************
MARIOBR.c 52 //****************************************************************************
MARIOBR.c 53
MARIOBR.c 54
MARIOBR.c 55 #pragma section _BR_Size
MARIOBR.c 56 unsigned long BR_Size;
MARIOBR.c 57 #pragma section
MARIOBR.c 58
MARIOBR.c 59
MARIOBR.c 60 #pragma section _TOP
MARIOBR.c 61
MARIOBR.c 62 //****************************************************************************
MARIOBR.c 63 // InitializeSystem
MARIOBR.c 64 //
MARIOBR.c 65 // param : isAppli : 1 = Application / 0 = eActivity
MARIOBR.c 66 // OptionNum : Option Number (only eActivity)
MARIOBR.c 67 //
MARIOBR.c 68 // retval : 1 = No error / 0 = Error
MARIOBR.c 69 //
MARIOBR.c 70 //****************************************************************************
MARIOBR.c 71 int InitializeSystem(int isAppli, unsigned short OptionNum)
P_T 00000000 _InitializeSystem: ; function: InitializeSystem
; frame size=0
MARIOBR.c 72 {
MARIOBR.c 73 return INIT_ADDIN_APPLICATION(isAppli, OptionNum);
SH SERIES C/C++ Compiler (Ver. 6.0C) 17-Nov-2019 15:42:12 PAGE 3
SCT OFFSET CODE C LABEL INSTRUCTION OPERAND COMMENT
00000000 D301 MOV.L L317+2,R3 ; _INIT_ADDIN_APPLICATION
00000002 432B JMP @R3
00000004 0009 NOP
00000006 L317:
00000006 0000 .DATA.W 0
00000008 <00000000> .DATA.L _INIT_ADDIN_APPLICATION
MARIOBR.c 74 }
MARIOBR.c 75
MARIOBR.c 76 #pragma section
MARIOBR.c 77
C 00000000 L302:
00000000 5468697320 .SDATA "This application is"
6170706C69
636174696F
6E206973
00000013 00 .DATA.B H'00
00000014 L303:
00000014 2073616D70 .SDATA " sample Add-In."
6C65204164
642D496E2E
00000023 00 .DATA.B H'00
B_B 00000000 _BR_Size: ; static: BR_Size
00000000 00000004 .RES.L 1
SH SERIES C/C++ Compiler (Ver. 6.0C) 17-Nov-2019 15:42:12 PAGE 1
******** STATISTICS INFORMATION ********
********** ERROR INFORMATION ***********
NUMBER OF ERRORS: 0
NUMBER OF WARNINGS: 0
******* SOURCE LINE INFORMATION ********
COMPILED SOURCE LINE: 77
******* SECTION SIZE INFORMATION *******
PROGRAM SECTION (P): 0000004C Byte(s)
PROGRAM SECTION (P_BR_Size): 00000000 Byte(s)
PROGRAM SECTION (P_TOP): 0000000C Byte(s)
CONSTANT SECTION (C): 00000024 Byte(s)
CONSTANT SECTION (C_BR_Size): 00000000 Byte(s)
CONSTANT SECTION (C_TOP): 00000000 Byte(s)
DATA SECTION (D): 00000000 Byte(s)
DATA SECTION (D_BR_Size): 00000000 Byte(s)
DATA SECTION (D_TOP): 00000000 Byte(s)
BSS SECTION (B): 00000000 Byte(s)
BSS SECTION (B_BR_Size): 00000004 Byte(s)
BSS SECTION (B_TOP): 00000000 Byte(s)
TOTAL PROGRAM SIZE: 00000080 Byte(s)
********** LABEL INFORMATION ***********
NUMBER OF EXTERNAL REFERENCE SYMBOLS: 5
NUMBER OF EXTERNAL DEFINITION SYMBOLS: 3
NUMBER OF INTERNAL/EXTERNAL SYMBOLS: 13
*** COMMAND PARAMETER ***
-subcommand=C:\users\gmilan\Temp\hmkab6e.tmp

BIN
Debug/MARIOBR.obj

Binary file not shown.

0
INIT/CasioRAM.mem

0
INIT/CasioRAMCPU.mem

1
MARIOBRS.dlr

@ -1 +0,0 @@
[DLSimRunSpace]

112
MARIOBRS.dlw

@ -1,112 +0,0 @@
[DLSimWorkSpace]
[_1]
Type=5
Order=2
Top=15
Left=2235
Height=4740
Width=5565
State=0
Flags=00000020
OptionA=0
[_2]
Type=1
Order=0
Top=15
Left=7800
Height=4740
Width=5535
State=0
Flags=00000001
OptionA=15
OptionB=15
[_3]
Type=6
Order=4
Top=4740
Left=7800
Height=6390
Width=5535
State=0
Flags=00000001
OptionA=0
[_4]
Type=7
Order=3
Top=4740
Left=2220
Height=3165
Width=5565
State=0
Flags=00000000
OptionA=0
[_5]
Type=8
Order=1
Top=7905
Left=2220
Height=3225
Width=5580
State=0
Flags=00000000
OptionA=0
[_6]
Type=3
Order=9
Top=0
Left=10788
Height=6348
Width=2232
State=16
Flags=00000000
OptionA=0
[_7]
Type=2
Order=8
Top=6348
Left=7800
Height=3588
Width=5220
State=16
Flags=00000000
OptionA=0
[_8]
Type=17
Order=5
Top=15
Left=-15
Height=11115
Width=2235
State=0
Flags=00000000
OptionA=0
[_9]
Type=15
Order=6
Top=4740
Left=2232
Height=6348
Width=5592
State=16
Flags=00000000
OptionA=0
[_32]
Type=16
Order=7
Top=0
Left=2208
Height=4584
Width=5592
State=16
Flags=00000020
OptionA=0

15
MARIOBRS.g1w

@ -1,15 +0,0 @@
[DLSimProject]
Name=MARIOBRS
Version=00.00.0000
Model=:fx-9860G.dlm
SourcePath=SRC
MemoryPath=INIT
MemCardPath=SDCard
[Program1]
Program=MARIOBRS.G1A
Debug=Debug\FXADDINror.dbg
LoadAddress=80000000:90100000
[Files]
SourceFile=:MARIOBR.c

155
Makefile

@ -10,42 +10,70 @@
include project.cfg
# Compiler flags
cf := -mb -ffreestanding -nostdlib -Wall -Wextra \
-fstrict-volatile-bitfields $(CFLAGS)
cf-fx := $(cf) -m3 -DFX9860G
cf-cg := $(cf) -m4-nofpu -DFXCG50
CFLAGSFX := $(CFLAGS) $(CFLAGS_FX) $(INCLUDE)
CFLAGSCG := $(CFLAGS) $(CFLAGS_CG) $(INCLUDE)
# Linker flags
lf-fx := -Tfx9860g.ld -lgint-fx $(LDFLAGS) -lgcc -Wl,-Map=build-fx/map
lf-cg := -Tfxcg50.ld -lgint-cg $(LDFLAGS) -lgcc -Wl,-Map=build-cg/map
LDFLAGSFX := $(LDFLAGS) $(LDFLAGS_FX)
LDFLAGSCG := $(LDFLAGS) $(LDFLAGS_CG)
# Dependency list generation flags
depflags = -MMD -MT $@ -MF $(@:.o=.d) -MP
# ELF to binary flags
BINFLAGS := -R .bss -R .gint_bss
# G1A and G3A generation flags
NAME_G1A ?= $(NAME)
NAME_G3A ?= $(NAME)
G1AF := -i "$(ICON_FX)" -n "$(NAME_G1A)" --internal="$(INTERNAL)"
G3AF := -n basic:"$(NAME_G3A)" -i uns:"$(ICON_CG_UNS)" -i sel:"$(ICON_CG_SEL)"
ifeq "$(TOOLCHAIN_FX)" ""
TOOLCHAIN_FX := sh-elf
endif
dflags = -MMD -MT $@ -MF $(@:.o=.d) -MP
cpflags := -R .bss -R .gint_bss
ifeq "$(TOOLCHAIN_CG)" ""
TOOLCHAIN_CG := sh4eb-elf
endif
g1af := -i "$(ICON_FX)" -n "$(NAME)" --internal="$(INTERNAL)"
g3af := -n basic:"$(NAME)" -i uns:"$(ICON_CG_UNS)" -i sel:"$(ICON_CG_SEL)"
# fxconv flags
FXCONVFX := --fx --toolchain=$(TOOLCHAIN_FX)
FXCONVCG := --cg --toolchain=$(TOOLCHAIN_CG)
#
# File listings
#
null :=
filename := $(subst $(null) $(null),-,$(NAME))
NULL :=
TARGET := $(subst $(NULL) $(NULL),-,$(NAME))
ifeq "$(TARGET_FX)" ""
TARGET_FX := $(TARGET).g1a
endif
ifeq "$(TARGET_CG)" ""
TARGET_CG := $(TARGET).g3a
endif
ELF_FX := build-fx/$(shell basename -s .g1a $(TARGET_FX)).elf
BIN_FX := $(ELF_FX:.elf=.bin)
elf = $(dir $<)$(filename).elf
bin = $(dir $<)$(filename).bin
target-fx := $(filename).g1a
target-cg := $(filename).g3a
ELF_CG := build-cg/$(shell basename -s .g3a $(TARGET_CG)).elf
BIN_CG := $(ELF_CG:.elf=.bin)
# Source files
src := $(wildcard src/*.[csS] src/*/*.[csS] src/*/*/*.[csS] \
src := $(wildcard src/*.[csS] \
src/*/*.[csS] \
src/*/*/*.[csS] \
src/*/*/*/*.[csS])
assets-fx := $(wildcard assets-fx/*/*)
assets-cg := $(wildcard assets-cg/*/*)
# Object files
obj-fx := $(src:%.c=build-fx/%.o) $(assets-fx:assets-fx/%=build-fx/assets/%.o)
obj-cg := $(src:%.c=build-cg/%.o) $(assets-cg:assets-cg/%=build-cg/assets/%.o)
obj-fx := $(src:%=build-fx/%.o) \
$(assets-fx:assets-fx/%=build-fx/assets/%.o)
obj-cg := $(src:%=build-cg/%.o) \
$(assets-cg:assets-cg/%=build-cg/assets/%.o)
# Additional dependencies
deps-fx := $(ICON_FX)
@ -66,60 +94,68 @@ endif
all: $(all)
all-fx: $(target-fx)
all-cg: $(target-cg)
$(target-fx): $(obj-fx) $(deps-fx)
all-fx: $(TARGET_FX)
all-cg: $(TARGET_CG)
sh3eb-elf-gcc -o $(elf) $(obj-fx) $(cf-fx) $(lf-fx)
sh3eb-elf-objcopy -O binary $(cpflags) $(elf) $(bin)
fxg1a $(bin) -o $@ $(g1af)
$(target-cg): $(obj-cg) $(deps-cg)
$(TARGET_FX): $(obj-fx) $(deps-fx)
@ mkdir -p $(dir $@)
$(TOOLCHAIN_FX)-gcc -o $(ELF_FX) $(obj-fx) $(CFLAGSFX) $(LDFLAGSFX)
$(TOOLCHAIN_FX)-objcopy -O binary $(BINFLAGS) $(ELF_FX) $(BIN_FX)
fxg1a $(BIN_FX) -o $@ $(G1AF)
sh4eb-elf-gcc -o $(elf) $(obj-cg) $(cf-cg) $(lf-cg)
sh4eb-elf-objcopy -O binary $(cpflags) $(elf) $(bin)
mkg3a $(g3af) $(bin) $@
$(TARGET_CG): $(obj-cg) $(deps-cg)
@ mkdir -p $(dir $@)
$(TOOLCHAIN_CG)-gcc -o $(ELF_CG) $(obj-cg) $(CFLAGSCG) $(LDFLAGSCG)
$(TOOLCHAIN_CG)-objcopy -O binary $(BINFLAGS) $(ELF_CG) $(BIN_CG)
mkg3a $(G3AF) $(BIN_CG) $@
# C sources
build-fx/%.o: %.c
build-fx/%.c.o: %.c
@ mkdir -p $(dir $@)
sh3eb-elf-gcc -c $< -o $@ $(cf-fx) $(dflags)
build-cg/%.o: %.c
$(TOOLCHAIN_FX)-gcc -c $< -o $@ $(CFLAGSFX) $(depflags)
build-cg/%.c.o: %.c
@ mkdir -p $(dir $@)
sh4eb-elf-gcc -c $< -o $@ $(cf-cg) $(dflags)
$(TOOLCHAIN_CG)-gcc -c $< -o $@ $(CFLAGSCG) $(depflags)
# Assembler sources
build-fx/%.o: %.s
build-fx/%.s.o: %.s
@ mkdir -p $(dir $@)
sh3eb-elf-gcc -c $< -o $@
build-fx/%.o: %.S
$(TOOLCHAIN_FX)-gcc -c $< -o $@
build-cg/%.s.o: %.s
@ mkdir -p $(dir $@)
sh3eb-elf-gcc -c $< -o $@ $(sflags)
build-cg/%.o: %.s
$(TOOLCHAIN_CG)-gcc -c $< -o $@
# Preprocessed assembler sources
build-fx/%.S.o: %.S
@ mkdir -p $(dir $@)
sh4eb-elf-gcc -c $< -o $@
build-cg/%.o: %.S
$(TOOLCHAIN_FX)-gcc -c $< -o $@ $(INCLUDE)
build-cg/%.S.o: %.S
@ mkdir -p $(dir $@)
sh4eb-elf-gcc -c $< -o $@ $(sflags)
$(TOOLCHAIN_CG)-gcc -c $< -o $@ $(INCLUDE)
# Images
build-fx/assets/img/%.o: assets-fx/img/%
@ mkdir -p $(dir $@)
fxconv -i $< -o $@ --fx name:img_$(basename $*)
fxconv -i $< -o $@ $(FXCONVFX) name:img_$(basename $*) $(IMG.$*)
build-cg/assets/img/%.o: assets-cg/img/%
@ mkdir -p $(dir $@)
fxconv -i $< -o $@ --cg name:img_$(basename $*)
fxconv -i $< -o $@ $(FXCONVCG) name:img_$(basename $*) $(IMG.$*)
# Fonts
build-fx/assets/fonts/%.o: assets-fx/fonts/%
@ mkdir -p $(dir $@)
fxconv -f $< -o $@ name:font_$(basename $*) $(FONT.$*)
fxconv -f $< -o $@ $(FXCONVFX) name:font_$(basename $*) $(FONT.$*)
build-cg/assets/fonts/%.o: assets-cg/fonts/%
@ mkdir -p $(dir $@)
fxconv -f $< -o $@ name:font_$(basename $*) $(FONT.$*)
fxconv -f $< -o $@ $(FXCONVCG) name:font_$(basename $*) $(FONT.$*)
# Binaries
build-fx/assets/bin/%.o: assets-fx/bin/%
@ mkdir -p $(dir $@)
fxconv -b $< -o $@ $(FXCONVFX) name:bin_$(basename $*) $(BIN.$*)
build-cg/assets/bin/%.o: assets-cg/bin/%
@ mkdir -p $(dir $@)
fxconv -b $< -o $@ $(FXCONVCG) name:bin_$(basename $*) $(BIN.$*)
#
# Cleaning and utilities
@ -131,14 +167,23 @@ build-fx/%.d: ;
build-cg/%.d: ;
.PRECIOUS: build-fx build-cg build-fx/%.d build-cg/%.d %/
clean:
@ rm -rf build*
distclean: clean
@ rm -f $(target-fx) $(target-cg)
clean-fx:
@ rm -rf build-fx/
clean-cg:
@ rm -rf build-cg/
distclean-fx: clean-fx
@ rm -f $(TARGET_FX)
distclean-cg: clean-cg
@ rm -f $(TARGET_CG)
clean: clean-fx clean-cg
distclean: distclean-fx distclean-cg
install-fx: $(target-fx)
install-fx: $(TARGET_FX)
p7 send -f $<
install-cg: $(target-cg)
install-cg: $(TARGET_CG)
@ while [[ ! -h /dev/Prizm1 ]]; do sleep 0.25; done
@ while ! mount /dev/Prizm1; do sleep 0.25; done
@ rm -f /mnt/prizm/$<

0
README.md

BIN
MARIOBRS.g1a → SuperCbr.g1a

Binary file not shown.

0
assets-cg/icon-cg-sel.png

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

0
assets-cg/icon-cg-uns.png

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
assets-fx/Sans titre.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

0
assets-fx/icon-fx.png

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

0
assets-fx/img/brick.png

Before

Width:  |  Height:  |  Size: 598 B

After

Width:  |  Height:  |  Size: 598 B

0
assets-fx/img/coin.png

Before

Width:  |  Height:  |  Size: 585 B

After

Width:  |  Height:  |  Size: 585 B

0
assets-fx/img/death.png

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

0
assets-fx/img/error.png

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

0
assets-fx/img/gift.png

Before

Width:  |  Height:  |  Size: 619 B

After

Width:  |  Height:  |  Size: 619 B

0
assets-fx/img/level.png

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

0
assets-fx/img/main.png

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

0
assets-fx/img/mario.png

Before

Width:  |  Height:  |  Size: 670 B

After

Width:  |  Height:  |  Size: 670 B

0
assets-fx/img/mariosmall.png

Before

Width:  |  Height:  |  Size: 712 B

After

Width:  |  Height:  |  Size: 712 B

BIN
assets-fx/img/stone.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 12 KiB

0
assets-fx/img/tuyau.png

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

BIN
build-fx/src/MARIOBRS.bin → build-fx/SuperCbr.bin

Binary file not shown.

BIN
build-fx/SuperCbr.elf

Binary file not shown.

BIN
build-fx/aaa.bin

Binary file not shown.

BIN
build-fx/aaa.elf

Binary file not shown.

BIN
build-fx/assets/img/sprites.png.o

Binary file not shown.

BIN
build-fx/assets/img/stone.png.o

Binary file not shown.

1066
build-fx/map

File diff suppressed because it is too large

BIN
build-fx/src/MARIOBRS.elf

Binary file not shown.

5
build-fx/src/box.c.d

@ -0,0 +1,5 @@
build-fx/src/box.c.o: src/box.c src/box.h src/world.h
src/box.h:
src/world.h:

BIN
build-fx/src/box.o → build-fx/src/box.c.o

Binary file not shown.

5
build-fx/src/box.d

@ -1,5 +0,0 @@
build-fx/src/box.o: src/box.c src/box.h src/world.h
src/box.h:
src/world.h:

8
build-fx/src/keyboard.c.d

@ -0,0 +1,8 @@
build-fx/src/keyboard.c.o: src/keyboard.c src/keyboard.h src/mario.h \
src/box.h
src/keyboard.h:
src/mario.h:
src/box.h:

BIN
build-fx/src/keyboard.o → build-fx/src/keyboard.c.o

Binary file not shown.

8
build-fx/src/keyboard.d

@ -1,8 +0,0 @@
build-fx/src/keyboard.o: src/keyboard.c src/keyboard.h src/mario.h \
src/box.h
src/keyboard.h:
src/mario.h:
src/box.h:

7
build-fx/src/main.c.d

@ -0,0 +1,7 @@
build-fx/src/main.c.o: src/main.c src/world.h src/mario.h src/box.h
src/world.h:
src/mario.h:
src/box.h:

BIN
build-fx/src/main.c.o

Binary file not shown.

7
build-fx/src/main.d

@ -1,7 +0,0 @@
build-fx/src/main.o: src/main.c src/world.h src/mario.h src/box.h
src/world.h:
src/mario.h:
src/box.h:

BIN
build-fx/src/main.o

Binary file not shown.

2
build-fx/src/mario.d → build-fx/src/mario.c.d

@ -1,4 +1,4 @@
build-fx/src/mario.o: src/mario.c src/mario.h src/box.h src/tile.h \
build-fx/src/mario.c.o: src/mario.c src/mario.h src/box.h src/tile.h \
src/world.h src/keyboard.h
src/mario.h:

BIN
build-fx/src/mario.o → build-fx/src/mario.c.o

Binary file not shown.

5
build-fx/src/sprite.d

@ -1,5 +0,0 @@
build-fx/src/sprite.o: src/sprite.c src/sprite.h src/world.h
src/sprite.h:
src/world.h:

BIN
build-fx/src/sprite.o

Binary file not shown.

3
build-fx/src/tile.c.d

@ -0,0 +1,3 @@
build-fx/src/tile.c.o: src/tile.c src/tile.h
src/tile.h:

BIN
build-fx/src/tile.o → build-fx/src/tile.c.o

Binary file not shown.

3
build-fx/src/tile.d

@ -1,3 +0,0 @@
build-fx/src/tile.o: src/tile.c src/tile.h
src/tile.h:

5
build-fx/src/world.c.d

@ -0,0 +1,5 @@
build-fx/src/world.c.o: src/world.c src/world.h src/tile.h
src/world.h:
src/tile.h:

BIN
build-fx/src/world.o → build-fx/src/world.c.o

Binary file not shown.

5
build-fx/src/world.d

@ -1,5 +0,0 @@
build-fx/src/world.o: src/world.c src/world.h src/tile.h
src/world.h:
src/tile.h:

80
project.cfg

@ -1,11 +1,20 @@
#---
# fxSDK project configuration file for MARIOBRS
# fxSDK project configuration file for aaa
#---
# Project name, should be at most 8 bytes long.
NAME = MARIOBRS
# (You can also specify NAME_G1A or NAME_G3A to override individually.)
NAME := SuperCbr
# Internal name, should be '@' followed by at most 7 uppercase letters.
INTERNAL = @MARIOBR
# WARNING: If this convention is not followed, the add-in might not appear in
# the main menu of the calculator!
INTERNAL := @SCBROS
# Output file name. The default is to take <NAME>, replace spaces with dashes,
# and add .g1a (or .g3a). You can specify a different folder if you want.
TARGET_FX :=
TARGET_CG :=
# fx-9860G icon location
ICON_FX = assets-fx/icon-fx.png
@ -13,8 +22,63 @@ ICON_FX = assets-fx/icon-fx.png
ICON_CG_UNS = assets-cg/icon-cg-uns.png
ICON_CG_SEL = assets-cg/icon-cg-sel.png
# Additional compiler flags
CFLAGS = -std=c11 -Os
# Additional linker flags. This is followed by -lgcc. When using fxlib, add
# libfx.a to the projet directory and set LDFLAGS to "-L . -lfx".
LDFLAGS =
#---
# Toolchain selection
#---
# Toolchain for fx9860g. Please see also CFLAGS_FX below.
TOOLCHAIN_FX := sh-elf
# Toolchain for fxcg50. Please see also CFLAGS_CG below.
TOOLCHAIN_CG := sh-elf
#---
# Compiler flags
#---
# Base compiler flags for the fxSDK, you usually want to keep these.
CFLAGS := -mb -ffreestanding -nostdlib -fstrict-volatile-bitfields
# Platform-specific compiler flags.
# <> If you are using sh3eb-elf, use -m3. (You can do this on both FX and CG.)
# <> If you are using sh4eb-elf, use -m4-nofpu. (Not ideal on FX but works.)
# <> If you are using sh4eb-nofpu-elf, then your compiler will likely use the
# FPU and cause problems on the calculator. Consider another configuration.
# <> If you are using an sh-elf with several targets, specify whichever you
# support. I recommend -m3 on FX and -m4-nofpu on CG.
# Please see also TOOLCHAIN_FX and TOOLCHAIN_CG above.
CFLAGS_FX := -D FX9860G -m3
CFLAGS_CG := -D FXCG50 -m4-nofpu
# Additional compiler flags, change to your own taste!
CFLAGS += -Wall -Wextra -Os
# Include paths. Add one -I option for each folder from which you want to
# be able to include files with #include<>.
INCLUDE := -I include
# Libraries. Add one -l option for each library you are using, and also
# suitable -L options if you have library files in custom folders. To use
# fxlib, add libfx.a to the project directory and use "-L . -lfx".
LIBS :=
# Base linker flags for the fxSDK, you usually want to keep these.
LDFLAGS_FX := -T fx9860g.ld -lgint-fx $(LIBS) -lgint-fx -lgcc
LDFLAGS_CG := -T fxcg50.ld -lgint-cg $(LIBS) -lgint-cg -lgcc
# Additional linker flags, if you need any.
LDFLAGS :=
# Additional platform-specific linker flags.
LDFLAGS_FX += -Wl,-Map=build-fx/map
LDFLAGS_CG += -Wl,-Map=build-cg/map
#---
# File conversion parameters
#---
# Here you can add fxconv options for each converted file, individually.
# The syntax is "<type>.<file>". For example, to specify the parameters for a
# font name "hexa.png", you might write:
#
# FONT.hexa.png = charset:print grid:size:3x5 grid.padding:1

10
src/box.c

@ -27,7 +27,7 @@ static void move_x(box_t * b)
previous_tested_y=t;
int typetemp;
if (sgn_vx>0)
typetemp=world_get_ctg(b->x+b->w+i*sgn_vx,b->y+j);
typetemp=world_get_ctg(b->x+b->w-1+i*sgn_vx,b->y+j);
else
typetemp=world_get_ctg(b->x+i*sgn_vx,b->y+j);
if (typetemp==CTG_DEATH || typetemp==CTG_SOIL)
@ -52,17 +52,17 @@ static void move_y(box_t * b)
for (int i=sgn_vy; i<=sgn_vy*b->vy; i++)
{
int previous_tested_x=-545;
for (int j=0; j<b->h; j++)
for (int j=0; j<b->w; j++)
{
int t=(b->w+j)/8;
int t=(b->x+j)/8;
if (t!=previous_tested_x)
{
previous_tested_x=t;
int typetemp;
if (sgn_vy>0)
typetemp=world_get_ctg(b->x+j ,b->y+b->h+i*sgn_vy);
typetemp=world_get_ctg(b->x+j ,b->y+b->h-1+i);
else
typetemp=world_get_ctg(b->x+j ,b->y+i*sgn_vy);
typetemp=world_get_ctg(b->x+j ,b->y-i);
if (typetemp==CTG_DEATH || typetemp==CTG_SOIL)
{
b->y+=(i-1)*sgn_vy;

0
src/box.h

0
src/keyboard.c

0
src/keyboard.h

25
src/main.c

@ -29,24 +29,23 @@ int main(void)
gint_panic_set(system_error);
volatile int has_ticked = 1;
timer_setup(0, timer_delay(0, 20000), timer_Po_16, callback, &has_ticked);
timer_setup(0, timer_delay(0, 50000), timer_Po_4, callback, &has_ticked);
timer_start(0);
while(global_quit==0)
{
has_ticked=0;
dclear(C_WHITE);
if (has_ticked)
{
has_ticked=0;
mario_move();
dclear(C_WHITE);
world_draw(mario.p.x,mario.p.y);
//ennemies_draw();
mario_draw();
//ingame_draw();
dupdate();
//keyboard_reload();
mario_move();
world_draw(mario.p.x,mario.p.y);
//ennemies_draw();
mario_draw();
//ingame_draw();
dupdate();
}
}
timer_stop(0);

2
src/mario.c

@ -52,7 +52,7 @@ void mario_move()
update_keyboard();
int jump = keys[MK_JUMP1] || keys[MK_JUMP2];
if (jump)
box_jump(&mario.p, 12);
box_jump(&mario.p, 7);
mario.p.vx = keys[MK_RIGHT] - keys[MK_LEFT];

0
src/mario.h

17
src/sprite.c

@ -1,17 +0,0 @@
#include "sprite.h"
#include "world.h"
int hitbox(int x, int y, int width, int height)
{
height--;
width--;
int type=CTG_EMPTY;
for (int i=0; i<=height; i++)
{
if (world_get_ctg(x+width, y+i)==CTG_SOIL || world_get_ctg(x, y+i)==CTG_SOIL)
type=CTG_SOIL;
if (world_get_ctg(x+width, y+i)==CTG_DEATH || world_get_ctg(x, y+i)==CTG_DEATH)
return CTG_DEATH;
}
return type;
}

7
src/sprite.h

@ -1,7 +0,0 @@
#ifndef SPRITE_H
#define SPRITE_H
int hitbox(int x, int y, int width, int height);
#endif

0
src/tile.c

0
src/tile.h

0
src/world.c

0
src/world.h

Loading…
Cancel
Save