1
0
Fork 0

Restructure for all version

Rearrange linker script (in /linker)
Delete unnecessary files
Use extern instead of static in sms.h
This commit is contained in:
sup39 2021-12-17 06:26:39 +09:00
parent 24ec8b0223
commit c74a9da83b
28 changed files with 76074 additions and 2788 deletions

Binary file not shown.

View file

@ -1,13 +1,39 @@
C:\devkitPro\devkitPPC\bin\powerpc-eabi-gcc.exe %1 -S -o %~n1.s -O1 -std=c99
C:\devkitPro\devkitPPC\bin\powerpc-eabi-gcc.exe %1 -c -o %~n1.o -O1 -std=c99
if ERRORLEVEL 1 pause
if ERRORLEVEL 1 exit
C:\devkitPro\devkitPPC\bin\powerpc-eabi-ld.exe -Os -T linker -T smsFuncs -o obj_%~n1.o %~n1.o -Map %~n1.map
if ERRORLEVEL 1 pause
if ERRORLEVEL 1 exit
C:\devkitPro\devkitPPC\bin\powerpc-eabi-objdump.exe obj_%~n1.o --full-content
if ERRORLEVEL 1 pause
if ERRORLEVEL 1 exit
C:\devkitPro\devkitPPC\bin\powerpc-eabi-objcopy.exe obj_%~n1.o %~n1.bin -O binary -R .eh_frame -R .comment -R .sdata -R .gnu.attributes -g -S
bin2gecko.exe %~n1.bin -m %~n1.map -c OnUpdate:0x802a6160:3 -c OnSetup:0x802998b8:0 -c OnDraw2D:0x80143f14:0 -c OnWaterHitsGround:0x8027f7dc:0 -c OnObjectTouchMario:0x801b02fc:3 -c OnAllNPCsUpdate:0x8003e2f0:0 -c OnSmallEnemyHitMario:0x8006c76c:3 -r OnEMarioControl:0x8004010c -r IsMario:0x8024db0c
pause
@echo off
IF [%2]==[] (SET lang=JP) ELSE (SET lang=%2)
:: compile
C:\devkitPro\devkitPPC\bin\powerpc-eabi-gcc.exe "%1" -D "SMS_LANG_%lang%" -I "%~p0\include" -S -o "%~n1.s" -O1 -std=c99
IF ERRORLEVEL 1 GOTO END
C:\devkitPro\devkitPPC\bin\powerpc-eabi-gcc.exe "%~n1.s" -c -o "%~n1.o"
IF ERRORLEVEL 1 GOTO END
:: link
IF EXIST "%~n1.ld" SET LDFLAGS=-T "%~n1.ld"
C:\devkitPro\devkitPPC\bin\powerpc-eabi-ld.exe -Os -T "%~p0\linker\SMS-%lang%.ld" -T "%~p0\linker\alias.ld" -T "%~p0\linker\extra.ld" %LDFLAGS% -T "%~p0\linker\gecko.ld" -o "obj_%~n1.o" "%~n1.o" -Map "%~n1.map"
IF ERRORLEVEL 1 GOTO END
:: print
C:\devkitPro\devkitPPC\bin\powerpc-eabi-objdump.exe "obj_%~n1.o" --full-content
C:\devkitPro\devkitPPC\bin\powerpc-eabi-objcopy.exe "obj_%~n1.o" "%~n1.bin" -O binary -R .eh_frame -R .comment -R .sdata -R .gnu.attributes -g -S
:: bin2gecko
IF "%lang%"=="EU" GOTO bin2gecko_EU
IF "%lang%"=="JP" GOTO bin2gecko_JP
IF "%lang%"=="US" GOTO bin2gecko_US
echo bin2gecko for language [%lang%] is not implemented
GOTO END
:bin2gecko_EU
bin2gecko.exe "%~n1.bin" -m "%~n1.map" -c OnUpdate:0x8029e070:3 -c OnSetup:0x80291750:0 -c OnDraw2D:0x80138b50:0 -c OnWaterHitsGround:0x80277568:0 -c OnObjectTouchMario:0x801a81b4:3 -c OnAllNPCsUpdate:0x8003e140:0 -c OnSmallEnemyHitMario:0x80065e0c:3 -r OnEMarioControl:0x8003ff5c -r IsMario:0x80245898
GOTO END
:bin2gecko_JP
bin2gecko.exe "%~n1.bin" -m "%~n1.map" -c OnUpdate:0x800f9b64:3 -c OnSetup:0x800ece3c:0 -c OnDraw2D:0x80206734:0 -c OnWaterHitsGround:0x8015ebf8:0 -c OnObjectTouchMario:0x801886d8:3 -c OnAllNPCsUpdate:0x80251d50:0 -c OnSmallEnemyHitMario:0x8027f64c:3 -r OnEMarioControl:0x80253ac0 -r IsMario:0x8012cfe0
GOTO END
:bin2gecko_US
bin2gecko.exe "%~n1.bin" -m "%~n1.map" -c OnUpdate:0x802a6160:3 -c OnSetup:0x802998b8:0 -c OnDraw2D:0x80143f14:0 -c OnWaterHitsGround:0x8027f7dc:0 -c OnObjectTouchMario:0x801b02fc:3 -c OnAllNPCsUpdate:0x8003e2f0:0 -c OnSmallEnemyHitMario:0x8006c76c:3 -r OnEMarioControl:0x8004010c -r IsMario:0x8024db0c
GOTO END
:END
pause

View file

@ -1 +0,0 @@
START cmd.exe

122
dollinker
View file

@ -1,122 +0,0 @@
__destroy_global_chain = 0x80337dc0;
__register_global_object = 0x80337e08;
__destroy_new_array = 0x80337e20;
__destroy_arr = 0x80337e9c;
__construct_array = 0x80337f14;
__dt__26__partial_array_destructorFv = 0x80338014;
__construct_new_array = 0x803380cc;
__ptmf_test = 0x803381d4;
__ptmf_scall = 0x80338204;
__unregister_fragment = 0x8033822c;
__register_fragment = 0x80338260;
__dt__26__partial_array_destructorFv = 0x80338014;
__cvt_fp2unsigned = 0x8033829c;
exit = 0x80338978;
rand = 0x8033b1a4;
srand = 0x8033b19c;
long2str = 0x8033aaa0;
longlong2str = 0x8033a7c0;
round_decimal = 0x8033a68c;
float2str = 0x8033a054;
toupper = 0x80338f3c;
tolower = 0x80338f64;
__num2dec = 0x80338a84;
__flush_buffer = 0x80338e38;
__prep_buffer = 0x80338f04;
__kill_critical_regions = 0x80338f38;
__div2u = 0x803382f8;
__div2i = 0x803383e4;
__mod2u = 0x8033851c;
__mod2i = 0x80338600;
__shl2i = 0x8033870c;
__shr2u = 0x80338730;
__shr2i = 0x80338754;
__cvt_sll_flt = 0x8033877c;
__cvt_dbl_usll = 0x80338830;
GetR2__Fv = 0x803388fc;
__fini_cpp_exceptions = 0x80338904;
__init_cpp_exceptions = 0x80338938;
fwrite = 0x80338f8c;
wcstombs = 0x80339268;
memcmp = 0x803392a4;
memchr = 0x803392e8;
memmove = 0x80339314;
__copy_longs_rev_unaligned = 0x803393f0;
__copy_longs_unaligned = 0x803394a0;
__copy_longs_rev_aligned = 0x80339564;
__copy_longs_aligned = 0x80339610;
__stdio_atexit = 0x803396cc;
sprintf = 0x803396d0;
snprintf = 0x803397a4;
vsnprintf = 0x80339874;
vprintf = 0x803398e4;
__StringWrite = 0x80339960;
__FileWrite = 0x803399cc;
__pformatter = 0x80339a24;
parse_format = 0x8033acc4;
__StringRead = 0x8033b1c8;
strstr = 0x8033b258;
strrchr = 0x8033b30c;
strchr = 0x8033b30c;
strcmp = 0x8033b33c;
strcat = 0x8033b460;
strncpy = 0x8033b48c;
strcpy = 0x8033b4d0;
strlen = 0x8033b584;
strtol = 0x8033b5a4;
strtoul = 0x8033b694;
__strtoul = 0x8033b740;
__close_console = 0x8033ba88;
__write_console = 0x8033ba90;
__read_console = 0x8033bb28;
fwide = 0x8033bc08;
fabs__Fd = 0x8033bc88;
__ieee754_atan2 = 0x8033bc90;
atan = 0x8033bf28;
frexp = 0x8033c168;
atan2 = 0x8033c204;
fabsf__Ff = 0x8033c224;
atanf = 0x8033c22c;
atan__Ff = 0x8033c420;
_inv_sqrtf = 0x8033c440;
acosf = 0x8033c4b0;
atan2f = 0x8033c4f4;
tanf = 0x8033c5cc;
cos__Ff = 0x8033c610;
sin__Ff = 0x8033c630;
cosf = 0x8033c650;
sinf = 0x8033c7e4;
__sinit_trigf_c = 0x8033c988;
powf = 0x8033c9b8;
expf = 0x8033d0f8;
memset = 0x80003100;
__fill_mem = 0x80003130;
memcpy = 0x800031f4;
__nw__FUl = 0x802c3ba4;
__nw__FUli = 0x802c3bec;
__nwa__FUl = 0x802c3ca4;
__nwa__FUli = 0x802c3cec;
__dl__FPv = 0x802c3da4;
__dla__FPv = 0x802c3e08;
SECTIONS
{
. = 0x80417800;
.text :
{
*(.text)
}
.rodata :
{
*(.rodata*)
}
.data :
{
*(.data)
}
. += 0x08;
.sdata :
{
*(.sdata)
}
}

1220
inc/sms.h

File diff suppressed because it is too large Load diff

30
include/QFTimer.h Normal file
View file

@ -0,0 +1,30 @@
#ifndef SMS_QFTIMER_H
#define SMS_QFTIMER_H
/* https://github.com/BitPatty/gctGenerator/blob/master/docs/reserved_memory.png */
typedef struct {
// 0x94
struct {
uint32_t left;
uint32_t top;
uint32_t right;
uint32_t bottom;
} textboxCoord; // Coordinated of the Text box
// 0xA4
char format[13]; // Timer Format String
// 0xB1
uint8_t u1; // (Unused)
// 0xB2
uint8_t stopAtQFTOffset; // Stop at QFT Offset
// 0xB3
uint8_t restart; // Restart Flag
// 0xB4
uint32_t offset; // Cumulative time of previous areas since last reset (QFT Offset)
// 0xB8
uint32_t displayTime; // Time to display if timer freeze > 0
// 0xBC
uint32_t freezeDuration; // Duration of timer freeze (in frames)
} QFTimer_t;
extern QFTimer_t QFTimer;
#endif

1241
include/sms.h Normal file

File diff suppressed because it is too large Load diff

122
linker
View file

@ -1,122 +0,0 @@
__destroy_global_chain = 0x80337dc0;
__register_global_object = 0x80337e08;
__destroy_new_array = 0x80337e20;
__destroy_arr = 0x80337e9c;
__construct_array = 0x80337f14;
__dt__26__partial_array_destructorFv = 0x80338014;
__construct_new_array = 0x803380cc;
__ptmf_test = 0x803381d4;
__ptmf_scall = 0x80338204;
__unregister_fragment = 0x8033822c;
__register_fragment = 0x80338260;
__dt__26__partial_array_destructorFv = 0x80338014;
__cvt_fp2unsigned = 0x8033829c;
exit = 0x80338978;
rand = 0x8033b1a4;
srand = 0x8033b19c;
long2str = 0x8033aaa0;
longlong2str = 0x8033a7c0;
round_decimal = 0x8033a68c;
float2str = 0x8033a054;
toupper = 0x80338f3c;
tolower = 0x80338f64;
__num2dec = 0x80338a84;
__flush_buffer = 0x80338e38;
__prep_buffer = 0x80338f04;
__kill_critical_regions = 0x80338f38;
__div2u = 0x803382f8;
__div2i = 0x803383e4;
__mod2u = 0x8033851c;
__mod2i = 0x80338600;
__shl2i = 0x8033870c;
__shr2u = 0x80338730;
__shr2i = 0x80338754;
__cvt_sll_flt = 0x8033877c;
__cvt_dbl_usll = 0x80338830;
GetR2__Fv = 0x803388fc;
__fini_cpp_exceptions = 0x80338904;
__init_cpp_exceptions = 0x80338938;
fwrite = 0x80338f8c;
wcstombs = 0x80339268;
memcmp = 0x803392a4;
memchr = 0x803392e8;
memmove = 0x80339314;
__copy_longs_rev_unaligned = 0x803393f0;
__copy_longs_unaligned = 0x803394a0;
__copy_longs_rev_aligned = 0x80339564;
__copy_longs_aligned = 0x80339610;
__stdio_atexit = 0x803396cc;
sprintf = 0x803396d0;
snprintf = 0x803397a4;
vsnprintf = 0x80339874;
vprintf = 0x803398e4;
__StringWrite = 0x80339960;
__FileWrite = 0x803399cc;
__pformatter = 0x80339a24;
parse_format = 0x8033acc4;
__StringRead = 0x8033b1c8;
strstr = 0x8033b258;
strrchr = 0x8033b30c;
strchr = 0x8033b30c;
strcmp = 0x8033b33c;
strcat = 0x8033b460;
strncpy = 0x8033b48c;
strcpy = 0x8033b4d0;
strlen = 0x8033b584;
strtol = 0x8033b5a4;
strtoul = 0x8033b694;
__strtoul = 0x8033b740;
__close_console = 0x8033ba88;
__write_console = 0x8033ba90;
__read_console = 0x8033bb28;
fwide = 0x8033bc08;
fabs__Fd = 0x8033bc88;
__ieee754_atan2 = 0x8033bc90;
atan = 0x8033bf28;
frexp = 0x8033c168;
atan2 = 0x8033c204;
fabsf__Ff = 0x8033c224;
atanf = 0x8033c22c;
atan__Ff = 0x8033c420;
_inv_sqrtf = 0x8033c440;
acosf = 0x8033c4b0;
atan2f = 0x8033c4f4;
tanf = 0x8033c5cc;
cos__Ff = 0x8033c610;
sin__Ff = 0x8033c630;
cosf = 0x8033c650;
sinf = 0x8033c7e4;
__sinit_trigf_c = 0x8033c988;
powf = 0x8033c9b8;
expf = 0x8033d0f8;
memset = 0x80003100;
__fill_mem = 0x80003130;
memcpy = 0x800031f4;
__nw__FUl = 0x802c3ba4;
__nw__FUli = 0x802c3bec;
__nwa__FUl = 0x802c3ca4;
__nwa__FUli = 0x802c3cec;
__dl__FPv = 0x802c3da4;
__dla__FPv = 0x802c3e08;
SECTIONS
{
. = 0x817fa000;
.text :
{
*(.text)
}
.rodata :
{
*(.rodata*)
}
.data :
{
*(.data)
}
. += 0x08;
.sdata :
{
*(.sdata)
}
}

18567
linker/SMS-EU.ld Normal file

File diff suppressed because it is too large Load diff

18685
linker/SMS-JP.ld Normal file

File diff suppressed because it is too large Load diff

18519
linker/SMS-JPA.ld Normal file

File diff suppressed because it is too large Load diff

18760
linker/SMS-US.ld Normal file

File diff suppressed because it is too large Load diff

169
linker/alias.ld Normal file
View file

@ -0,0 +1,169 @@
PROVIDE(MarDirector_SetupObjects = setupObjects__12TMarDirectorFv);
PROVIDE(PlaySound = startSoundActor__Q214MSoundSESystem8MSoundSEFUlPC3VecUlPP8JAISoundUlUc);
PROVIDE(StartStageEntranceDemoSeq = startStageEntranceDemo__10MSMainProcFUcUc);
PROVIDE(GenerateEffectElectric = elecEffect__6TMarioFv);
PROVIDE(MakeObjAppear = makeObjAppear__18TMapObjBaseManagerFUl);
PROVIDE(SendMsgToMario = SMS_SendMessageToMario__FP9THitActorUl);
PROVIDE(EmitSweat = emitSweat__6TMarioFs);
PROVIDE(Mario_StartVoice = startVoice__6TMarioFUl);
PROVIDE(Fludd_Emit = emit__9TWaterGunFv);
PROVIDE(SetMarioStatus = changePlayerStatus__6TMarioFUlUlb);
PROVIDE(IsMarioJumping = SMS_IsMarioStatusTypeJumping__Fv);
PROVIDE(Mario_SetAnim = setAnimation__6TMarioFif);
PROVIDE(ThrowMario = throwMario__6TMarioFRCQ29JGeometry8TVec3$$0f$$1f);
PROVIDE(GetMarioMapPosition = SMS_GetMarioPos__Fv);
PROVIDE(IncGoldCoinFlag = incGoldCoinFlag__12TFlagManagerFUcl);
PROVIDE(GetMarioStatusFromHitActor = SMS_GetMarioStatus__FP9THitActor);
PROVIDE(GetMarioStatus = SMS_GetMarioStatus__Fv);
PROVIDE(GetMarioHP = SMS_GetMarioHP__Fv);
PROVIDE(GetMarioYoshi = SMS_GetYoshi__Fv);
PROVIDE(GetFLUDD = SMS_GetMarioWaterGun__Fv);
PROVIDE(GetMarioHitActor = SMS_GetMarioHitActor__Fv);
PROVIDE(GetShineStage = SMS_getShineStage__FUc);
PROVIDE(SearchF = searchF__Q26JDrama55TNameRefPtrListT$$0Q26JDrama8TNameRef$$4Q26JDrama8TNameRef$$1FUsPCc);
PROVIDE(ChangeStage = setNextStage__12TMarDirectorFUsPQ26JDrama6TActor);
PROVIDE(DrawWaterBackground = drawWaterBack__11TGCConsole2Fv);
PROVIDE(Talk2D_OpenWindow = openWindow__8TTalk2D2FScf);
PROVIDE(Vector_Magnitude = MsVECMag2__FP3Vec);
PROVIDE(Vector_Normalize = MsVECNormalize__FP3VecP3Vec);
PROVIDE(Vector_Subtract = sub__Q29JGeometry8TVec3$$0f$$1FRCQ29JGeometry8TVec3$$0f$$1);
PROVIDE(Vector_Add = PSVECAdd);
PROVIDE(Vector_Scale = PSVECScale);
PROVIDE(CalcKeyCode = calcKeyCode__Q26JDrama8TNameRefFPCc);
PROVIDE(JUTRect_Set = set__7JUTRectFiiii);
PROVIDE(J2DScreen_Draw = draw__9J2DScreenFiiPC14J2DGrafContext);
PROVIDE(J2DPane_MakeMatrix = makeMatrix__7J2DPaneFii);
PROVIDE(J2DPane_SetBasePosition = setBasePosition__7J2DPaneF15J2DBasePosition);
PROVIDE(J2DPane_Draw = draw__7J2DPaneFiiPC14J2DGrafContextb);
PROVIDE(J2DTextBox_Delete = __dt__10J2DTextBoxFv);
PROVIDE(J2DTextBox_GetStringPtr = getStringPtr__10J2DTextBoxCFv);
PROVIDE(J2DTextBox_SetString = setString__10J2DTextBoxFPCce);
PROVIDE(J2DTextBox_DrawSelf = drawSelf__10J2DTextBoxFiiPA3_A4_f);
PROVIDE(J2DTextBox_Drawii = draw__10J2DTextBoxFii);
PROVIDE(J2DTextBox_Draw = draw__10J2DTextBoxFii);
PROVIDE(J2DTextBox_Create = __ct__10J2DTextBoxFUlRC7JUTRectPC7ResFONTPCc18J2DTextBoxHBinding18J2DTextBoxVBinding);
PROVIDE(J2DPrint_Delete = __dt__8J2DPrintFv);
PROVIDE(J2DPrint_Print = print__8J2DPrintFiiPCce);
PROVIDE(J2DPrint_Initiate = initiate__8J2DPrintFv);
PROVIDE(J2DPrint_GetWidth = getWidth__8J2DPrintFPCce);
PROVIDE(J2DPrint_Create = __ct__8J2DPrintFP7JUTFonti);
PROVIDE(J2DGrafContext_Setup2D = setup2D__14J2DGrafContextFv);
PROVIDE(J2DOrthoGraph_Create = __ct__13J2DOrthoGraphFRC7JUTRect);
PROVIDE(StampPollution = stamp__17TPollutionManagerFUsffff);
PROVIDE(CleanPollution = clean__17TPollutionManagerFffff);
PROVIDE(Drama_PrepareUpdate = testPerform__Q26JDrama8TViewObjFUlPQ26JDrama9TGraphics);
PROVIDE(StartTrembleEffect = tremble__19TTrembleModelEffectFfffi);
PROVIDE(SetMarioVelocity = setPlayerVelocity__6TMarioFf);
PROVIDE(Mario_SetGamePad = setGamePad__6TMarioFP13TMarioGamePad);
PROVIDE(MarioGamePad_Read = read__13TMarioGamePadFv);
PROVIDE(MarioGamePad_Update = updateMeaning__13TMarioGamePadFv);
PROVIDE(MarioGamePad_Reset = reset__13TMarioGamePadFv);
PROVIDE(EMario_Create = __ct__7TEMarioFPCc);
PROVIDE(Mario_CheckController = checkController__6TMarioFPQ26JDrama9TGraphics);
PROVIDE(Mario_CheckCollision = checkCollision__6TMarioFv);
PROVIDE(Mario_ReceiveMessage = receiveMessage__6TMarioFP9THitActorUl);
PROVIDE(Mario_PlayerControl = playerControl__6TMarioFPQ26JDrama9TGraphics);
PROVIDE(Mario_DamageExec = damageExec__6TMarioFP9THitActoriiififs);
PROVIDE(Mario_IncHP = incHP__6TMarioFi);
PROVIDE(Mario_DecHP = decHP__6TMarioFi);
PROVIDE(EnemyMario_CheckController = checkController__11TEnemyMarioFPQ26JDrama9TGraphics);
PROVIDE(Camera_AddMultiPlayer = addMultiPlayer__15CPolarSubCameraFPCQ29JGeometry8TVec3$$0f$$1ff);
PROVIDE(Camera_RemoveMultiPlayer = removeMultiPlayer__15CPolarSubCameraFPCQ29JGeometry8TVec3$$0f$$1);
PROVIDE(Camera_CreateMultiPlayer = createMultiPlayer__15CPolarSubCameraFUc);
PROVIDE(Mario_DrawHP = drawHPMeter__11TEnemyMarioFPA4_f);
PROVIDE(IsPolluted = isPolluted__15TPollutionLayerCFfff);
PROVIDE(Mario_WearGlasses = wearGlass__6TMarioFv);
PROVIDE(IsDemoMode = evIsDemoMode__FP32TSpcTypedInterp$$013TEventWatcher$$1Ul);
PROVIDE(InsertTimer = evInsertTimer__FP32TSpcTypedInterp$$013TEventWatcher$$1Ul);
PROVIDE(StartTimer = evStartTimer__FP32TSpcTypedInterp$$013TEventWatcher$$1Ul);
PROVIDE(AppearReadyGo = evAppearReadyGo__FP32TSpcTypedInterp$$013TEventWatcher$$1Ul);
PROVIDE(LaunchEventClearDemo = evLaunchEventClearDemo__FP32TSpcTypedInterp$$013TEventWatcher$$1Ul);
PROVIDE(StopTimer = evStopTimer__FP32TSpcTypedInterp$$013TEventWatcher$$1Ul);
PROVIDE(StartAppearTimer = startAppearTimer__11TGCConsole2Fil);
PROVIDE(OSGetSystemTime = __OSGetSystemTime);
PROVIDE(StartBGM = startBGM__5MSBgmFUl);
PROVIDE(StopBGM = stopBGM__5MSBgmFUlUl);
PROVIDE(StopBGMS = stopTrackBGMs__5MSBgmFUcUl);
PROVIDE(search = search__19JALListS$$05MSBgm$$4Ul$$1FUl);
PROVIDE(searchPane = search__9J2DScreenFUl);
PROVIDE(makeShineAppearWithDemo = makeShineAppearWithDemo__12TItemManagerFPCcPCcfff);
PROVIDE(IsMarioDashing = SMS_IsMarioDashing__Fv);
PROVIDE(initAnimSound = initAnmSound__9MAnmSoundFPvUlf);
PROVIDE(setMarioAnim = setAnimation__6TMarioFif);
PROVIDE(getGlbResource = getGlbResource__13JKRFileLoaderFPCc);
PROVIDE(setSrcRect = setSrcRect__Q26JDrama8TEfbCtrlFRCQ26JDrama5TRect);
PROVIDE(setFrameRate = setFrameRate__6MActorFfi);
PROVIDE(readData = readData__20JSUMemoryInputStreamFPvl);
PROVIDE(JSURead = read__14JSUInputStreamFPvl);
PROVIDE(getDistance = getDistance__11TMapObjBaseCFRCQ29JGeometry8TVec3$$0f$$1);
PROVIDE(mario_initModel = initModel__6TMarioFv);
PROVIDE(mario_initValues = initValues__6TMarioFv);
PROVIDE(emitGetCoinEffect = emitGetCoinEffect__6TMarioFPQ29JGeometry8TVec3$$0f$$1);
PROVIDE(emitGotEffect = emitGetEffect__6TMarioFv);
PROVIDE(changeTexture = changeTexture__10J2DPictureFPC7ResTIMGUc);
PROVIDE(setPanePosition = setPanePosition__10TBoundPaneFlRC8JUTPointRC8JUTPointRC8JUTPoint);
PROVIDE(setAnimSound = setAnmSound__10TLiveActorFPCc);
PROVIDE(setTalkBox = setupTextBox__8TTalk2D2FPCvP12JMSMesgEntry);
PROVIDE(Destroy = kill__14TMapObjGeneralFv);
PROVIDE(destroyCol = removeMapCollision__11TMapObjBaseFv);
PROVIDE(objAppear = makeObjAppeared__11TMapObjBaseFv);
PROVIDE(openNormalTalkWindow = openNormalWindow__8TTalk2D2Fv);
PROVIDE(startCameraDemo = startDemoCamera__15CPolarSubCameraFPCcPCQ29JGeometry8TVec3$$0f$$1lfb);
PROVIDE(coinTaken = taken__5TCoinFP9THitActor);
PROVIDE(redCoinTaken = taken__8TCoinRedFP9THitActor);
PROVIDE(startAppearGo = startAppearGo__11TConsoleStrFv);
PROVIDE(updatePane = update__7TExPaneFv);
PROVIDE(updateBoundPane = update__10TBoundPaneFv);
PROVIDE(updateBlendPane = update__10TBlendPaneFv);
PROVIDE(movePane = move__7J2DPaneFii);
PROVIDE(processAppearCoin = processAppearCoin__11TGCConsole2Fi);
PROVIDE(startAppearCoin = startAppearCoin__11TGCConsole2Fv);
PROVIDE(processDownCoin = processDownCoin__11TGCConsole2Fi);
PROVIDE(initModelData = initModelData__11TMapObjBaseFv);
PROVIDE(ObjHitCheck_CheckActorsHit = checkActorsHit__12TObjHitCheckFv);
PROVIDE(ObjHitCheck_DetectHit = suffererIsInAttackArea__12TObjHitCheckFP9THitActorP9THitActor);
PROVIDE(MapObjBase_RemoveMapCollision = removeMapCollision__11TMapObjBaseFv);
PROVIDE(WaterGun_ChangeNozzle = changeNozzle__9TWaterGunFQ29TWaterGun11TNozzleTypeb);
PROVIDE(Mario_InitValues = initValues__6TMarioFv);
PROVIDE(Mario_GetOffYoshi = getOffYoshi__6TMarioFb);
PROVIDE(Mario_WaterGunUpdate = gunExec__6TMarioFv);
PROVIDE(Yoshi_Ride = ride__6TYoshiFv);
PROVIDE(WaterGun_Create = __ct__9TWaterGunFP6TMario);
PROVIDE(WaterGun_Init = init__9TWaterGunFv);
PROVIDE(WaterGun_Update = perform__9TWaterGunFUlPQ26JDrama9TGraphics);
PROVIDE(ParticleManager_EmitWithRotate = emitWithRotate__21TMarioParticleManagerFlPCQ29JGeometry8TVec3$$0f$$1sssUcPCv);
PROVIDE(PolarSubCamera_UpdateMultiplayer = ctrlMultiPlayerCamera___15CPolarSubCameraFv);
PROVIDE(CLBPolarToCross = CLBPolarToCross__FRC3VecP3Vecfss);
PROVIDE(ModelWaterManager_EmitRequest = emitRequest__18TModelWaterManagerFRC14TWaterEmitInfo);
PROVIDE(WaterEmitInfo_Create = __ct__14TWaterEmitInfoFPCc);
PROVIDE(MapObjBase_EmitSplash = emitColumnWater__11TMapObjBaseFv);
PROVIDE(cosf = cos__Ff);
PROVIDE(sinf = sin__Ff);
PROVIDE(sqrtf = sqrt__Q29JGeometry8TUtil$$0f$$1Ff);
PROVIDE(marioCanTake = canTake__6TMarioFP9THitActor);
PROVIDE(marioStartVoice = startVoice__6TMarioFUl);
PROVIDE(getModel = getModel__10TLiveActorCFv);
PROVIDE(showAllShapePacket = SMS_ShowAllShapePacket__FP8J3DModel);
PROVIDE(makeObjAppeared = makeObjAppeared__11TMapObjBaseFv);
PROVIDE(startMapObjAnim = startAnim__11TMapObjBaseFUs);
PROVIDE(startSoundSystemSE = startSoundSystemSE__Q214MSoundSESystem8MSoundSEFUlUlPP8JAISoundUl);
PROVIDE(setBuffer = setBuffer__20JSUMemoryInputStreamFPCvl);
PROVIDE(createMActor = createMActor__13TMActorKeeperFPCcUl);
PROVIDE(startAnimation = setAnimation__6MActorFPCci);
PROVIDE(setBTP = setBtp__6MActorFPCc);
PROVIDE(setUpMapCollision = initMapCollisionData__11TMapObjBaseFv);
PROVIDE(changeCollision = changeCollision__20TMapCollisionManagerFUl);
PROVIDE(startJAIStream = start__Q27JAInter9StreamLibFPcUlPv);
PROVIDE(loadToMainRAM = loadToMainRAM__12JKRDvdRipperFPCcPUc15JKRExpandSwitchUlP7JKRHeapQ212JKRDvdRipper15EAllocDirectionUlPi);
PROVIDE(loadToARAM = loadToAram__16JKRDvdAramRipperFPcUl15JKRExpandSwitchUlUl);
PROVIDE(loadModelData = loadModelData__16TModelDataKeeperFPCcUlPCc);
PROVIDE(loadBCKDataBase = load__20J3DAnmLoaderDataBaseFPCv);
PROVIDE(DVDPrepareStreamASync = DVDPrepareStreamAsync);
PROVIDE(Mario_Trample = trampleExec__6TMarioFP9THitActor);
PROVIDE(Mario_SetAnimation = setAnimation__6TMarioFif);
PROVIDE(Mario_SetStatusToJumping = setStatusToJumping__6TMarioFUlUl);
PROVIDE(Application_Init = initialize__12TApplicationFv);
PROVIDE(EasyEmitParticle = SMS_EasyEmitParticle$$027E_SMS_EFFECT_ONETIME_NORMAL$$1__F27E_SMS_EFFECT_ONETIME_NORMALPCQ29JGeometry8TVec3$$0f$$1PCvRCQ29JGeometry8TVec3$$0f$$1);
PROVIDE(StartSoundActorWithInfo = startSoundActorWithInfo__Q214MSoundSESystem8MSoundSEFUlPC3VecP3VecfUlUlPP8JAISoundUlUc);
PROVIDE(Camera_CalcFinalPosAndAt = calcFinalPosAndAt___15CPolarSubCameraFv);
PROVIDE(Camera_UpdateGameCamera = ctrlGameCamera___15CPolarSubCameraFv);

16
linker/dol.ld Normal file
View file

@ -0,0 +1,16 @@
SECTIONS {
. = DEFINED(__dolBaseAddr__) ? __dolBaseAddr__ : 0x80417800;
.text : {
*(.text)
}
.rodata : {
*(.rodata*)
}
.data : {
*(.data)
}
. += 0x08;
.sdata : {
*(.sdata)
}
}

1
linker/extra.ld Normal file
View file

@ -0,0 +1 @@
QFTimer = 0x817f0094;

16
linker/gecko.ld Normal file
View file

@ -0,0 +1,16 @@
SECTIONS {
. = DEFINED(__geckoBaseAddr__) ? __geckoBaseAddr__ : 0x817fa000;
.text : {
*(.text)
}
.rodata : {
*(.rodata*)
}
.data : {
*(.data)
}
. += 0x08;
.sdata : {
*(.sdata)
}
}

View file

@ -1,13 +1,34 @@
C:\devkitPro\devkitPPC\bin\powerpc-eabi-gcc.exe %1 -S -o %~n1.s -O1 -std=c99 -w
C:\devkitPro\devkitPPC\bin\powerpc-eabi-gcc.exe %1 -c -o %~n1.o -O1 -std=c99 -w
if ERRORLEVEL 1 pause
if ERRORLEVEL 1 exit
C:\devkitPro\devkitPPC\bin\powerpc-eabi-ld.exe -Os -T dollinker -T smsFuncs -o obj_%~n1.o %~n1.o -Map %~n1.map
if ERRORLEVEL 1 pause
if ERRORLEVEL 1 exit
@echo off
IF [%2]==[] (SET lang=US) ELSE (SET lang=%2)
:: compile
C:\devkitPro\devkitPPC\bin\powerpc-eabi-gcc.exe -I include %1 -S -o %~n1.s -O1 -std=c99 -w
IF ERRORLEVEL 1 GOTO END
C:\devkitPro\devkitPPC\bin\powerpc-eabi-gcc.exe %~n1.s -c -o %~n1.o
IF ERRORLEVEL 1 GOTO END
:: link
IF EXIST "%~n1.ld" SET LDFLAGS=-T "%~n1.ld"
C:\devkitPro\devkitPPC\bin\powerpc-eabi-ld.exe -Os -T "%~p0\linker\SMS-%lang%.ld" -T "%~p0\linker\alias.ld" -T "%~p0\linker\extra.ld" %LDFLAGS% -T "%~p0\linker\dol.ld" -o "obj_%~n1.o" "%~n1.o" -Map "%~n1.map"
IF ERRORLEVEL 1 GOTO END
:: print
C:\devkitPro\devkitPPC\bin\powerpc-eabi-objdump.exe obj_%~n1.o --full-content
if ERRORLEVEL 1 pause
if ERRORLEVEL 1 exit
C:\devkitPro\devkitPPC\bin\powerpc-eabi-objcopy.exe obj_%~n1.o %~n1.bin -O binary -R .eh_frame -R .comment -R .gnu.attributes -g -S
:: DolInsert
IF %lang%==EU GOTO DolInsert_EU
IF %lang%==US GOTO DolInsert_US
echo "DolInsert for language [%lang%] is not implemented"
GOTO END
:DolInsert_EU
DolInsert.exe %~n1.bin -m %~n1.map -dol ./Start.dol -o %~n1.dol -c OnUpdate:0x8029e070:3 -c OnSetup:0x80291750:0 -c OnDraw2D:0x80138b50:0 -c OnWaterHitsGround:0x80277568:0 -c OnObjectTouchMario:0x801a81b4:3 -c OnAllNPCsUpdate:0x8003e140:0 -c OnSmallEnemyHitMario:0x80065e0c:3 -r EMarioControl:0x8003ff5c -r IsMario:0x80245898 -r EMarioReceiveMessage:0x80039624 -r MarioSendMessage:0x8026b5fc -r EMarioPlayerControl:0x8003febc -c OnMarioIncHP:0x8027ac6c:0x8027ac90:0x8027ad10:0x8027b1a0:0x8027b21c:0x8027b260:0 -c OnMarioDecHP:0x8023a89c:0 -r EMarioDamageExec:0x8003feb8 -r IsMultiplayerMap:0x802a0bd8
GOTO END
:DolInsert_US
DolInsert.exe %~n1.bin -m %~n1.map -dol ./Start.dol -o %~n1.dol -c OnUpdate:0x802a6160:3 -c OnSetup:0x802998b8:0 -c OnDraw2D:0x80143f14:0 -c OnWaterHitsGround:0x8027f7dc:0 -c OnObjectTouchMario:0x801b02fc:3 -c OnAllNPCsUpdate:0x8003e2f0:0 -c OnSmallEnemyHitMario:0x8006c76c:3 -r IsMario:0x8024db0c -r MarioSendMessage:0x80273870 -c OnMarioIncHP:0x80282ee0:0x80282f04:0x80282f84:0x80283414:0x80283490:0x802834d4:0 -c OnMarioDecHP:0x80242b10:0 -r IsMultiplayerMap:0x802a8b30 -c OnCheckActorsHit:0x80299af8:0 -c OnDetectHit:0x8021bfb4:0x8021bc00:0 -c OnMarioHeld:0x80284bd0:0 -c OnMarioThrow:0x802437bc:5 -c OnMarioDrop:0x8023f89c:3 -c OnChangeNozzle:0x80283204:0x80283154:0x802830a4:0 -c OnRideYoshi:0x8028121c:0 -r IsOnYoshi:0x802558c8 -r IsOnYoshi2:0x8024e2e4 -c OnDismountYoshi:0x8024dfc8:0x80270638:0 -c OnWaterGunUpdate:0x8024e2a0:0 -c OnUpdateMultiplayerCamera:0x80023860:0 -c CalcMultiplayerCameraPos:0x80030c04:0 -c CheckOtherObjectCollisions:0x8021bc08:1 -c CheckOtherObjectCollisions2:0x8021bba8:0 -c ChangeAllPlayerStatus:0x80240798:0x80240928:80240a2c:0 -c CreateYoshi:0x80276850:0 -c OnInitApp:0x8000561c:0 -c OnCameraMove:0x80023150:0
pause
GOTO END
:END
pause

View file

@ -1,13 +0,0 @@
C:\devkitPro\devkitPPC\bin\powerpc-eabi-gcc.exe %1 -S -o %~n1.s -O1 -std=c99
C:\devkitPro\devkitPPC\bin\powerpc-eabi-gcc.exe %1 -c -o %~n1.o -O1 -std=c99
if ERRORLEVEL 1 pause
if ERRORLEVEL 1 exit
C:\devkitPro\devkitPPC\bin\powerpc-eabi-ld.exe -Os -T linker -T smsFuncs -o obj_%~n1.o %~n1.o -Map %~n1.map
if ERRORLEVEL 1 pause
if ERRORLEVEL 1 exit
C:\devkitPro\devkitPPC\bin\powerpc-eabi-objdump.exe obj_%~n1.o --full-content
if ERRORLEVEL 1 pause
if ERRORLEVEL 1 exit
C:\devkitPro\devkitPPC\bin\powerpc-eabi-objcopy.exe obj_%~n1.o %~n1.bin -O binary -R .eh_frame -R .comment -R .sdata -R .gnu.attributes -g -S
bin2gecko.exe %~n1.bin -m %~n1.map -c OnUpdate:0x800f9b64:3 -c OnSetup:0x800ece3c:0 -c OnDraw2D:0x80206734:0 -c OnWaterHitsGround:0x8015ebf8:0 -c OnObjectTouchMario:0x801886d8:3 -c OnAllNPCsUpdate:0x80251d50:0 -c OnSmallEnemyHitMario:0x8027f64c:3 -r OnEMarioControl:0x80253ac0 -r IsMario:0x8012cfe0
pause

View file

@ -1,121 +0,0 @@
__destroy_global_chain = 0x800826e0;
__register_global_object = 0x80082728;
__destroy_new_array = 0x80082740;
__destroy_arr = 0x800827bc;
__construct_array = 0x80082834;
__dt__26__partial_array_destructorFv = 0x80082934;
__construct_new_array = 0x800829ec;
__ptmf_test = 0x80082af4;
__ptmf_scall = 0x80082b24;
__unregister_fragment = 0x80082b4c;
__register_fragment = 0x80082b80;
__dt__26__partial_array_destructorFv = 0x80082934;
__cvt_fp2unsigned = 0x80082bbc;
exit = 0x80083298;
rand = 0x80085ac4;
srand = 0x80085abc;
long2str = 0x800853c0;
longlong2str = 0x800853c0;
round_decimal = 0x80084fac;
float2str = 0x80084974;
toupper = 0x8008385c;
tolower = 0x80083884;
__num2dec = 0x800833a4;
__flush_buffer = 0x80083758;
__prep_buffer = 0x80083824;
__kill_critical_regions = 0x80083858;
__div2u = 0x80082c18;
__div2i = 0x80082d04;
__mod2u = 0x80082e3c;
__mod2i = 0x80082f20;
__shl2i = 0x8008302c;
__shr2u = 0x80083050;
__shr2i = 0x80083074;
__cvt_sll_flt = 0x8008309c;
__cvt_dbl_usll = 0x80083150;
GetR2__Fv = 0x8008321c;
__fini_cpp_exceptions = 0x80083224;
__init_cpp_exceptions = 0x80083258;
fwrite = 0x800838ac;
wcstombs = 0x80083b88;
memcmp = 0x80083bc4;
memchr = 0x80083c08;
memmove = 0x80083c34;
__copy_longs_rev_unaligned = 0x80083d10;
__copy_longs_unaligned = 0x80083dc0;
__copy_longs_rev_aligned = 0x80083e84;
__copy_longs_aligned = 0x80083f30;
__stdio_atexit = 0x80083fec;
sprintf = 0x80083ff0;
snprintf = 0x800840c4;
vsnprintf = 0x80084194;
vprintf = 0x80084204;
__StringWrite = 0x80084280;
__FileWrite = 0x800842ec;
__pformatter = 0x80084344;
parse_format = 0x800855e4;
__StringRead = 0x80085ae8;
strstr = 0x80085b78;
strrchr = 0x80085be4;
strchr = 0x80085c2c;
strcmp = 0x80085c5c;
strcat = 0x80085d80;
strncpy = 0x80085dac;
strcpy = 0x80085df0;
strlen = 0x80085ea4;
strtol = 0x80085ec4;
strtoul = 0x80085fb4;
__strtoul = 0x80086060;
__close_console = 0x800863a8;
__write_console = 0x800863b0;
__read_console = 0x80086448;
fwide = 0x80086528;
fabs__Fd = 0x800865a8;
__ieee754_atan2 = 0x800865b0;
atan = 0x80086848;
frexp = 0x80086a88;
atan2 = 0x80086b24;
fabsf__Ff = 0x80086b44;
atanf = 0x80086b4c;
atan__Ff = 0x80086d40;
_inv_sqrtf = 0x80086d60;
acosf = 0x80086dd0;
atan2f = 0x80086e14;
tanf = 0x80086eec;
cos__Ff = 0x80086f30;
sin__Ff = 0x80086f50;
cosf = 0x80086f70;
sinf = 0x80087104;
__sinit_trigf_c = 0x800872a8;
powf = 0x800872d8;
expf = 0x80087a18;
memset = 0x80003100;
__fill_mem = 0x80003130;
memcpy = 0x800031f4;
__nw__FUl = 0x8000c8b0;
__nw__FUli = 0x8000c8f8;
__nwa__FUl = 0x8000c9b0;
__nwa__FUli = 0x8000c9f8;
__dl__FPv = 0x8000cab0;
__dla__FPv = 0x8000cb14;
SECTIONS
{
. = 0x817fa000;
.text :
{
*(.text)
}
.rodata :
{
*(.rodata*)
}
.data :
{
*(.data)
}
. += 0x08;
.sdata :
{
*(.sdata)
}
}

View file

@ -1,93 +0,0 @@
MarDirector_SetupObjects = 0x8010c3ac;
PlaySound = 0x80181ef8;
StartStageEntranceDemoSeq = 0x80110000;
GenerateEffectElectric = 0x8014243c;
MakeObjAppear = 0x8018efa8;
SendMsgToMario = 0x80152bb4;
EmitSweat = 0x80143c80;
Mario_StartVoice = 0x8016480c;
Fludd_Emit = 0x80148658;
SetMarioStatus = 0x80133424;
IsMarioJumping = 0x802739b4;
Mario_SetAnim = 0x80126948;
ThrowMario = 0x80289ec4;
GetMarioMapPosition = 0x80289ec4;
IncGoldCoinFlag = 0x800e7bcc;
GetMarioStatusFromHitActor = 0x8015298c;
GetMarioStatus = 0x80152c34;
GetMarioHP = 0x801529b8;
GetMarioYoshi = 0x80152d4c;
GetFLUDD = 0x80152c04;
GetMarioHitActor = 0x80152d20;
GetShineStage = 0x800fc534;
SearchF = 0x80044960;
ChangeStage = 0x800ed8a0;
DrawWaterBackground = 0x8020a6fc;
Talk2D_OpenWindow = 0x802119cc;
Vector_Magnitude = 0x800c57d0;
Vector_Normalize = 0x800c57f8;
Vector_Subtract = 0x800c2088;
Vector_Add = 0x80094e8c;
Vector_Scale = 0x80094ed4;
CalcKeyCode = 0x8004468c;
JUTRect_Set = 0x8001321c;
J2DScreen_Draw = 0x80018e64;
J2DPane_MakeMatrix = 0x80014c38;
J2DPane_SetBasePosition = 0x80014e98;
J2DPane_Draw = 0x80014710;
J2DTextBox_Delete = 0x80019ad0;
J2DTextBox_GetStringPtr = 0x80019d1c;
J2DTextBox_SetString = 0x80019d24;
J2DTextBox_DrawSelf = 0x80019e94;
J2DTextBox_Drawii = 0x80019be4;
J2DTextBox_Draw = 0x80019be4;
J2DTextBox_Create = 0x80019904;
J2DPrint_Delete = 0x80016e2c;
J2DPrint_Print = 0x800171a8;
J2DPrint_Initiate = 0x80016e78;
J2DPrint_GetWidth = 0x80017350;
J2DPrint_Create = 0x80016d38;
J2DGrafContext_Setup2D = 0x80035228;
J2DOrthoGraph_Create = 0x80036b38;
GXInvalidateTexAll = 0x800aad20;
GXSetScissor = 0x800ada58;
StampPollution = 0x801efa1c;
CleanPollution = 0x801ef94c;
Drama_PrepareUpdate = 0x80046f6c;
StartTrembleEffect = 0x800c2370;
SetMarioVelocity = 0x80134b24;
Mario_SetGamePad = 0x80155a0c;
MarioGamePad_Read = 0x800fba58;
MarioGamePad_Update = 0x800fbae4;
MarioGamePad_Reset = 0x800fc380;
EMario_Create = 0x8024d7e0;
Mario_CheckController = 0x801308e8;
Mario_CheckCollision = 0x80160480;
Mario_ReceiveMessage = 0x80161f84;
Mario_PlayerControl = 0x8012d30c;
Mario_DamageExec = 0x8012194c;
Mario_IncHP = 0x80122ab8;
Mario_DecHP = 0x801229b8;
EnemyMario_CheckController = 0x80253ac0;
Camera_AddMultiPlayer = 0x80360538;
Camera_RemoveMultiPlayer = 0x803604a0;
Camera_CreateMultiPlayer = 0x80360594;
Mario_DrawHP = 0x80253778;
IsPolluted = 0x801f2e78;
Mario_WearGlasses = 0x801272e8;
IsDemoMode = 0x8017343c;
InsertTimer = 0x800e1ee0;
StartTimer = 0x800e1d74;
AppearReadyGo = 0x800dd710;
LaunchEventClearDemo = 0x800e2fb0;
StopTimer = 0x800e1b4c;
StartAppearTimer = 0x8020c428;
OSGetTime = 0x80093df8;
OSGetSystemTime = 0x80093e18;
OSTicksToCalendarTime = 0x80094018;
OSInitStopwatch = 0x80092900;
OSStartStopwatch = 0x8009292c;
OSCheckStopwatch = 0x80092a34;
OSStopStopwatch = 0x80092968;
OSResetStopwatch = 0x80092aa4;
OSGetTick = 0x80093e10;

View file

@ -1,13 +0,0 @@
C:\devkitPro\devkitPPC\bin\powerpc-eabi-gcc.exe %1 -S -o %~n1.s -O1 -std=c99
C:\devkitPro\devkitPPC\bin\powerpc-eabi-gcc.exe %1 -c -o %~n1.o -O1 -std=c99
if ERRORLEVEL 1 pause
if ERRORLEVEL 1 exit
C:\devkitPro\devkitPPC\bin\powerpc-eabi-ld.exe -Os -T linker -T smsFuncs -o obj_%~n1.o %~n1.o -Map %~n1.map
if ERRORLEVEL 1 pause
if ERRORLEVEL 1 exit
C:\devkitPro\devkitPPC\bin\powerpc-eabi-objdump.exe obj_%~n1.o --full-content
if ERRORLEVEL 1 pause
if ERRORLEVEL 1 exit
C:\devkitPro\devkitPPC\bin\powerpc-eabi-objcopy.exe obj_%~n1.o %~n1.bin -O binary -R .eh_frame -R .comment -R .sdata -R .gnu.attributes -g -S
bin2gecko.exe %~n1.bin -m %~n1.map -c OnUpdate:0x8029e070:3 -c OnSetup:0x80291750:0 -c OnDraw2D:0x80138b50:0 -c OnWaterHitsGround:0x80277568:0 -c OnObjectTouchMario:0x801a81b4:3 -c OnAllNPCsUpdate:0x8003e140:0 -c OnSmallEnemyHitMario:0x80065e0c:3 -r OnEMarioControl:0x8003ff5c -r IsMario:0x80245898
pause

View file

@ -1,121 +0,0 @@
__destroy_global_chain = 0x8032ff40;
__register_global_object = 0x8032ff88;
__destroy_new_array = 0x8032ffa0;
__destroy_arr = 0x8033001c;
__construct_array = 0x80330094;
__dt__26__partial_array_destructorFv = 0x80330194;
__construct_new_array = 0x8033024c;
__ptmf_test = 0x80330354;
__ptmf_scall = 0x80330384;
__unregister_fragment = 0x803303ac;
__register_fragment = 0x803303e0;
__cvt_fp2unsigned = 0x8033041c;
exit = 0x80330af8;
rand = 0x80333324;
srand = 0x8033331c;
long2str = 0x80332c20;
longlong2str = 0x80332940;
round_decimal = 0x8033280c;
float2str = 0x803321d4;
toupper = 0x803310bc;
tolower = 0x803310e4;
__num2dec = 0x80330c04;
__flush_buffer = 0x80330fb8;
__prep_buffer = 0x80331084;
__kill_critical_regions = 0x803310b8;
__div2u = 0x80330478;
__div2i = 0x80330564;
__mod2u = 0x8033069c;
__mod2i = 0x80330780;
__shl2i = 0x8033088c;
__shr2u = 0x803308b0;
__shr2i = 0x803308d4;
__cvt_sll_flt = 0x803308fc;
__cvt_dbl_usll = 0x803309b0;
GetR2__Fv = 0x80330a7c;
__fini_cpp_exceptions = 0x80330a84;
__init_cpp_exceptions = 0x80330ab8;
fwrite = 0x8033110c;
wcstombs = 0x803313e8;
memcmp = 0x80331424;
memchr = 0x80331468;
memmove = 0x80331494;
__copy_longs_rev_unaligned = 0x80331570;
__copy_longs_unaligned = 0x80331620;
__copy_longs_rev_aligned = 0x803316e4;
__copy_longs_aligned = 0x80331790;
__stdio_atexit = 0x8033184c;
sprintf = 0x80331850;
snprintf = 0x80331924;
vsnprintf = 0x803319f4;
vprintf = 0x80331a64;
__StringWrite = 0x80331ae0;
__FileWrite = 0x80331b4c;
__pformatter = 0x80331ba4;
parse_format = 0x80332e44;
__StringRead = 0x80333348;
strstr = 0x803333d8;
strrchr = 0x80333444;
strchr = 0x8033348c;
strcmp = 0x803334bc;
strcat = 0x803335e0;
strncpy = 0x8033360c;
strcpy = 0x80333650;
strlen = 0x80333704;
strtol = 0x80333724;
strtoul = 0x80333814;
__strtoul = 0x803338c0;
__close_console = 0x80333c08;
__write_console = 0x80333c10;
__read_console = 0x80333ca8;
fwide = 0x80333d88;
fabs__Fd = 0x80333e08;
__ieee754_atan2 = 0x80333e10;
atan = 0x803340a8;
frexp = 0x803342e8;
atan2 = 0x80334384;
fabsf__Ff = 0x803343a4;
atanf = 0x803343ac;
atan__Ff = 0x803345a0;
_inv_sqrtf = 0x803345c0;
acosf = 0x80334630;
atan2f = 0x80334674;
tanf = 0x8033474c;
cos__Ff = 0x80334790;
sin__Ff = 0x803347b0;
cosf = 0x803347d0;
sinf = 0x80334964;
__sinit_trigf_c = 0x80334b08;
powf = 0x80334b38;
expf = 0x80335278;
memset = 0x80003100;
__fill_mem = 0x80003130;
memcpy = 0x800031f4;
__nw__FUl = 0x802bbc38;
__nw__FUli = 0x802bbc80;
__nwa__FUl = 0x802bbd38;
__nwa__FUli = 0x802bbd80;
__dl__FPv = 0x802bbe38;
__dla__FPv = 0x802bbe9c;
SECTIONS
{
. = 0x80417800;
.text :
{
*(.text)
}
.rodata :
{
*(.rodata*)
}
.data :
{
*(.data)
}
. += 0x08;
.sdata :
{
*(.sdata)
}
}

View file

@ -1,121 +0,0 @@
__destroy_global_chain = 0x8032ff40;
__register_global_object = 0x8032ff88;
__destroy_new_array = 0x8032ffa0;
__destroy_arr = 0x8033001c;
__construct_array = 0x80330094;
__dt__26__partial_array_destructorFv = 0x80330194;
__construct_new_array = 0x8033024c;
__ptmf_test = 0x80330354;
__ptmf_scall = 0x80330384;
__unregister_fragment = 0x803303ac;
__register_fragment = 0x803303e0;
__cvt_fp2unsigned = 0x8033041c;
exit = 0x80330af8;
rand = 0x80333324;
srand = 0x8033331c;
long2str = 0x80332c20;
longlong2str = 0x80332940;
round_decimal = 0x8033280c;
float2str = 0x803321d4;
toupper = 0x803310bc;
tolower = 0x803310e4;
__num2dec = 0x80330c04;
__flush_buffer = 0x80330fb8;
__prep_buffer = 0x80331084;
__kill_critical_regions = 0x803310b8;
__div2u = 0x80330478;
__div2i = 0x80330564;
__mod2u = 0x8033069c;
__mod2i = 0x80330780;
__shl2i = 0x8033088c;
__shr2u = 0x803308b0;
__shr2i = 0x803308d4;
__cvt_sll_flt = 0x803308fc;
__cvt_dbl_usll = 0x803309b0;
GetR2__Fv = 0x80330a7c;
__fini_cpp_exceptions = 0x80330a84;
__init_cpp_exceptions = 0x80330ab8;
fwrite = 0x8033110c;
wcstombs = 0x803313e8;
memcmp = 0x80331424;
memchr = 0x80331468;
memmove = 0x80331494;
__copy_longs_rev_unaligned = 0x80331570;
__copy_longs_unaligned = 0x80331620;
__copy_longs_rev_aligned = 0x803316e4;
__copy_longs_aligned = 0x80331790;
__stdio_atexit = 0x8033184c;
sprintf = 0x80331850;
snprintf = 0x80331924;
vsnprintf = 0x803319f4;
vprintf = 0x80331a64;
__StringWrite = 0x80331ae0;
__FileWrite = 0x80331b4c;
__pformatter = 0x80331ba4;
parse_format = 0x80332e44;
__StringRead = 0x80333348;
strstr = 0x803333d8;
strrchr = 0x80333444;
strchr = 0x8033348c;
strcmp = 0x803334bc;
strcat = 0x803335e0;
strncpy = 0x8033360c;
strcpy = 0x80333650;
strlen = 0x80333704;
strtol = 0x80333724;
strtoul = 0x80333814;
__strtoul = 0x803338c0;
__close_console = 0x80333c08;
__write_console = 0x80333c10;
__read_console = 0x80333ca8;
fwide = 0x80333d88;
fabs__Fd = 0x80333e08;
__ieee754_atan2 = 0x80333e10;
atan = 0x803340a8;
frexp = 0x803342e8;
atan2 = 0x80334384;
fabsf__Ff = 0x803343a4;
atanf = 0x803343ac;
atan__Ff = 0x803345a0;
_inv_sqrtf = 0x803345c0;
acosf = 0x80334630;
atan2f = 0x80334674;
tanf = 0x8033474c;
cos__Ff = 0x80334790;
sin__Ff = 0x803347b0;
cosf = 0x803347d0;
sinf = 0x80334964;
__sinit_trigf_c = 0x80334b08;
powf = 0x80334b38;
expf = 0x80335278;
memset = 0x80003100;
__fill_mem = 0x80003130;
memcpy = 0x800031f4;
__nw__FUl = 0x802bbc38;
__nw__FUli = 0x802bbc80;
__nwa__FUl = 0x802bbd38;
__nwa__FUli = 0x802bbd80;
__dl__FPv = 0x802bbe38;
__dla__FPv = 0x802bbe9c;
SECTIONS
{
. = 0x817fa000;
.text :
{
*(.text)
}
.rodata :
{
*(.rodata*)
}
.data :
{
*(.data)
}
. += 0x08;
.sdata :
{
*(.sdata)
}
}

View file

@ -1,13 +0,0 @@
C:\devkitPro\devkitPPC\bin\powerpc-eabi-gcc.exe %1 -S -o %~n1.s -O1 -std=c99 -w
C:\devkitPro\devkitPPC\bin\powerpc-eabi-gcc.exe %1 -c -o %~n1.o -O1 -std=c99 -w
if ERRORLEVEL 1 pause
if ERRORLEVEL 1 exit
C:\devkitPro\devkitPPC\bin\powerpc-eabi-ld.exe -Os -T dollinker -T smsFuncs -o obj_%~n1.o %~n1.o -Map %~n1.map
if ERRORLEVEL 1 pause
if ERRORLEVEL 1 exit
C:\devkitPro\devkitPPC\bin\powerpc-eabi-objdump.exe obj_%~n1.o --full-content
if ERRORLEVEL 1 pause
if ERRORLEVEL 1 exit
C:\devkitPro\devkitPPC\bin\powerpc-eabi-objcopy.exe obj_%~n1.o %~n1.bin -O binary -R .eh_frame -R .comment -R .gnu.attributes -g -S
DolInsert.exe %~n1.bin -m %~n1.map -dol ./Start.dol -o %~n1.dol -c OnUpdate:0x8029e070:3 -c OnSetup:0x80291750:0 -c OnDraw2D:0x80138b50:0 -c OnWaterHitsGround:0x80277568:0 -c OnObjectTouchMario:0x801a81b4:3 -c OnAllNPCsUpdate:0x8003e140:0 -c OnSmallEnemyHitMario:0x80065e0c:3 -r EMarioControl:0x8003ff5c -r IsMario:0x80245898 -r EMarioReceiveMessage:0x80039624 -r MarioSendMessage:0x8026b5fc -r EMarioPlayerControl:0x8003febc -c OnMarioIncHP:0x8027ac6c:0x8027ac90:0x8027ad10:0x8027b1a0:0x8027b21c:0x8027b260:0 -c OnMarioDecHP:0x8023a89c:0 -r EMarioDamageExec:0x8003feb8 -r IsMultiplayerMap:0x802a0bd8
pause

View file

@ -1,546 +0,0 @@
#ifndef SMS_H
#define SMS_H
#include <stdlib.h>
#include <stdint.h>
#include <stdarg.h>
#define PRESS_START 0x1000
#define PRESS_B 0x0200
#define PRESS_A 0x0100
#define PRESS_Z 0x0010
#define PRESS_X 0x0400
#define PRESS_Y 0x0800
#define PRESS_DU 0x0008
#define PRESS_DD 0x0004
#define PRESS_DL 0x0001
#define PRESS_DR 0x0002
#define MARIOFLAG_ALIVE 0x00000001
#define MARIOFLAG_INVISIBLE 0x00000004
#define MARIOFLAG_ALLDEAD 0x00000F00
#define MARIOFLAG_GAMEOVER 0x00000400
#define MARIOFLAG_SLIP 0x00000080
#define MARIOFLAG_HASHELMET_FOLLOWCAMERA 0x00001000
#define MARIOFLAG_HASHELMET 0x00002000
#define MARIOFLAG_HASFLUDD 0x00008000
#define MARIOFLAG_SPLASH 0x00010000
#define MARIOFLAG_PUDDLE 0x00020000
#define MARIOFLAG_SHIRT 0x00100000
#define MARIOFLAG_GONE 0x00200000
#define STATE_NUMBER 0x0000000F
#define STATE_AIRBORN 0x00000800
#define STATE_CUTSCENE 0x00001000
#define STATE_STUNNED 0x00002000
#define STATE_RUNNING 0x04000440
#define STATE_IDLE 0x0C400200
#define STATE_SPIN 0x00000441
#define STATE_JUMPSPIN1 0x00000895
#define STATE_JUMPSPIN2 0x00000896
#define STATE_JUMP 0x02000880
#define STATE_JUMPSIDE 0x00000880
#define STATE_SIDESTEP 0x0C008220
#define STATE_SWIM 0x000024D7
#define STATE_DIVE 0x0080088A
#define STATE_DIVEJUMP 0x02000889
#define STATE_DIVESLIDE 0x00800456
#define STATE_CLIMB 0x18100340
#define STATE_CLIMBUP 0x10100343
#define STATE_WALLJUMP 0x02000886
#define STATE_WALLSLIDE 0x000008A7
#define STATE_HANG 0x3800034B
#define STATE_HANGCLIMB 0x3000054F
#define STATE_SLAMSTART 0x008008A9
#define STATE_SLAM 0x0080023C
#define STATE_SPRAY 0x0C008220
#define STATE_THROWN 0x000208B8
#define STATE_HOVER 0x0000088B
#define STATE_STUCK 0x0002033C
#define STATE_TALKING 0x10001308
typedef struct{
uint16_t buttons;
int8_t lanalogx;
int8_t lanalogy;
int8_t ranalogx;
int8_t ranalogy;
uint16_t u1;
uint8_t status;
uint8_t u2;
uint8_t u3;
uint8_t u4;
} __attribute__((packed)) Controller;
typedef struct{
void* type;
void* u1[55];
int u2;
int u3[7];
} MarioGamePad;
// MarDirector* mardirector = (MarDirector*)(r13 + 0x9FB8)
typedef struct{
int u1;
} MarDirector;
typedef struct{
float x;
float y;
float z;
} Vector;
typedef struct{
void* Type;
void* u2;
int u3;
int u4;
Vector position;
int u5;
void* u6;
Vector scale;
Vector direction;
void* u7;
void* u8;
void* u9;
int u10;
int collision;
float u12;
float u13;
float u14;
float u15;
float u16;
int u17;
int u18;
int u19;
void* u20;
} HitActor;
typedef struct{
void* Type; //0
void* u2;
int u3;
int u4;
Vector position; //10
int u5;
void* u6; //20
Vector scale;
Vector direction; //30
void* u7;
void* u8; //40
void* collist;
uint16_t colcount;
uint16_t u9;
int colsettings;
float u12; //50
float u13;
float u14;
float u15;
float u16; //60
int u17;
int u18;
int u19;
void* u20; //70
int u21;
int u22;
uint32_t status;
uint32_t laststatus;//80
int statustime;
void* u23[36]; //88
int flags; //118
void* u24[64];
char name[16]; //218
void* u25[180]; //228
MarioGamePad* gamepad; //4fc
} MarioActor;
struct EMario_t;
struct EnemyMario_t;
typedef struct EnemyMario_t{
void* Type; //0
void* u2;
int u3;
int u4;
Vector position; //10
int u5;
void* u6; //20
Vector scale;
Vector direction; //30
void* u7;
void* u8; //40
void* collist;
uint16_t colcount;
uint16_t u9;
int colsettings;
float u12; //50
float u13;
float u14;
float u15;
float u16; //60
int u17;
int u18;
int u19;
void* u20; //70
int u21;
int u22;
uint32_t status;
uint32_t laststatus;//80
int statustime;
void* u23[36]; //88
int flags; //118
void* u24[64];
char name[16]; //218
void* u25[180]; //228
MarioGamePad* gamepad; //4fc
void* u26[3940];
uint16_t emarioflags;
uint16_t emariodamage; //4294
uint16_t emariohealth; //4296
uint16_t u27; //4298
int u28;
int u29;
struct EMario_t* emario;
int u30;
int u31;
float u32;
float u33;
uint16_t u34;
uint16_t u35;
uint16_t u36;
uint16_t hpmetertimer;
} __attribute__((packed)) EnemyMario;
typedef struct EMario_t{
void* Type; //0
void* u2;
int u3;
int u4;
Vector position; //10
int u5;
void* u6; //20
Vector scale;
Vector direction; //30
void* u7;
void* u8; //40
void* collist;
uint16_t colcount;
uint16_t u9;
int colsettings;
float u12; //50
float u13;
float u14;
float u15;
float u16; //60
int u17;
int u18;
int u19;
void* u20; //70
void* u21[55];
EnemyMario* enemymario;
} __attribute__((packed)) EMario;
#define ITEMFLAG_STATIC 0x00000010
typedef struct{
void* Type;
void* u2;
int u3;
int u4;
Vector position;
int u5;
void* u6;
Vector scale;
Vector direction;
void* u7;
void* u8;
void* u9;
int u10;
int itemtype;
float u12;
float u13;
float u14;
float u15;
float u16;
int u17;
int u18;
int u19;
void* u20;
//0x74
int pad1[14];
Vector velocity;
int pad2[14];
int flags;
} ItemActor;
typedef struct {
int u1;
float u2;
} Sound;
typedef struct {
int x1;
int y1;
int x2;
int y2;
} JUTRect;
typedef struct {
void* type;
int content[64];
} J2DGrafContext;
typedef struct {
void* type;
int content[64];
} J2DOrthoGraph;
typedef struct {
void* type;
int content[9];
} J2DPrint;
typedef struct {
void* type;
} JUTResFont;
typedef struct {
} ResFONT;
typedef struct {
void* type;
int pad1[2];
int flags;
JUTRect bounds;
int content[100];
} J2DTextBox;
typedef struct {
void* type;
int content[64];
} J2DPane;
typedef struct {
void* type;
int content[64];
} J2DScreen;
typedef struct {
void* type;
} Talk2D;
typedef struct {
void* type;
} GCConsole;
typedef struct {
void* type;
} PollutionManager;
typedef struct {
void* type;
} ItemManager;
typedef struct {
void* type;
void* u1;
int flags1;
int flags2;
int timer;
} TrembleModelEffect;
typedef struct {
float a1[4];
float a2[4];
float a3[4];
} A3_A4_f;
//For C++ inheritence
#define GetObjectFunction( object, func ) (void*)*(void**)((int)*(int*)object + func)
#define Director_GameUpdate 0x64
#define HitActor_TouchPlayer 0x0148
#define HitActor_ReceiveMessage 0xA0
//Free is done automatically on stage transition
#define malloc(n) __nwa__FUl((n))
#define free(n) __dla__FUl((n))
void GXSetScissor(int x, int y, int x2, int y2);
void GXInvalidateTexAll();
void J2DOrthoGraph_Create(J2DOrthoGraph* targetaddr, JUTRect* view);
void J2DGrafContext_Setup2D(J2DGrafContext* graphics);
void J2DPrint_Create(J2DPrint* targetaddr, JUTResFont* font, int u);
float J2DPrint_GetWidth(J2DPrint* j2dprint, char* text);
void J2DPrint_Initiate(J2DPrint* j2dprint);
void J2DPrint_Print(J2DPrint* j2dprint, int x, int y, char* text, int u1, int u2, int u3);
void J2DPrint_Delete(J2DPrint* j2dprint, int mask);
#define GameFont (*(ResFONT**)((*(int*)(SceneReference - 0x6110)) + 0x48))
#define GameStrTable (RTOC - 0x4BC4)
void J2DTextBox_Create(J2DTextBox* targetaddr, int u1, JUTRect* bounds, ResFONT* font, void* table, int HBinding, int VBinding);
void J2DTextBox_Draw(J2DTextBox* textbox);
void J2DTextBox_Drawii(J2DTextBox* textbox, int a1, int a2);
void J2DTextBox_DrawSelf(J2DTextBox* textbox, int a1, int a2, A3_A4_f* matrix);
void J2DTextBox_SetString(J2DTextBox* textbox, char* string);
char* J2DTextBox_GetStringPtr(J2DTextBox* textbox);
void J2DTextBox_Delete(J2DTextBox* textbox);
void J2DPane_Draw(J2DPane* pane, int a1, int a2, J2DGrafContext* graphics, int a3);
void J2DPane_SetBasePosition(J2DPane* pane, int pos);
void J2DPane_MakeMatrix(J2DPane* pane, int a1, int a2);
void J2DScreen_Draw(J2DScreen* pane, int a1, int a2, J2DGrafContext* graphics, int a3);
void JUTRect_Set(JUTRect* rect, int x, int y, int w, int h);
void MarDirector_SetupObjects(MarDirector* director);
void Drama_PrepareUpdate(HitActor* this, int a1, void* drama, void* graphics, int obj);
/*
typedef ObjItemManager{
int a1;
int a2;
void (*__dt__)();
void (*GetType)();
void (*Load)();
void (*Save)();
void (*LoadAfter)();
void (*SearchF)();
void (*Perform)();
void (*CreateModelData)();
void (*CreateModelData)();
void (*CreateAnmData)();
void (*CreateModelDataArray)();
void (*ClipActors)();
void (*SetFlagOutOfCube)();
void (*CreateSpcBinary)();
bool (*HasMapCollision)();
}*/
register void* RTOC __asm ("r2");
register void* SceneReference __asm ("r13");
// GC
//static void (*GXSetBlendMode)(int a1, int a2, int a3, int a4) = (void*)0x80359ff0;
//static void (*GXBegin)(int a1, int a2, int a3) = (void*)0x803561a8;
static const Controller* Controllers = (Controller*)0x803fbbf4;
static const Controller* ControllerOne = (Controller*)0x803fbbf4;
static const Controller* ControllerTwo = (Controller*)0x803fbc00;
static const Controller* ControllerThree = (Controller*)0x803fbc0c;
static const Controller* ControllerFour = (Controller*)0x803fbc18;
static MarioGamePad* GamePads = (MarioGamePad*)0x8056f2ec;
static MarioGamePad* GamePadOne = (MarioGamePad*)0x8056f2ec;
static MarioGamePad* GamePadTwo = (MarioGamePad*)0x8056f3ec;
static MarioGamePad* GamePadThree = (MarioGamePad*)0x8056f4ec;
static MarioGamePad* GamePadFour = (MarioGamePad*)0x8056f5ec;
void MarioGamePad_Read();
void MarioGamePad_Update(MarioGamePad* pad);
void MarioGamePad_Reset(MarioGamePad* pad);
static void* gpSystemFont = (void*)0x80405850;
static void* gpRomFont = (void*)0x80405854;
// SMS
static void* gpApplication = (void*)0x803e10c0;
static Talk2D** TalkManager = (Talk2D**)0x80405458;
unsigned int CalcKeyCode(char* key);
void Vector_Add(Vector* v1, Vector* v2, Vector* vo);
void Vector_Subtract(Vector* v1, Vector* v2);
void Vector_Normalize(Vector* vi, Vector* vo);
void Vector_Scale(Vector* vi, float scale);
float Vector_Magnitude(Vector* v);
void Talk2D_OpenWindow(Talk2D* talkmanager, int a1, float f1);
void DrawWaterBackground(GCConsole* console);
void StampPollution(PollutionManager* pollution, int stamp, float x, float y, float z, float r);
void CleanPollution(PollutionManager* pollution, float x, float y, float z, float r);
// Stage
static MarDirector** gpMarDirector = (void*)0x80405840;
static void** gpItemManager = (void**)0x804055d8;
static void** gpMap = (void*)0x80405560;
static PollutionManager** gpPollution = (void*)0x80405598;
static void** gpStrategy = (void*)0x80405748;
static void** gpSunManager = (void*)0x80404820;
static HitActor** gpSunModel = (void*)0x80404828;
static uint8_t* ChangeScenario = (void*)0x003e9712;
static uint8_t* ChangeEpisode = (void*)0x003e9713;
void ChangeStage(MarDirector* director, uint32_t stageinfo);
HitActor* SearchF(void* namereflist, int keycode, char* ref);
#define SearchObjByRef(ref) SearchF((void*)*(((int*)*(int*)(SceneReference - 0x5e80)) + 1), CalcKeyCode((ref)), (ref))
int GetShineStage(uint8_t stageid);
int IsPolluted(void);
//Camera
static HitActor** gpCamera = (void*)0x80404808;
void Camera_AddMultiPlayer(void* camera, Vector* position);
void Camera_RemoveMultiPlayer(void* camera, Vector* position);
void Camera_CreateMultiPlayer(void* camera, unsigned char players);
// Mario
static HitActor** gpMarioOriginal = (void*)0x804057b0;
static HitActor** gpMarioAddress = (void*)0x804057d0;
#define GetFludd(mario) (HitActor*)((mario) + 0x03E4)
static Vector** gpMarioPos = (void*)0x804057d4;
static float** gpMarioAngleX = (void*)0x804057d8;
static float** gpMarioAngleY = (void*)0x804057dc;
static float** gpMarioAngleZ = (void*)0x804057e0;
static float** gpMarioSpeedX = (void*)0x804057e4;
static float** gpMarioSpeedY = (void*)0x804057e8;
static float** gpMarioSpeedZ = (void*)0x804057ec;
static const uint16_t** gpMarioLightID = (void*)0x804057f0;
static int** gpMarioFlag = (void*)0x804057f4;
static float** gpMarioThrowPower = (void*)0x804057f8;
static const void*** gpMarioGroundPlane = (void*)0x804057fc;
MarioActor* GetMarioHitActor();
HitActor* GetFLUDD();
HitActor* GetMarioYoshi();
int GetMarioHP();
int GetMarioStatus();
int GetMarioStatusFromHitActor(MarioActor* mario);
void IncGoldCoinFlag(uint32_t coinptr, int stage, int amount);
#define IncrementCoin(amount) incGoldCoinFlag(*(int*)(SceneReference - 0x6138), GetShineStage((*(int*)(gpApplication + 0x0E)) & 0xFF), (amount))
void GetMarioMapPosition();
void ThrowMario(void*, void*, float, float, float);
void SetMarioAnim(float a1, int a2, int a3);
int IsMarioJumping();
void SetMarioStatus(MarioActor* mario, int a2, int a3, int a4);
#define MarioDoJump(mario) SetMarioStatus((mario), 0x02000881, 0, 0)
#define MarioDoThrow(mario) SetMarioStatus((mario), 0x000208B8, 0, 0)
void EmitSweat(MarioActor* mario);
void Fludd_Emit(HitActor* fludd);
void Mario_StartVoice(MarioActor* mario, int id);
void Mario_SetGamePad(MarioActor* mario, MarioGamePad* gamepad);
void Mario_CheckController(HitActor* mario, void* drama, void* graphics);
void Mario_ReceiveMessage(MarioActor* mario, HitActor* other, unsigned long message);
void Mario_PlayerControl(MarioActor* mario, void* drama, void* graphics);
void Mario_CheckCollision(MarioActor* mario);
void Mario_DamageExec(MarioActor* mario, HitActor* other, int u1, int u2, int u3, float f1, int u4, float f2, short u5);
void Mario_IncHP(MarioActor* mario, int n);
void Mario_DecHP(MarioActor* mario, int n);
void EnemyMario_CheckController(HitActor* enemymario, void* drama, void* graphics);
void SetMarioVelocity(MarioActor* mario, float vel);
void StartTrembleEffect(TrembleModelEffect* effectmgr, float maxTremble, float minTremble, float damp, int timer);
void Mario_WearGlasses(MarioActor* mario);
#define GetMarioTrembleEffect(mario) ((TrembleModelEffect*)*((void**)(mario) + 0x014F))
#define MARIOMSG_THROW 0x07
#define MARIOMSG_HURTFIRE 0x0a
#define MARIOMSG_HURT 0x0e
void SendMsgToMario(MarioActor* mario, int msg);
// Objects
#define OBJ_WATER 0x20000002
#define OBJ_ONEUP 0x20000006
#define OBJ_COIN 0x2000000E
#define OBJ_BLUECOIN 0x20000010
#define OBJ_ROCKETNOZZLE 0x20000022
#define OBJ_HOVERNOZZLE 0x20000026
#define OBJ_TURBONOZZLE 0x2000002A
HitActor* MakeObjAppear(ItemManager* itemManager, int id);
// Effects
void GenerateEffectElectric(HitActor* pos);
// Music / SFX
void PlaySound(int rate, Sound* sfx, int nl1, int nl2, int nl3, int four);
void StartStageEntranceDemoSeq(int u1, int u2);
void StartBGM(int u1);
void StopBGM(int u1);
#endif

View file

@ -1,77 +0,0 @@
MarDirector_SetupObjects = 0x802af6c4;
PlaySound = 0x80018a30;
StartStageEntranceDemoSeq = 0x802b3850;
GenerateEffectElectric = 0x8025aba4;
MakeObjAppear = 0x801aecf4;
SendMsgToMario = 0x8026b5fc;
EmitSweat = 0x8025c3e8;
Mario_StartVoice = 0x8027d108;
Fludd_Emit = 0x80260d24;
SetMarioStatus = 0x8024bdc0;
IsMarioJumping = 0x8026b740;
Mario_SetAnim = 0x8023f3fc;
ThrowMario = 0x8024bf8c;
GetMarioMapPosition = 0x8007070c;
IncGoldCoinFlag = 0x8028c428;
GetMarioStatusFromHitActor = 0x8026b3d4;
GetMarioStatus = 0x8026b400;
GetMarioHP = 0x8026b67c;
GetMarioYoshi = 0x8026b78c;
GetFLUDD = 0x8026b64c;
GetMarioHitActor = 0x8026b760;
GetShineStage = 0x802a0b70;
SearchF = 0x802f2954;
ChangeStage = 0x802921b4;
DrawWaterBackground = 0x8013df34;
Talk2D_OpenWindow = 0x801451a4;
Vector_Magnitude = 0x80222368;
Vector_Normalize = 0x80222390;
Vector_Subtract = 0x80010cfc;
Vector_Add = 0x803427c8;
Vector_Scale = 0x80342810;
CalcKeyCode = 0x802f2680;
JUTRect_Set = 0x802c2274;
J2DScreen_Draw = 0x802c7f50;
J2DPane_MakeMatrix = 0x802c3c90;
J2DPane_SetBasePosition = 0x802c3ee8;
J2DPane_Draw = 0x802c3768;
J2DTextBox_Delete = 0x802c8bbc;
J2DTextBox_GetStringPtr = 0x802c8e08;
J2DTextBox_SetString = 0x802c8e10;
J2DTextBox_DrawSelf = 0x802c8f80;
J2DTextBox_Drawii = 0x802c8cd0;
J2DTextBox_Draw = 0x802c8cd0;
J2DTextBox_Create = 0x802c89f0;
J2DPrint_Delete = 0x802c5e04;
J2DPrint_Print = 0x802c6180;
J2DPrint_Initiate = 0x802c5e50;
J2DPrint_GetWidth = 0x802c643c;
J2DPrint_Create = 0x802c5d10;
J2DGrafContext_Setup2D = 0x802e3864;
J2DOrthoGraph_Create = 0x802e5174;
GXInvalidateTexAll = 0x80358620;
GXSetScissor = 0x8035b358;
StampPollution = 0x8019670c;
CleanPollution = 0x8019663c;
Drama_PrepareUpdate = 0x802f4e24;
StartTrembleEffect = 0x8021ef1c;
SetMarioVelocity = 0x8024d4c0;
Mario_SetGamePad = 0x8026e378;
MarioGamePad_Read = 0x802a00fc;
MarioGamePad_Update = 0x802a0188;
MarioGamePad_Reset = 0x802a0a24;
EMario_Create = 0x80039c68;
Mario_CheckController = 0x80249220;
Mario_CheckCollision = 0x80278d74;
Mario_ReceiveMessage = 0x8027a880;
Mario_PlayerControl = 0x80245bc4;
Mario_DamageExec = 0x8023a598;
Mario_IncHP = 0x8023b6b4;
Mario_DecHP = 0x8023b5b4;
EnemyMario_CheckController = 0x8003ff5c;
Camera_AddMultiPlayer = 0x80030d78;
Camera_RemoveMultiPlayer = 0x80030ce0;
Camera_CreateMultiPlayer = 0x80030dd4;
Mario_DrawHP = 0x8003fc14;
IsPolluted = 0x80199b70;
Mario_WearGlasses = 0x8023fd30;

182
smsFuncs
View file

@ -1,182 +0,0 @@
CARDInit = 0x803551a0;
CARDMount = 0x803588dc;
CARDOpen = 0x8035938c;
CARDCreate = 0x803598a8;
CARDRead = 0x80359d20;
CARDWrite = 0x8035a09c;
MarDirector_SetupObjects = 0x802b76f4;
PlaySound = 0x800189d4;
StartBGM = 0x80016978;
StopBGM = 0x8001686c;
StopBGMS = 0x80016740;
search = 0x80016d44;
searchPane = 0x802d0050;
StartStageEntranceDemoSeq = 0x802bb880;
GenerateEffectElectric = 0x80262E18;
MakeObjAppear = 0x801b6e3c;
makeShineAppearWithDemo = 0x801c018c;
SendMsgToMario = 0x80273870;
EmitSweat = 0x8026465c;
Mario_StartVoice = 0x8028537c;
Fludd_Emit = 0x80268f98;
SetMarioStatus = 0x80254034;
IsMarioJumping = 0x802739b4;
IsMarioDashing = 0x8027372c;
initAnimSound = 0x80012eb0;
setMarioAnim = 0x80247670;
ThrowMario = 0x80254200;
GetMarioMapPosition = 0x8007706c;
IncGoldCoinFlag = 0x80294610;
GetMarioStatusFromHitActor = 0x80273648;
GetMarioStatus = 0x80273674;
GetMarioHP = 0x802738f0;
GetMarioYoshi = 0x80273a00;
GetFLUDD = 0x802738c0;
GetMarioHitActor = 0x802739d4;
GetShineStage = 0x802a8ac8;
getGlbResource = 0x802c2fb0;
SearchF = 0x802fa7ac;
setSrcRect = 0x802f884c;
setFrameRate = 0x80238e7c;
ChangeStage = 0x8029a31c;
DrawWaterBackground = 0x801492A4;
Talk2D_OpenWindow = 0x80150514;
Vector_Magnitude = 0x8022a414;
Vector_Normalize = 0x8022a43c;
Vector_Subtract = 0x80010ca0;
Vector_Add = 0x8034a56c;
Vector_Scale = 0x8034a5b4;
readData = 0x802c6178;
CalcKeyCode = 0x802fa4d8;
C_MTXLookAt = 0x80349f5c;
JUTRect_Set = 0x802ca1e0;
J2DScreen_Draw = 0x802cfda8;
J2DPane_MakeMatrix = 0x802cbbfc;
J2DPane_SetBasePosition = 0x802cbe54;
J2DPane_Draw = 0x802cb6d4;
J2DTextBox_Delete = 0x802d0a14;
J2DTextBox_GetStringPtr = 0x802d0c60;
J2DTextBox_SetString = 0x802d0c68;
J2DTextBox_DrawSelf = 0x802d0dd8;
J2DTextBox_Drawii = 0x802d0b28;
J2DTextBox_Draw = 0x802d0b28;
J2DTextBox_Create = 0x802d0848;
J2DPrint_Delete = 0x802cdd70;
J2DPrint_Print = 0x802ce0ec;
J2DPrint_Initiate = 0x802cddbc;
J2DPrint_GetWidth = 0x802ce294;
J2DPrint_Create = 0x802cdc7c;
J2DGrafContext_Setup2D = 0x802eb6bc;
J2DOrthoGraph_Create = 0x802ecfcc;
JSURead = 0x802c5770;
GXInvalidateTexAll = 0x80360400;
GXSetProjection = 0x80362c34;
GXSetScissor = 0x80363138;
GXSetViewport = 0x803630c8;
GXFlush = 0x8035d8f0;
getDistance = 0x801b9068;
StampPollution = 0x8019de84;
CleanPollution = 0x8019ddb4;
Drama_PrepareUpdate = 0x802fcc94;
StartTrembleEffect = 0x80226fc8;
SetMarioVelocity = 0x80255734;
Mario_SetGamePad = 0x802765ec;
MarioGamePad_Read = 0x802a8054;
MarioGamePad_Update = 0x802a80e0;
MarioGamePad_Reset = 0x802a897c;
EMario_Create = 0x80039bb0;
Mario_CheckController = 0x80251494;
Mario_CheckCollision = 0x80280fe8;
Mario_ReceiveMessage = 0x80282af4;
Mario_PlayerControl = 0x8024de38;
Mario_DamageExec = 0x8024280c;
Mario_IncHP = 0x80243928;
Mario_DecHP = 0x80243828;
mario_initModel = 0x80246578;
mario_initValues = 0x802766b0;
EnemyMario_CheckController = 0x8004010c;
Camera_AddMultiPlayer = 0x80030cc0;
Camera_RemoveMultiPlayer = 0x80030c28;
Camera_CreateMultiPlayer = 0x80030d1c;
Mario_DrawHP = 0x8003fdc4;
IsPolluted = 0x801a12e8;
Mario_WearGlasses = 0x80247fa4;
emitGetCoinEffect = 0x80264550;
emitGotEffect = 0x802645dc;
changeTexture = 0x802cc6a0;
setPanePosition = 0x8015508c;
setAnimSound = 0x80217a8c;
setTalkBox = 0x801515a0;
Destroy = 0x801b4114;
destroyCol = 0x801b1130;
objAppear = 0x801b0430;
openNormalTalkWindow = 0x80152fb0;
startCameraDemo = 0x80032a84;
coinTaken = 0x801bec88;
redCoinTaken = 0x801be428;
startAppearGo = 0x80171bb8;
updatePane = 0x8013ebf0;
updateBoundPane = 0x80154c98;
updateBlendPane = 0x8017900c;
movePane = 0x8013eeb0;
processAppearCoin = 0x80146104;
startAppearCoin = 0x8014c7e8;
processDownCoin = 0x801466f0;
initModelData = 0x801b1c34;
ObjHitCheck_CheckActorsHit = 0x8021b900;
ObjHitCheck_DetectHit = 0x8021c29c;
MapObjBase_RemoveMapCollision = 0x801b1130;
WaterGun_ChangeNozzle = 0x8026a164;
Mario_InitValues = 0x802766b0;
Mario_GetOffYoshi = 0x8024eb6c;
Mario_WaterGunUpdate = 0x8024e300;
Yoshi_Ride = 0x802703e8;
WaterGun_Create = 0x8026aa48;
WaterGun_Init = 0x8026a3bc;
WaterGun_Update = 0x8026971c;
ParticleManager_EmitWithRotate = 0x8028844c;
PolarSubCamera_UpdateMultiplayer = 0x800308b4;
CLBPolarToCross = 0x800289b4;
ModelWaterManager_EmitRequest = 0x8027fc84;
WaterEmitInfo_Create = 0x802806f4;
MapObjBase_EmitSplash = 0x801b8d34;
cosf = 0x8033c610;
sinf = 0x8033c630;
sqrtf = 0x800067e8;
PSMTXCopy = 0x803499bc;
marioCanTake = 0x80243550;
marioStartVoice = 0x8028537c;
getModel = 0x80218a50;
showAllShapePacket = 0x80235728;
makeObjAppeared = 0x801b0430;
startMapObjAnim = 0x801b09d4;
startSoundSystemSE = 0x80018864;
setBuffer = 0x802c6164;
createMActor = 0x8021cc74;
startAnimation = 0x80239e64;
setBTP = 0x80238898;
setUpMapCollision = 0x801b238c;
changeCollision = 0x8018e5e0;
startJAIStream = 0x80309504;
loadToMainRAM = 0x802ea8fc;
loadToARAM = 0x802ebba0;
loadModelData = 0x8021d5a4;
loadBCKDataBase = 0x802e8ca4;
DVDOpen = 0x8034b914;
DVDPrepareStreamASync = 0x8034beb0;
DVDStopStreamAtEndAsync = 0x8034de6c;
DVDCancelStreamAsync = 0x8034ddb0;
Mario_SetAnim = 0x80247670;
ThrowMario = 0x8007706c;
GetMarioStatus = 0x802738f0;
GetMarioHP = 0x80273674;
Mario_Trample = 0x802432b8;
Mario_SetAnimation = 0x80247670;
Mario_SetStatusToJumping = 0x802543a0;
Application_Init = 0x802a73c4;
EasyEmitParticle = 0x8000e3a4;
StartSoundActorWithInfo = 0x800185f4;
Camera_CalcFinalPosAndAt = 0x80023950;
Camera_UpdateGameCamera = 0x800234e8;
movePane = 0x8013eeb0;
PSMTXCopy = 0x803499bc;