Skip to content
6 changes: 5 additions & 1 deletion config/GLME01/splits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,14 @@ Sato/EnemyStrategy.cpp:
.sdata start:0x804D2E60 end:0x804D2E78

Koga/EnAttackBase.cpp:
.text start:0x800CF63C end:0x800CF6A8
.text start:0x800CF63C end:0x800CF854
.ctors start:0x8020BBD8 end:0x8020BBDC
.data start:0x80361E78 end:0x80361FA4
.sdata start:0x804D3AF8 end:0x804D3B20

Koga/EnTypesManager.cpp:
.text start:0x800DA498 end:0x800DB168

Koga/EnManager.cpp:
.text start:0x800E4514 end:0x800E9DC8
.ctors start:0x8020BC28 end:0x8020BC30
Expand Down
76 changes: 38 additions & 38 deletions config/GLME01/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3169,7 +3169,7 @@ fn_800B9C3C = .text:0x800B9C3C; // type:function size:0x4
fn_800B9C40 = .text:0x800B9C40; // type:function size:0xC4
fn_800B9D04 = .text:0x800B9D04; // type:function size:0x18
curGameModeCreate__Q24Koga12GameModeUtilFv = .text:0x800B9D1C; // type:function size:0x24
fn_800B9D40__Q24Koga12GameModeUtilFv = .text:0x800B9D40; // type:function size:0x30
curGameModeLoadEnemyInfo__Q24Koga12GameModeUtilFv = .text:0x800B9D40; // type:function size:0x30
fn_800B9D70__Q24Koga12GameModeUtilFv = .text:0x800B9D70; // type:function size:0x30
curGameModeDraw__Q24Koga12GameModeUtilFv = .text:0x800B9DA0; // type:function size:0x30
curGameModeDestroy__Q24Koga12GameModeUtilFv = .text:0x800B9DD0; // type:function size:0x3C
Expand Down Expand Up @@ -3206,7 +3206,7 @@ load__10TBaseParamFR20JSUMemoryInputStream = .text:0x800BA7DC; // type:function
__ct__Q24Koga8GameModeFv = .text:0x800BA7E0; // type:function size:0x3C
__dt__Q24Koga8GameModeFv = .text:0x800BA81C; // type:function size:0x5C
init__Q24Koga8GameModeFv = .text:0x800BA878; // type:function size:0x4
vt_10__Q24Koga8GameModeFv = .text:0x800BA87C; // type:function size:0x4
loadEnemyInfo__Q24Koga8GameModeFv = .text:0x800BA87C; // type:function size:0x4
vt_14__Q24Koga8GameModeFv = .text:0x800BA880; // type:function size:0x4
vt_18__Q24Koga8GameModeFv = .text:0x800BA884; // type:function size:0x4
__ct__Q24Koga12GameModeBaseFv = .text:0x800BA888; // type:function size:0x30
Expand All @@ -3215,7 +3215,7 @@ __ct__Q24Koga11MissionModeFv = .text:0x800BA8C8; // type:function size:0x118
vt_8__Q24Koga11MissionModeFs = .text:0x800BA9E0; // type:function size:0x11C
create__Q24Koga11MissionModeFv = .text:0x800BAAFC; // type:function size:0x50
init__Q24Koga11MissionModeFv = .text:0x800BAB4C; // type:function size:0x1F0
vt_10__Q24Koga11MissionModeFv = .text:0x800BAD3C; // type:function size:0x4C
loadEnemyInfo__Q24Koga11MissionModeFv = .text:0x800BAD3C; // type:function size:0x4C
loadCollisionInfo__Q24Koga11MissionModeFPCcPCc = .text:0x800BAD88; // type:function size:0x8C
toggleBlackoutTables__Q24Koga11MissionModeFQ34Koga11MissionMode7Mission = .text:0x800BAE14; // type:function size:0x1E8
addJmpReceiver__Q24Koga11MissionModeFPv = .text:0x800BAFFC; // type:function size:0x24
Expand Down Expand Up @@ -4204,11 +4204,11 @@ fn_800DA26C = .text:0x800DA26C; // type:function size:0x34
fn_800DA2A0 = .text:0x800DA2A0; // type:function size:0x140
fn_800DA3E0 = .text:0x800DA3E0; // type:function size:0x1C
fn_800DA3FC = .text:0x800DA3FC; // type:function size:0x9C
fn_800DA498 = .text:0x800DA498; // type:function size:0x47C
fn_800DA914 = .text:0x800DA914; // type:function size:0x64
__ct__10EnemyParamFv = .text:0x800DA498; // type:function size:0x47C
__dt__Q24Koga14EnTypesManagerFv = .text:0x800DA914; // type:function size:0x64
newManager__Q24Koga14EnTypesManagerFv = .text:0x800DA978; // type:function size:0x74
deleteManager__Q24Koga14EnTypesManagerFv = .text:0x800DA9EC; // type:function size:0x44
loadParameters__Q24Koga14EnTypesManagerFv = .text:0x800DAA30; // type:function size:0xC8
loadCTPParams__Q24Koga14EnTypesManagerFv = .text:0x800DAA30; // type:function size:0xC8
fn_800DAAF8 = .text:0x800DAAF8; // type:function size:0x20
fn_800DAB18 = .text:0x800DAB18; // type:function size:0x8C
fn_800DABA4 = .text:0x800DABA4; // type:function size:0x70
Expand All @@ -4217,32 +4217,32 @@ fn_800DAC54 = .text:0x800DAC54; // type:function size:0x18
fn_800DAC6C = .text:0x800DAC6C; // type:function size:0x18
fn_800DAC84 = .text:0x800DAC84; // type:function size:0x7C
fn_800DAD00 = .text:0x800DAD00; // type:function size:0x90
fn_800DAD90 = .text:0x800DAD90; // type:function size:0x18
fn_800DADA8 = .text:0x800DADA8; // type:function size:0x18
fn_800DADC0 = .text:0x800DADC0; // type:function size:0x18
fn_800DADD8 = .text:0x800DADD8; // type:function size:0x18
fn_800DADF0 = .text:0x800DADF0; // type:function size:0x18
fn_800DAE08 = .text:0x800DAE08; // type:function size:0x18
fn_800DAE20 = .text:0x800DAE20; // type:function size:0x18
fn_800DAE38 = .text:0x800DAE38; // type:function size:0x18
fn_800DAE50 = .text:0x800DAE50; // type:function size:0x18
fn_800DAE68 = .text:0x800DAE68; // type:function size:0x18
fn_800DAE80 = .text:0x800DAE80; // type:function size:0x18
fn_800DAE98 = .text:0x800DAE98; // type:function size:0x18
fn_800DAEB0 = .text:0x800DAEB0; // type:function size:0x18
fn_800DAEC8 = .text:0x800DAEC8; // type:function size:0x18
fn_800DAEE0 = .text:0x800DAEE0; // type:function size:0x18
fn_800DAEF8 = .text:0x800DAEF8; // type:function size:0x18
fn_800DAF10 = .text:0x800DAF10; // type:function size:0x18
fn_800DAF28 = .text:0x800DAF28; // type:function size:0x18
fn_800DAF40 = .text:0x800DAF40; // type:function size:0x18
fn_800DAF58 = .text:0x800DAF58; // type:function size:0x18
fn_800DAF70 = .text:0x800DAF70; // type:function size:0x28
fn_800DAF98 = .text:0x800DAF98; // type:function size:0x28
fn_800DAFC0 = .text:0x800DAFC0; // type:function size:0x18
fn_800DAFD8 = .text:0x800DAFD8; // type:function size:0x18
fn_800DAFF0 = .text:0x800DAFF0; // type:function size:0x18
fn_800DB008 = .text:0x800DB008; // type:function size:0x2C
getEnemyLife__Q24Koga14EnTypesManagerFi = .text:0x800DAD90; // type:function size:0x18
getEnemyHitDamage__Q24Koga14EnTypesManagerFi = .text:0x800DADA8; // type:function size:0x18
getEnemySpeed__Q24Koga14EnTypesManagerFi = .text:0x800DADC0; // type:function size:0x18
getEnemySpeedUnseen__Q24Koga14EnTypesManagerFi = .text:0x800DADD8; // type:function size:0x18
getEnemySpeedFight__Q24Koga14EnTypesManagerFi = .text:0x800DADF0; // type:function size:0x18
getEnemyEyesight__Q24Koga14EnTypesManagerFi = .text:0x800DAE08; // type:function size:0x18
getEnemyLightBindFrame__Q24Koga14EnTypesManagerFi = .text:0x800DAE20; // type:function size:0x18
getEnemyMinLightBindRange__Q24Koga14EnTypesManagerFi = .text:0x800DAE38; // type:function size:0x18
getEnemyMaxLightBindRange__Q24Koga14EnTypesManagerFi = .text:0x800DAE50; // type:function size:0x18
getEnemyPointerRange__Q24Koga14EnTypesManagerFi = .text:0x800DAE68; // type:function size:0x18
getEnemyNumAtKarakai__Q24Koga14EnTypesManagerFi = .text:0x800DAE80; // type:function size:0x18
getEnemyNumAtOrooro__Q24Koga14EnTypesManagerFi = .text:0x800DAE98; // type:function size:0x18
getEnemyHikiPower__Q24Koga14EnTypesManagerFi = .text:0x800DAEB0; // type:function size:0x18
getEnemyEffectiveDeg__Q24Koga14EnTypesManagerFi = .text:0x800DAEC8; // type:function size:0x18
getEnemyTsuriHeight__Q24Koga14EnTypesManagerFi = .text:0x800DAEE0; // type:function size:0x18
getEnemyActAfterAttackSu__Q24Koga14EnTypesManagerFi = .text:0x800DAEF8; // type:function size:0x18
getEnemyActAfterAttackFa__Q24Koga14EnTypesManagerFi = .text:0x800DAF10; // type:function size:0x18
getEnemyNormalItemTblId__Q24Koga14EnTypesManagerFi = .text:0x800DAF28; // type:function size:0x18
getEnemyTsuriItemTblId__Q24Koga14EnTypesManagerFi = .text:0x800DAF40; // type:function size:0x18
getEnemyDisappearFrame__Q24Koga14EnTypesManagerFi = .text:0x800DAF58; // type:function size:0x18
getEnemyBrightColor__Q24Koga14EnTypesManagerFi = .text:0x800DAF70; // type:function size:0x28
getEnemyAmbColor__Q24Koga14EnTypesManagerFi = .text:0x800DAF98; // type:function size:0x28
getEnemyAttackPattern1__Q24Koga14EnTypesManagerFi = .text:0x800DAFC0; // type:function size:0x18
getEnemyTsuriType__Q24Koga14EnTypesManagerFi = .text:0x800DAFD8; // type:function size:0x18
getEnemyElement__Q24Koga14EnTypesManagerFi = .text:0x800DAFF0; // type:function size:0x18
getEnemyCheckBox__Q24Koga14EnTypesManagerFi = .text:0x800DB008; // type:function size:0x2C
fn_800DB034 = .text:0x800DB034; // type:function size:0x38
fn_800DB06C = .text:0x800DB06C; // type:function size:0x18
fn_800DB084 = .text:0x800DB084; // type:function size:0x54
Expand Down Expand Up @@ -14640,7 +14640,7 @@ lbl_8035AAB0 = .data:0x8035AAB0; // type:object size:0x50
lbl_8035AB00 = .data:0x8035AB00; // type:object size:0xE data:string
lbl_8035AB10 = .data:0x8035AB10; // type:object size:0xB data:string
lbl_8035AB1C = .data:0x8035AB1C; // type:object size:0xC
lbl_8035AB28 = .data:0x8035AB28; // type:object size:0x10
__vt__10TParamT<l> = .data:0x8035AB28; // type:object size:0x10 scope:local
lbl_8035AB38 = .data:0x8035AB38; // type:object size:0x80
lbl_8035ABB8 = .data:0x8035ABB8; // type:object size:0x54 data:2byte
lbl_8035AC0C = .data:0x8035AC0C; // type:object size:0xE data:string
Expand Down Expand Up @@ -14671,7 +14671,7 @@ lbl_8035B070 = .data:0x8035B070; // type:object size:0xC
lbl_8035B07C = .data:0x8035B07C; // type:object size:0x34
lbl_8035B0B0 = .data:0x8035B0B0; // type:object size:0xF data:string
lbl_8035B0C0 = .data:0x8035B0C0; // type:object size:0xC
lbl_8035B0CC = .data:0x8035B0CC; // type:object size:0x44
__vt__10TParamT<f> = .data:0x8035B0CC; // type:object size:0x44 scope:local
lbl_8035B110 = .data:0x8035B110; // type:object size:0x15 data:string
lbl_8035B128 = .data:0x8035B128; // type:object size:0x2B data:string
lbl_8035B154 = .data:0x8035B154; // type:object size:0x1D data:string
Expand Down Expand Up @@ -14895,7 +14895,7 @@ lbl_8035E148 = .data:0x8035E148; // type:object size:0x90
lbl_8035E1D8 = .data:0x8035E1D8; // type:object size:0x10C
lbl_8035E2E4 = .data:0x8035E2E4; // type:object size:0x1A data:string
lbl_8035E300 = .data:0x8035E300; // type:object size:0xC
lbl_8035E30C = .data:0x8035E30C; // type:object size:0x44
__vt__27TParamT<Q28JUtility6TColor> = .data:0x8035E30C; // type:object size:0x44 scope:local
lbl_8035E350 = .data:0x8035E350; // type:object size:0x9 data:string
lbl_8035E35C = .data:0x8035E35C; // type:object size:0xE data:string
lbl_8035E36C = .data:0x8035E36C; // type:object size:0xE data:string
Expand Down Expand Up @@ -15115,11 +15115,11 @@ lbl_80360F58 = .data:0x80360F58; // type:object size:0x12 data:string
lbl_80360F6C = .data:0x80360F6C; // type:object size:0x15 data:string
lbl_80360F84 = .data:0x80360F84; // type:object size:0xE data:string
lbl_80360F94 = .data:0x80360F94; // type:object size:0xC
lbl_80360FA0 = .data:0x80360FA0; // type:object size:0x28
__vt__Q24Koga14EnTypesManager = .data:0x80360FA0; // type:object size:0x28
lbl_80360FC8 = .data:0x80360FC8; // type:object size:0x24
lbl_80360FEC = .data:0x80360FEC; // type:object size:0x18 data:string
lbl_80361004 = .data:0x80361004; // type:object size:0xC
lbl_80361010 = .data:0x80361010; // type:object size:0x60
__vt__11TParamT<Us> = .data:0x80361010; // type:object size:0x60 scope:local
lbl_80361070 = .data:0x80361070; // type:object size:0xC data:string
lbl_80361080 = .data:0x80361080; // type:object size:0x50
lbl_803610D0 = .data:0x803610D0; // type:object size:0x64 data:2byte
Expand Down Expand Up @@ -21715,7 +21715,7 @@ lbl_804D3938 = .sdata:0x804D3938; // type:object size:0x6 data:string
lbl_804D3940 = .sdata:0x804D3940; // type:object size:0x7 data:string
lbl_804D3948 = .sdata:0x804D3948; // type:object size:0x5 data:string
lbl_804D3950 = .sdata:0x804D3950; // type:object size:0x8
lbl_804D3958 = .sdata:0x804D3958; // type:object size:0x8
__RTTI__Q24Koga14EnTypesManager = .sdata:0x804D3958; // type:object size:0x8 scope:local
lbl_804D3960 = .sdata:0x804D3960; // type:object size:0x8
lbl_804D3968 = .sdata:0x804D3968; // type:object size:0x8
lbl_804D3970 = .sdata:0x804D3970; // type:object size:0x8 data:string
Expand Down
1 change: 1 addition & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,7 @@ def MatchingFor(*versions):
Object(NonMatching, "Koga/SimpleModeler.cpp"),
Object(NonMatching, "Koga/CharacterColManager.cpp"),
Object(NonMatching, "Koga/EnManager.cpp"),
Object(NonMatching, "Koga/EnTypesManager.cpp"),

# Unsorted
Object(NonMatching, "Unsorted/bootScene.cpp"),
Expand Down
7 changes: 4 additions & 3 deletions include/Koga/BaseParam.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ class TBaseParam {
// Seems to be replaced by JDrama::TNameRef::calcKeyCode in SMS
static u16 calcKeyCode(const char* pFileName);

TBaseParam* next;
const char* name;
u16 keyCode;
/* 0x4 */ TBaseParam* mNext;
/* 0x8 */ const char* mName;
/* 0xC */ u16 mHash;
/* 0xE */ u16 mType;
};

#endif
79 changes: 74 additions & 5 deletions include/Koga/EnTypesManager.hpp
Original file line number Diff line number Diff line change
@@ -1,34 +1,103 @@
#ifndef EN_TYPES_MANAGER_H_
#define EN_TYPES_MANAGER_H_

#include <dolphin/types.h>
#include <types.h>
#include <JSystem/JORReflexible.hpp>

#include "JSystem/JUtility/JUTColor.hpp"
#include "Koga/ParamInst.hpp"
#include "Koga/Params.hpp"


class ToolDataRef;
class unkEnCharacter;

class EnemyParam {
public:
EnemyParam();

public:
/* 0x000 */ TParams mParams;
/* 0x00C */ TParamT<s32> mLife;
/* 0x020 */ TParamT<s32> mHitDamange;
/* 0x034 */ TParamT<s32> mSpeed;
/* 0x048 */ TParamT<s32> mSpeedUnseen;
/* 0x05C */ TParamT<s32> mSpeedFight;
/* 0x070 */ TParamT<s32> mEyesight;
/* 0x084 */ TParamT<s32> mLightBindFrame;
/* 0x098 */ TParamT<f32> mMinLightBindRange;
/* 0x0AC */ TParamT<f32> mMaxLightBindRange;
/* 0x0C0 */ TParamT<s32> mNumAtKarakai;
/* 0x0D4 */ TParamT<s32> mNumAtOrooro;
/* 0x0E8 */ TParamT<f32> mHikiPower;
/* 0x0FC */ TParamT<f32> mEffectiveDeg;
/* 0x110 */ TParamT<f32> mTsuriHeight;
/* 0x124 */ TParamT<s32> mDisappearFrame;
/* 0x138 */ TParamT<s32> mAttackPattern1;
/* 0x14C */ TParamT<s32> mActAfterAttackSu;
/* 0x160 */ TParamT<s32> mActAfterAttackFa;
/* 0x174 */ TParamT<s32> mTsuriType;
/* 0x188 */ TParamT<s32> mElement;
/* 0x19C */ TParamT<u16> mCheckBox;
/* 0x1B0 */ TParamT<s32> mNormalItemTblId;
/* 0x1C4 */ TParamT<s32> mTsuriItemTblId;
/* 0x1D8 */ TParamT<f32> mPointerRange;
/* 0x1EC */ TParamT<JUtility::TColor> mBrightColor;
/* 0x200 */ TParamT<JUtility::TColor> mAmbColor;
/* 0x214 */ s32 _214; // Unknown
};

namespace Koga {
class EnTypesManager : public JORReflexible {
public:
EnTypesManager();
inline EnTypesManager();
/* 0x08 */ virtual ~EnTypesManager();

static void newManager();
static void deleteManager();
static EnTypesManager* getManager() { return sManager; }

void loadParameters();
void loadCTPParams(); // Loads "/param/ctp/%s.prm" in some sprintf loop

// Various EnemyParam helpers
static s32 getEnemyLife(int);
static s32 getEnemyHitDamage(int);
static s32 getEnemySpeed(int);
static s32 getEnemySpeedUnseen(int);
static s32 getEnemySpeedFight(int);
static s32 getEnemyEyesight(int);
static s32 getEnemyLightBindFrame(int);
static f32 getEnemyMinLightBindRange(int);
static f32 getEnemyMaxLightBindRange(int);
static f32 getEnemyPointerRange(int);
static s32 getEnemyNumAtKarakai(int);
static s32 getEnemyNumAtOrooro(int);
static f32 getEnemyHikiPower(int);
static f32 getEnemyEffectiveDeg(int);
static f32 getEnemyTsuriHeight(int);
static s32 getEnemyActAfterAttackSu(int);
static s32 getEnemyActAfterAttackFa(int);
static s32 getEnemyNormalItemTblId(int);
static s32 getEnemyTsuriItemTblId(int);
static s32 getEnemyDisappearFrame(int);
static JUtility::TColor getEnemyBrightColor(int);
static JUtility::TColor getEnemyAmbColor(int);
static s32 getEnemyAttackPattern1(int);
static s32 getEnemyTsuriType(int);
static s32 getEnemyElement(int);
static bool getEnemyCheckBox(int);
public:
/* 0x04 */ s32** _4; //TODO: This is an array of TParams
/* 0x04 */ EnemyParam* mEnParams;

static EnTypesManager* sManager;
};

};

// All of these are referenced in EnManager. No arg types or return types are guaranteed.
s32 fn_800DAB18(char*);
s32 fn_800DABA4(ToolDataRef);
s32 fn_800DAB18(char*); // Might be static?
s32 fn_800DABA4(ToolDataRef); // Might be static?
s32 fn_800DAC84(s32);
void* fn_800DAD00(void*);
unkEnCharacter* fn_800DB034(void*);
Expand Down
2 changes: 1 addition & 1 deletion include/Koga/GameMode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace Koga {
/* 0x08 */ virtual void vt_8(s16) = 0;

/* 0x0C */ virtual void init();
/* 0x10 */ virtual void vt_10();
/* 0x10 */ virtual void loadEnemyInfo();
/* 0x14 */ virtual void vt_14();
/* 0x18 */ virtual void vt_18();
};
Expand Down
2 changes: 1 addition & 1 deletion include/Koga/MissionMode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace Koga {
/* 0x08 */ virtual void vt_8(s16);

/* 0x0C */ virtual void init();
/* 0x10 */ virtual void vt_10();
/* 0x10 */ virtual void loadEnemyInfo();
/* 0x14 */ virtual void vt_14();
/* 0x18 */ virtual void vt_18();

Expand Down
Loading
Loading