mirror of https://github.com/zeldaret/mm.git
Script fixes, Type 1 cylinders fixed, rename `main` (#256)
* Fix actor_symbols.py * Temporary fix to rename_sym.sh * Fix the few Type1 cylinders * Rename main -> Main * chmod rename_global_asm, fix asm in rename_syms * Format
This commit is contained in:
parent
36e6f8cb3d
commit
823281291b
|
@ -3329,7 +3329,7 @@ void func_80174AA0(ListAlloc* alloc);
|
||||||
// void func_80174AB4(void);
|
// void func_80174AB4(void);
|
||||||
// void func_80174B20(void);
|
// void func_80174B20(void);
|
||||||
void func_80174BA0(ListAlloc* alloc);
|
void func_80174BA0(ListAlloc* alloc);
|
||||||
void main(void* arg);
|
void Main(void* arg);
|
||||||
// u32 Padmgr_GetControllerBitmask(void);
|
// u32 Padmgr_GetControllerBitmask(void);
|
||||||
// void func_80174F24(void);
|
// void func_80174F24(void);
|
||||||
// void func_80174F44(void);
|
// void func_80174F44(void);
|
||||||
|
|
|
@ -70,7 +70,7 @@ void Main_ThreadEntry(void* arg) {
|
||||||
IrqMgr_Init(&gIrqMgr, &sIrqMgrStackInfo, Z_PRIORITY_IRQMGR, 1);
|
IrqMgr_Init(&gIrqMgr, &sIrqMgrStackInfo, Z_PRIORITY_IRQMGR, 1);
|
||||||
DmaMgr_Start();
|
DmaMgr_Start();
|
||||||
Idle_InitCodeAndMemory();
|
Idle_InitCodeAndMemory();
|
||||||
main(arg);
|
Main(arg);
|
||||||
DmaMgr_Stop();
|
DmaMgr_Stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
|
||||||
#pragma GLOBAL_ASM("asm/non_matchings/code/main/main.s")
|
#pragma GLOBAL_ASM("asm/non_matchings/code/main/Main.s")
|
||||||
|
|
|
@ -22,9 +22,9 @@ const ActorInit En_Akindonuts_InitVars = {
|
||||||
(ActorFunc)EnAkindonuts_Draw,
|
(ActorFunc)EnAkindonuts_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
// static ColliderCylinderInit sCylinderInit = {
|
// static ColliderCylinderInitType1 sCylinderInit = {
|
||||||
static ColliderCylinderInit D_80BF02F0 = {
|
static ColliderCylinderInitType1 D_80BF02F0 = {
|
||||||
{ COLTYPE_NONE, AT_NONE, AC_ON | AC_TYPE_PLAYER, OC1_ON | OC1_TYPE_ALL, OC2_HIT_PLAYER, COLSHAPE_JNTSPH, },
|
{ COLTYPE_NONE, AT_NONE, AC_ON | AC_TYPE_PLAYER, OC1_ON | OC1_TYPE_ALL, COLSHAPE_CYLINDER, },
|
||||||
{ ELEMTYPE_UNK0, { 0x00000000, 0x00, 0x00 }, { 0xF7CFFFFF, 0x00, 0x00 }, TOUCH_NONE | TOUCH_SFX_NORMAL, BUMP_ON, OCELEM_ON, },
|
{ ELEMTYPE_UNK0, { 0x00000000, 0x00, 0x00 }, { 0xF7CFFFFF, 0x00, 0x00 }, TOUCH_NONE | TOUCH_SFX_NORMAL, BUMP_ON, OCELEM_ON, },
|
||||||
{ 27, 32, 0, { 0, 0, 0 } },
|
{ 27, 32, 0, { 0, 0, 0 } },
|
||||||
};
|
};
|
||||||
|
|
|
@ -22,23 +22,23 @@ const ActorInit En_Fz_InitVars = {
|
||||||
(ActorFunc)EnFz_Draw,
|
(ActorFunc)EnFz_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
// static ColliderCylinderInit sCylinderInit = {
|
// static ColliderCylinderInitType1 sCylinderInit = {
|
||||||
static ColliderCylinderInit D_809346F8 = {
|
static ColliderCylinderInitType1 D_809346F8 = {
|
||||||
{ COLTYPE_NONE, AT_ON | AT_TYPE_ENEMY, AC_ON | AC_TYPE_PLAYER, OC1_ON | OC1_TYPE_ALL, OC2_HIT_PLAYER, COLSHAPE_JNTSPH, },
|
{ COLTYPE_NONE, AT_ON | AT_TYPE_ENEMY, AC_ON | AC_TYPE_PLAYER, OC1_ON | OC1_TYPE_ALL, COLSHAPE_CYLINDER, },
|
||||||
{ ELEMTYPE_UNK0, { 0xF7CFFFFF, 0x00, 0x00 }, { 0xF7CFEFDD, 0x00, 0x00 }, TOUCH_ON | TOUCH_SFX_NORMAL, BUMP_ON | BUMP_HOOKABLE, OCELEM_ON, },
|
{ ELEMTYPE_UNK0, { 0xF7CFFFFF, 0x00, 0x00 }, { 0xF7CFEFDD, 0x00, 0x00 }, TOUCH_ON | TOUCH_SFX_NORMAL, BUMP_ON | BUMP_HOOKABLE, OCELEM_ON, },
|
||||||
{ 30, 80, 0, { 0, 0, 0 } },
|
{ 30, 80, 0, { 0, 0, 0 } },
|
||||||
};
|
};
|
||||||
|
|
||||||
// static ColliderCylinderInit sCylinderInit = {
|
// static ColliderCylinderInitType1 sCylinderInit = {
|
||||||
static ColliderCylinderInit D_80934724 = {
|
static ColliderCylinderInitType1 D_80934724 = {
|
||||||
{ COLTYPE_METAL, AT_NONE, AC_ON | AC_HARD | AC_TYPE_PLAYER, OC1_NONE, OC2_HIT_PLAYER, COLSHAPE_JNTSPH, },
|
{ COLTYPE_METAL, AT_NONE, AC_ON | AC_HARD | AC_TYPE_PLAYER, OC1_NONE, COLSHAPE_CYLINDER, },
|
||||||
{ ELEMTYPE_UNK0, { 0xF7CFFFFF, 0x00, 0x00 }, { 0x00001022, 0x00, 0x00 }, TOUCH_NONE | TOUCH_SFX_NORMAL, BUMP_ON, OCELEM_NONE, },
|
{ ELEMTYPE_UNK0, { 0xF7CFFFFF, 0x00, 0x00 }, { 0x00001022, 0x00, 0x00 }, TOUCH_NONE | TOUCH_SFX_NORMAL, BUMP_ON, OCELEM_NONE, },
|
||||||
{ 35, 80, 0, { 0, 0, 0 } },
|
{ 35, 80, 0, { 0, 0, 0 } },
|
||||||
};
|
};
|
||||||
|
|
||||||
// static ColliderCylinderInit sCylinderInit = {
|
// static ColliderCylinderInitType1 sCylinderInit = {
|
||||||
static ColliderCylinderInit D_80934750 = {
|
static ColliderCylinderInitType1 D_80934750 = {
|
||||||
{ COLTYPE_NONE, AT_ON | AT_TYPE_ENEMY, AC_NONE, OC1_NONE, OC2_HIT_PLAYER, COLSHAPE_JNTSPH, },
|
{ COLTYPE_NONE, AT_ON | AT_TYPE_ENEMY, AC_NONE, OC1_NONE, COLSHAPE_CYLINDER, },
|
||||||
{ ELEMTYPE_UNK0, { 0x20000000, 0x02, 0x04 }, { 0x00000000, 0x00, 0x00 }, TOUCH_ON | TOUCH_SFX_NORMAL, BUMP_NONE, OCELEM_NONE, },
|
{ ELEMTYPE_UNK0, { 0x20000000, 0x02, 0x04 }, { 0x00000000, 0x00, 0x00 }, TOUCH_ON | TOUCH_SFX_NORMAL, BUMP_NONE, OCELEM_NONE, },
|
||||||
{ 20, 30, -15, { 0, 0, 0 } },
|
{ 20, 30, -15, { 0, 0, 0 } },
|
||||||
};
|
};
|
||||||
|
|
|
@ -40,9 +40,9 @@ const ActorInit En_Gb2_InitVars = {
|
||||||
(ActorFunc)EnGb2_Draw,
|
(ActorFunc)EnGb2_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
// static ColliderCylinderInit sCylinderInit = {
|
// static ColliderCylinderInitType1 sCylinderInit = {
|
||||||
static ColliderCylinderInit D_80B11A40 = {
|
static ColliderCylinderInitType1 D_80B11A40 = {
|
||||||
{ COLTYPE_NONE, AT_NONE, AC_NONE, OC1_ON | OC1_TYPE_ALL, OC2_HIT_PLAYER, COLSHAPE_JNTSPH, },
|
{ COLTYPE_NONE, AT_NONE, AC_NONE, OC1_ON | OC1_TYPE_ALL, COLSHAPE_CYLINDER, },
|
||||||
{ ELEMTYPE_UNK0, { 0x00000000, 0x00, 0x00 }, { 0x00000000, 0x00, 0x00 }, TOUCH_NONE | TOUCH_SFX_NORMAL, BUMP_NONE, OCELEM_ON, },
|
{ ELEMTYPE_UNK0, { 0x00000000, 0x00, 0x00 }, { 0x00000000, 0x00, 0x00 }, TOUCH_NONE | TOUCH_SFX_NORMAL, BUMP_NONE, OCELEM_ON, },
|
||||||
{ 40, 75, 0, { 0, 0, 0 } },
|
{ 40, 75, 0, { 0, 0, 0 } },
|
||||||
};
|
};
|
||||||
|
|
|
@ -22,9 +22,9 @@ const ActorInit En_Ms_InitVars = {
|
||||||
(ActorFunc)EnMs_Draw,
|
(ActorFunc)EnMs_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
// static ColliderCylinderInit sCylinderInit = {
|
// static ColliderCylinderInitType1 sCylinderInit = {
|
||||||
static ColliderCylinderInit D_80952BA0 = {
|
static ColliderCylinderInitType1 D_80952BA0 = {
|
||||||
{ COLTYPE_NONE, AT_NONE, AC_ON | AC_TYPE_PLAYER, OC1_ON | OC1_TYPE_ALL, OC2_HIT_PLAYER, COLSHAPE_JNTSPH, },
|
{ COLTYPE_NONE, AT_NONE, AC_ON | AC_TYPE_PLAYER, OC1_ON | OC1_TYPE_ALL, COLSHAPE_CYLINDER, },
|
||||||
{ ELEMTYPE_UNK0, { 0x00000000, 0x00, 0x00 }, { 0xF7CFFFFF, 0x00, 0x00 }, TOUCH_NONE | TOUCH_SFX_NORMAL, BUMP_ON, OCELEM_ON, },
|
{ ELEMTYPE_UNK0, { 0x00000000, 0x00, 0x00 }, { 0xF7CFFFFF, 0x00, 0x00 }, TOUCH_NONE | TOUCH_SFX_NORMAL, BUMP_ON, OCELEM_ON, },
|
||||||
{ 22, 37, 0, { 0, 0, 0 } },
|
{ 22, 37, 0, { 0, 0, 0 } },
|
||||||
};
|
};
|
||||||
|
|
|
@ -22,9 +22,9 @@ const ActorInit En_Scopenuts_InitVars = {
|
||||||
(ActorFunc)EnScopenuts_Draw,
|
(ActorFunc)EnScopenuts_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
// static ColliderCylinderInit sCylinderInit = {
|
// static ColliderCylinderInitType1 sCylinderInit = {
|
||||||
static ColliderCylinderInit D_80BCCB40 = {
|
static ColliderCylinderInitType1 D_80BCCB40 = {
|
||||||
{ COLTYPE_NONE, AT_NONE, AC_ON | AC_TYPE_PLAYER, OC1_ON | OC1_TYPE_ALL, OC2_HIT_PLAYER, COLSHAPE_JNTSPH, },
|
{ COLTYPE_NONE, AT_NONE, AC_ON | AC_TYPE_PLAYER, OC1_ON | OC1_TYPE_ALL, COLSHAPE_CYLINDER, },
|
||||||
{ ELEMTYPE_UNK0, { 0x00000000, 0x00, 0x00 }, { 0xF7CFFFFF, 0x00, 0x00 }, TOUCH_NONE | TOUCH_SFX_NORMAL, BUMP_ON, OCELEM_ON, },
|
{ ELEMTYPE_UNK0, { 0x00000000, 0x00, 0x00 }, { 0xF7CFFFFF, 0x00, 0x00 }, TOUCH_NONE | TOUCH_SFX_NORMAL, BUMP_ON, OCELEM_ON, },
|
||||||
{ 27, 32, 0, { 0, 0, 0 } },
|
{ 27, 32, 0, { 0, 0, 0 } },
|
||||||
};
|
};
|
||||||
|
|
|
@ -22,9 +22,9 @@ const ActorInit En_Sellnuts_InitVars = {
|
||||||
(ActorFunc)EnSellnuts_Draw,
|
(ActorFunc)EnSellnuts_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
// static ColliderCylinderInit sCylinderInit = {
|
// static ColliderCylinderInitType1 sCylinderInit = {
|
||||||
static ColliderCylinderInit D_80ADD964 = {
|
static ColliderCylinderInitType1 D_80ADD964 = {
|
||||||
{ COLTYPE_NONE, AT_NONE, AC_ON | AC_TYPE_PLAYER, OC1_ON | OC1_TYPE_ALL, OC2_HIT_PLAYER, COLSHAPE_JNTSPH, },
|
{ COLTYPE_NONE, AT_NONE, AC_ON | AC_TYPE_PLAYER, OC1_ON | OC1_TYPE_ALL, COLSHAPE_CYLINDER, },
|
||||||
{ ELEMTYPE_UNK0, { 0x00000000, 0x00, 0x00 }, { 0xF7CFFFFF, 0x00, 0x00 }, TOUCH_NONE | TOUCH_SFX_NORMAL, BUMP_ON, OCELEM_ON, },
|
{ ELEMTYPE_UNK0, { 0x00000000, 0x00, 0x00 }, { 0xF7CFFFFF, 0x00, 0x00 }, TOUCH_NONE | TOUCH_SFX_NORMAL, BUMP_ON, OCELEM_ON, },
|
||||||
{ 27, 32, 0, { 0, 0, 0 } },
|
{ 27, 32, 0, { 0, 0, 0 } },
|
||||||
};
|
};
|
||||||
|
|
|
@ -3163,7 +3163,7 @@
|
||||||
0x80174AB4:("func_80174AB4",),
|
0x80174AB4:("func_80174AB4",),
|
||||||
0x80174B20:("func_80174B20",),
|
0x80174B20:("func_80174B20",),
|
||||||
0x80174BA0:("func_80174BA0",),
|
0x80174BA0:("func_80174BA0",),
|
||||||
0x80174BF0:("main",),
|
0x80174BF0:("Main",),
|
||||||
0x80174F10:("Padmgr_GetControllerBitmask",),
|
0x80174F10:("Padmgr_GetControllerBitmask",),
|
||||||
0x80174F24:("func_80174F24",),
|
0x80174F24:("func_80174F24",),
|
||||||
0x80174F44:("func_80174F44",),
|
0x80174F44:("func_80174F44",),
|
||||||
|
|
|
@ -731,10 +731,10 @@ def resolve_symbol(address):
|
||||||
for entry in actor_tbl:
|
for entry in actor_tbl:
|
||||||
if address >= 0x80000000:
|
if address >= 0x80000000:
|
||||||
if entry[3] <= address < entry[4]:
|
if entry[3] <= address < entry[4]:
|
||||||
return repo + "baserom/overlays" + os.sep + entry[0], address - entry[3]
|
return repo + "baserom" + os.sep + entry[0], address - entry[3]
|
||||||
else:
|
else:
|
||||||
if entry[1] <= address < entry[2]:
|
if entry[1] <= address < entry[2]:
|
||||||
return repo + "baserom/overlays" + os.sep + entry[0], address - entry[1]
|
return repo + "baserom" + os.sep + entry[0], address - entry[1]
|
||||||
else:
|
else:
|
||||||
raise RuntimeError('Symbol not found in actor overlay table file ranges. Are you sure the file is an actor overlay?')
|
raise RuntimeError('Symbol not found in actor overlay table file ranges. Are you sure the file is an actor overlay?')
|
||||||
|
|
||||||
|
|
|
@ -10,4 +10,4 @@ fi
|
||||||
|
|
||||||
#echo "Replace $1 with $2?"
|
#echo "Replace $1 with $2?"
|
||||||
#read
|
#read
|
||||||
grep -rl "$1" asm/**/*.asm src/**/*.{c,h} include/**/*.h tables/*.txt undef.txt | xargs sed -i "s/\b$1\b/$2/g"
|
grep -rl "$1" asm/**/*.s src/**/*.{c,h} include/**/*.h tools/disasm/functions.txt tools/disasm/variables.txt | xargs sed -i "s/\b$1\b/$2/g"
|
Loading…
Reference in New Issue