Skip to content

Commit

Permalink
More CBattleManager.cpp progress
Browse files Browse the repository at this point in the history
  • Loading branch information
CelestialAmber committed Oct 5, 2024
1 parent 2a03bf4 commit 29acba4
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 9 deletions.
12 changes: 6 additions & 6 deletions config/jp/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19140,7 +19140,7 @@ func_800B0FF4 = .text:0x800B0FF4; // type:function size:0x12C scope:global align
func_800B1120 = .text:0x800B1120; // type:function size:0x20C scope:global align:4
__ct__cf_CfValueItemManager = .text:0x800B132C; // type:function size:0x3C scope:global align:4
func_800B1368 = .text:0x800B1368; // type:function size:0x10 scope:global align:4
IFactoryEvent_FactoryEvent3 = .text:0x800B1378; // type:function size:0x4 scope:global align:4
FactoryEvent3__Q22cf13IFactoryEventFv = .text:0x800B1378; // type:function size:0x4 scope:global align:4
func_800B137C = .text:0x800B137C; // type:function size:0x148 scope:global align:4
func_800B14C4 = .text:0x800B14C4; // type:function size:0x10 scope:global align:4
func_800B14D4 = .text:0x800B14D4; // type:function size:0xC scope:global align:4
Expand All @@ -19151,7 +19151,7 @@ func_800B1518 = .text:0x800B1518; // type:function size:0x4 scope:global align:4
__dt__800B151C = .text:0x800B151C; // type:function size:0x88 scope:global align:4
func_800B15A4 = .text:0x800B15A4; // type:function size:0x264 scope:global align:4
func_800B1808 = .text:0x800B1808; // type:function size:0xC scope:global align:4
IFactoryEvent_FactoryEvent4 = .text:0x800B1814; // type:function size:0x4 scope:global align:4
FactoryEvent4__Q22cf13IFactoryEventFv = .text:0x800B1814; // type:function size:0x4 scope:global align:4
func_800B1818 = .text:0x800B1818; // type:function size:0x8 scope:global align:4
func_800B1820 = .text:0x800B1820; // type:function size:0xC scope:global align:4
func_800B182C = .text:0x800B182C; // type:function size:0x10 scope:global align:4
Expand Down Expand Up @@ -19190,7 +19190,7 @@ func_800B20A0 = .text:0x800B20A0; // type:function size:0x14 scope:global align:
func_800B20B4 = .text:0x800B20B4; // type:function size:0xC74 scope:global align:4
func_800B2D28 = .text:0x800B2D28; // type:function size:0x8 scope:global align:4
__dt__800B2D30 = .text:0x800B2D30; // type:function size:0x54 scope:global align:4
IFactoryEvent_FactoryEvent1 = .text:0x800B2D84; // type:function size:0x4 scope:global align:4
FactoryEvent1__Q22cf13IFactoryEventFv = .text:0x800B2D84; // type:function size:0x4 scope:global align:4
func_800B2D88 = .text:0x800B2D88; // type:function size:0x28 scope:global align:4
func_800B2DB0 = .text:0x800B2DB0; // type:function size:0x88 scope:global align:4
func_800B2E38 = .text:0x800B2E38; // type:function size:0x98 scope:global align:4
Expand Down Expand Up @@ -19828,11 +19828,11 @@ __dt__Q22cf29Flusher<Q22cf13CfObjectActor>Fv = .text:0x800D8E70; // type:functio
__dt__Q22cf12CSuddenCommuFv = .text:0x800D8EB0; // type:function size:0x40 scope:global align:4
__dt__Q22cf14CBattleManagerFv = .text:0x800D8EF0; // type:function size:0x298 scope:global align:4
getInstance__Q22cf14CBattleManagerFv = .text:0x800D9188; // type:function size:0x8 scope:global align:4
func_800D9190 = .text:0x800D9190; // type:function size:0x40 scope:global align:4
func_800D91D0 = .text:0x800D91D0; // type:function size:0x48 scope:global align:4
func_800D9190__Q22cf14CBattleManagerFv = .text:0x800D9190; // type:function size:0x40 scope:global align:4
func_800D91D0__Q22cf14CBattleManagerFv = .text:0x800D91D0; // type:function size:0x48 scope:global align:4
func_800D9218 = .text:0x800D9218; // type:function size:0x13C scope:global align:4
func_800D9354 = .text:0x800D9354; // type:function size:0x2E8 scope:global align:4
func_800D963C = .text:0x800D963C; // type:function size:0x33C scope:global align:4
FactoryEvent2__Q22cf14CBattleManagerFv = .text:0x800D963C; // type:function size:0x33C scope:global align:4
func_800D9978 = .text:0x800D9978; // type:function size:0x328 scope:global align:4
func_800D9CA0 = .text:0x800D9CA0; // type:function size:0x3CC scope:global align:4
func_800DA06C = .text:0x800DA06C; // type:function size:0x38 scope:global align:4
Expand Down
24 changes: 24 additions & 0 deletions src/kyoshin/appgame/cf/CBattleManager.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
#include "kyoshin/appgame/cf/CBattleManager.hpp"
#include "kyoshin/appgame/code_800B06A4.hpp"
#include "monolib/MemManager.hpp"
#include "monolib/work/CWorkSystem.hpp"

namespace cf{
CBattleManager::CBattleManager() : unk84(0) {
int heapIndex = WorkThreadSystem::getHeapIndex();
mActorList1.initList(64, heapIndex);
mActorList2.initList(8, heapIndex);
mActorList3.initList(56, heapIndex);
mBattleEventList.initList(4, heapIndex);
void* classPtr = func_800B07E8();
func_800B8804(classPtr, this);
mVision.unk261C4.unk74 = 0;
}

CBattleManager::~CBattleManager(){
Expand All @@ -14,4 +24,18 @@ namespace cf{
return instance;
}

void CBattleManager::func_800D9190(){
instance = new (mtl::MemManager::getMem2RegionIndex()) CBattleManager();
}

void CBattleManager::func_800D91D0(){
if(instance != nullptr){
delete instance;
instance = nullptr;
}
}

void CBattleManager::FactoryEvent2(){
}

}
17 changes: 15 additions & 2 deletions src/kyoshin/appgame/cf/CBattleManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ namespace cf{

CBattleManager_Struct1(){
u8* r30 = unk0;
u8* r31 = unk0 + 0x100;
do{
std::memset(r30, 0, 8);
r30 += 8;
} while(r30 < unk0 + 0x100);
} while(r30 < r31);
std::memset(unk0, 0, sizeof(unk0));
}
};
Expand All @@ -43,9 +44,21 @@ namespace cf{
class CBattleManager : public IFactoryEvent {
public:
CBattleManager();
virtual ~CBattleManager();
virtual ~CBattleManager(); //0x8
virtual void FactoryEvent2(); //0x10
virtual void func_80085220(); //0x1C
virtual void func_800E2584(); //0x20
virtual void func_800F42A0(); //0x24
virtual void func_800885F0(); //0x28
virtual void func_800EA410(); //0x2C
virtual void func_800EA420(); //0x30
virtual void func_800EA460(); //0x34
virtual void func_800EA470(); //0x38
virtual void func_800EA998(); //0x3C

static CBattleManager* getInstance();
static void func_800D9190();
static void func_800D91D0();

//0x0: vtable
//0x0-4: IFactoryEvent
Expand Down
3 changes: 2 additions & 1 deletion src/kyoshin/appgame/cf/CVision.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ namespace cf{
public:
~UnkClass_801A3728(){}

u8 unk0[0x78];
u8 unk0[0x74];
float unk74;
};

//size: 0x2623C
Expand Down

0 comments on commit 29acba4

Please sign in to comment.