mirror of
https://codeberg.org/KeybadeBlox/JSRF-Decompilation.git
synced 2026-04-06 20:40:23 +03:00
Incorporate known names from Smilebit code
The Yakuza 1 and 2 rereleases on the Wii U export function symbols, preserving their names, and some debug data was also available in a PS2 release, providing some struct definitions. These have been used to rename analogous classes, functions, and member variables to the same names used by Smilebit, plus a more general imitation of their naming and typing conventions (i.e. Win32 style).
This commit is contained in:
parent
e7e9d3b1be
commit
836b5eaa41
15 changed files with 2198 additions and 2141 deletions
|
|
@ -2,7 +2,7 @@
|
|||
# An NMAKE Makefile to compile the game with the Visual C++ 7.0 toolchain
|
||||
|
||||
# All object files to link together
|
||||
OBJ = src/JSRF/Jet2.obj src/JSRF/Core.obj src/JSRF/GameData.obj\
|
||||
OBJ = src/JSRF/Jet2.obj src/JSRF/Action.obj src/JSRF/SaveData.obj\
|
||||
src/XDK/Xapi/xapi0.obj
|
||||
|
||||
# Import library for the only thing we don't compile ourselves, the Xbox kernel
|
||||
|
|
@ -38,12 +38,12 @@ src/JSRF/Jet2.exe: $(OBJ) $(LIB)
|
|||
|
||||
|
||||
# Header files used for each object
|
||||
src/JSRF/Jet2.obj: src/JSRF/Core.hpp src/XDK/CRT/stddef.h src/XDK/D3D.h\
|
||||
src/JSRF/Jet2.obj: src/JSRF/Action.hpp src/XDK/CRT/stddef.h src/XDK/D3D.h\
|
||||
src/XDK/Win32.h
|
||||
|
||||
src/JSRF/Core.obj: src/JSRF/Core.hpp src/MUSASHI/MMatrix.hpp\
|
||||
src/XDK/CRT/stddef.h src/XDK/D3D.h src/XDK/Win32.h
|
||||
src/JSRF/Action.obj: src/JSRF/Action.hpp src/MUSASHI/MMatrix.hpp\
|
||||
src/XDK/CRT/stddef.h src/XDK/D3D.h src/XDK/Win32.h
|
||||
|
||||
src/JSRF/GameData.obj: src/JSRF/GameData.hpp
|
||||
src/JSRF/SaveData.obj: src/JSRF/SaveData.hpp
|
||||
|
||||
src/XDK/Xapi/xapi0.obj: src/XDK/Win32.h
|
||||
|
|
|
|||
|
|
@ -24,21 +24,25 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"name": "JSRF/Core",
|
||||
"target_path": "target/JSRF/Core.obj",
|
||||
"base_path": "src/JSRF/Core.obj",
|
||||
"name": "JSRF/Action",
|
||||
"target_path": "target/JSRF/Action.obj",
|
||||
"base_path": "src/JSRF/Action.obj",
|
||||
"metadata": {
|
||||
"complete": false,
|
||||
"source_path": "src/JSRF/Core.cpp"
|
||||
"source_path": "src/JSRF/Action.cpp"
|
||||
},
|
||||
"symbol_mappings": {
|
||||
"?nopMethod0Arg@CActBase@@UAEXXZ": "?Exec0Default@CActBase@@UAEXXZ",
|
||||
"?nopMethod1Arg@CActBase@@UAEXI@Z": "?DrawListDefault@CActBase@@UAEXI@Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "JSRF/GameData",
|
||||
"target_path": "target/JSRF/GameData.obj",
|
||||
"base_path": "src/JSRF/GameData.obj",
|
||||
"name": "JSRF/SaveData",
|
||||
"target_path": "target/JSRF/SaveData.obj",
|
||||
"base_path": "src/JSRF/SaveData.obj",
|
||||
"metadata": {
|
||||
"complete": false,
|
||||
"source_path": "src/JSRF/GameData.cpp"
|
||||
"source_path": "src/JSRF/SaveData.cpp"
|
||||
},
|
||||
"symbol_mappings": {
|
||||
"?finalizeGameData@@YAXXZ": "_$E2",
|
||||
|
|
|
|||
595
decompile/src/JSRF/Action.cpp
Normal file
595
decompile/src/JSRF/Action.cpp
Normal file
|
|
@ -0,0 +1,595 @@
|
|||
/* JSRF Decompilation: JSRF/Action.cpp
|
||||
CActMan and CActBase classes that form the foundation of the JSRF game code.
|
||||
*/
|
||||
|
||||
#pragma bss_seg(".data")
|
||||
|
||||
#include "../XDK/CRT/stddef.h"
|
||||
#include "Action.hpp"
|
||||
|
||||
// Declarations for symbols not yet defined in their own source files
|
||||
// Remove these once they've been delinked!
|
||||
void readInput();
|
||||
|
||||
// Address: 0x00011000
|
||||
// Status: unimplemented
|
||||
CActBase::~CActBase() {
|
||||
g_lpActMan->m_dwActCount -= 1;
|
||||
}
|
||||
|
||||
// Address: 0x00011070
|
||||
// Status: unimplemented
|
||||
void CActBase::recursiveExec0Default() {
|
||||
}
|
||||
|
||||
// Address: 0x000110A0
|
||||
// Status: unimplemented
|
||||
void CActBase::drawManyDefault(
|
||||
eACTFLAG flagFilterAny1,
|
||||
int drawArg1,
|
||||
int drawArg2,
|
||||
eACTFLAG flagFilterAll,
|
||||
unsigned otherBitfieldFilterAny,
|
||||
eACTFLAG flagFilterNone,
|
||||
eACTFLAG flagFilterAny2
|
||||
) {
|
||||
}
|
||||
|
||||
// Address: 0x00011220
|
||||
// Status: unimplemented
|
||||
void CActBase::drawTreeDefault1() {
|
||||
}
|
||||
|
||||
// Address: 0x00011260
|
||||
// Status: unimplemented
|
||||
void CActBase::drawTreeDefault2() {
|
||||
}
|
||||
|
||||
// Address: 0x000112A0
|
||||
// Status: unimplemented
|
||||
void CActBase::recursiveExec0Event() {
|
||||
}
|
||||
|
||||
// Address: 0x000112D0
|
||||
// Status: unimplemented
|
||||
void CActBase::drawManyEvent(
|
||||
eACTFLAG flagFilterAny1,
|
||||
int drawArg1,
|
||||
int drawArg2,
|
||||
eACTFLAG flagFilterAll,
|
||||
unsigned otherBitfieldFilterAny,
|
||||
eACTFLAG flagFilterNone,
|
||||
eACTFLAG flagFilterAny2
|
||||
) {
|
||||
}
|
||||
|
||||
// Address: 0x00011450
|
||||
// Status: unimplemented
|
||||
void CActBase::drawTreeEvent1() {
|
||||
}
|
||||
|
||||
// Address: 0x00011490
|
||||
// Status: unimplemented
|
||||
void CActBase::drawTreeEvent2() {
|
||||
}
|
||||
|
||||
// Address: 0x000114D0
|
||||
// Status: unimplemented
|
||||
void CActBase::recursiveExec0CoveredPause() {
|
||||
}
|
||||
|
||||
// Address: 0x00011500
|
||||
// Status: unimplemented
|
||||
void CActBase::drawManyCoveredPause(
|
||||
eACTFLAG flagFilterAny1,
|
||||
int drawArg1,
|
||||
int drawArg2,
|
||||
eACTFLAG flagFilterAll,
|
||||
unsigned otherBitfieldFilterAny,
|
||||
eACTFLAG flagFilterNone,
|
||||
eACTFLAG flagFilterAny2
|
||||
) {
|
||||
}
|
||||
|
||||
// Address: 0x00011680
|
||||
// Status: unimplemented
|
||||
void CActBase::drawTreeCoveredPause1() {
|
||||
}
|
||||
|
||||
// Address: 0x000116C0
|
||||
// Status: unimplemented
|
||||
void CActBase::drawTreeCoveredPause2() {
|
||||
}
|
||||
|
||||
// Address: 0x00011700
|
||||
// Status: unimplemented
|
||||
void CActBase::recursiveExec0FreezeCam() {
|
||||
}
|
||||
|
||||
// Address: 0x00011730
|
||||
// Status: unimplemented
|
||||
void CActBase::drawManyFreezeCam(
|
||||
eACTFLAG flagFilterAny1,
|
||||
int drawArg1,
|
||||
int drawArg2,
|
||||
eACTFLAG flagFilterAll,
|
||||
unsigned otherBitfieldFilterAny,
|
||||
eACTFLAG flagFilterNone,
|
||||
eACTFLAG flagFilterAny2
|
||||
) {
|
||||
}
|
||||
|
||||
// Address: 0x000118B0
|
||||
// Status: unimplemented
|
||||
void CActBase::drawTreeFreezeCam1() {
|
||||
}
|
||||
|
||||
// Address: 0x000118F0
|
||||
// Status: unimplemented
|
||||
void CActBase::drawTreeFreezeCam2() {
|
||||
}
|
||||
|
||||
// Address: 0x00011930
|
||||
// Status: unimplemented
|
||||
void CActBase::recursiveExec0UncoveredPause() {
|
||||
}
|
||||
|
||||
// Address: 0x00011960
|
||||
// Status: unimplemented
|
||||
void CActBase::drawManyUncoveredPause(
|
||||
eACTFLAG flagFilterAny1,
|
||||
int drawArg1,
|
||||
int drawArg2,
|
||||
eACTFLAG flagFilterAll,
|
||||
unsigned otherBitfieldFilterAny,
|
||||
eACTFLAG flagFilterNone,
|
||||
eACTFLAG flagFilterAny2
|
||||
) {
|
||||
}
|
||||
|
||||
// Address: 0x00011AE0
|
||||
// Status: unimplemented
|
||||
void CActBase::drawTreeUncoveredPause1() {
|
||||
}
|
||||
|
||||
// Address: 0x00011B20
|
||||
// Status: unimplemented
|
||||
void CActBase::drawTreeUncoveredPause2() {
|
||||
}
|
||||
|
||||
// Address: 0x00011B60
|
||||
// Status: unimplemented
|
||||
void CActBase::insertActionTreeSub(CActBase * lpSibling, CActBase * lpParent) {
|
||||
}
|
||||
|
||||
// Address: 0x00011B90
|
||||
// Status: unimplemented
|
||||
void CActBase::deleteActionChild(CActBase * lpChild) {
|
||||
}
|
||||
|
||||
// Address: 0x00011BD0
|
||||
// Status: matching
|
||||
CActBase * CActBase::getParentAction() {
|
||||
return this->m_lpParent;
|
||||
}
|
||||
|
||||
// Address: 0x00011BE0
|
||||
// Status: unimplemented
|
||||
void CActBase::SetDelete(CActBase * lpAct) {
|
||||
if (lpAct->m_ActFlag > -1) {
|
||||
}
|
||||
}
|
||||
|
||||
// Address: 0x00011C20
|
||||
// Status: nonmatching
|
||||
void CActBase::SetDeleteChild(CActBase * lpChild) {
|
||||
if (lpChild != NULL) do {
|
||||
if (lpChild->m_ActFlag > -1) {
|
||||
lpChild->m_ActFlag = eACTFLAG(lpChild->m_ActFlag | eACTFLAG_DELETE);
|
||||
g_lpActMan->DeleteDrawList(lpChild);
|
||||
g_lpActMan->FreeActID(lpChild->m_ActID);
|
||||
}
|
||||
|
||||
this->SetDeleteChild(lpChild->m_lpChild);
|
||||
lpChild = lpChild->m_lpSiblingNext;
|
||||
} while (lpChild != NULL);
|
||||
}
|
||||
|
||||
// Address: 0x00011C80
|
||||
// Status: matching
|
||||
void CActBase::DrawListDefault(unsigned unknown) {}
|
||||
|
||||
// Address: 0x00011C90
|
||||
// Status: matching
|
||||
void CActBase::Exec0Default() {}
|
||||
|
||||
// Eliminated by link time code generation (aliased with 0x00011C90)
|
||||
void CActBase::Exec1Default() {}
|
||||
|
||||
// Eliminated by link time code generation (aliased with 0x00011C90)
|
||||
void CActBase::Exec0Event() {}
|
||||
|
||||
// Eliminated by link time code generation (aliased with 0x00011C90)
|
||||
void CActBase::Exec1Event() {}
|
||||
|
||||
// Eliminated by link time code generation (aliased with 0x00011C80)
|
||||
void CActBase::DrawListEvent(unsigned unknown) {}
|
||||
|
||||
// Eliminated by link time code generation (aliased with 0x00011C90)
|
||||
void CActBase::Exec0CoveredPause() {}
|
||||
|
||||
// Eliminated by link time code generation (aliased with 0x00011C90)
|
||||
void CActBase::Exec1CoveredPause() {}
|
||||
|
||||
// Eliminated by link time code generation (aliased with 0x00011C80)
|
||||
void CActBase::DrawListCoveredPause(unsigned unknown) {}
|
||||
|
||||
// Eliminated by link time code generation (aliased with 0x00011C90)
|
||||
void CActBase::Exec0FreezeCam() {}
|
||||
|
||||
// Eliminated by link time code generation (aliased with 0x00011C90)
|
||||
void CActBase::Exec1FreezeCam() {}
|
||||
|
||||
// Eliminated by link time code generation (aliased with 0x00011C80)
|
||||
void CActBase::DrawListFreezeCam(unsigned unknown) {}
|
||||
|
||||
// Eliminated by link time code generation (aliased with 0x00011C90)
|
||||
void CActBase::Exec0UncoveredPause() {}
|
||||
|
||||
// Eliminated by link time code generation (aliased with 0x00011C90)
|
||||
void CActBase::Exec1UncoveredPause() {}
|
||||
|
||||
// Eliminated by link time code generation (aliased with 0x00011C80)
|
||||
void CActBase::DrawListUncoveredPause(unsigned unknown) {}
|
||||
|
||||
// Address: 0x00011CA0
|
||||
// Status: unimplemented
|
||||
void CDrawBase::copySomeVectors() {
|
||||
}
|
||||
|
||||
// Address: 0x00011D00
|
||||
// Status: unimplemented
|
||||
void CActBase::recursiveExec1Default() {
|
||||
}
|
||||
|
||||
// Address: 0x00011D00
|
||||
// Status: unimplemented
|
||||
void CActBase::recursiveExec1Event() {
|
||||
}
|
||||
|
||||
// Address: 0x00011E40
|
||||
// Status: unimplemented
|
||||
void CActBase::recursiveExec1CoveredPause() {
|
||||
}
|
||||
|
||||
// Address: 0x00011EE0
|
||||
// Status: unimplemented
|
||||
void CActBase::recursiveExec1FreezeCam() {
|
||||
}
|
||||
|
||||
// Address: 0x00011F80
|
||||
// Status: unimplemented
|
||||
void CActBase::recursiveExec1UncoveredPause() {
|
||||
}
|
||||
|
||||
// Address: 0x00012020
|
||||
// Status: unimplemented
|
||||
void CActBase::insertActionTree(CActBase * lpParent) {
|
||||
}
|
||||
|
||||
// Address: 0x00012100
|
||||
// Status: unimplemented
|
||||
CActBase::CActBase(CActBase * lpParent, eACTID ActID, eACTFLAG ActFlag) {
|
||||
g_lpActMan->InsertActionExecList(ActID, this);
|
||||
|
||||
this->m_lpParent = NULL;
|
||||
this->m_lpChild = NULL;
|
||||
this->m_lpSiblingBefore = NULL;
|
||||
this->m_lpSiblingNext = NULL;
|
||||
this->m_ActID = ActID;
|
||||
this->m_ActFlag = ActFlag;
|
||||
|
||||
this->insertActionTree(lpParent);
|
||||
|
||||
this->m_dwZSort = 0;
|
||||
this->m_dwDrawChildMask = 1;
|
||||
|
||||
g_lpActMan->m_dwActCount += 1;
|
||||
}
|
||||
|
||||
// Address: 0x00012170
|
||||
// Status: matching
|
||||
CDrawBase::CDrawBase(CActBase * lpParent, eACTID ActID, eACTFLAG ActFlag) :
|
||||
CActBase(lpParent, ActID, ActFlag) {
|
||||
this->m_dwDrawChildMask = 7;
|
||||
this->m_SomeActID = eACTID(0);
|
||||
}
|
||||
|
||||
// Address: 0x000121D0
|
||||
// Status: unimplemented
|
||||
CDrawBase::~CDrawBase() {}
|
||||
|
||||
// Address: 0x000121E0
|
||||
// Status: unimplemented
|
||||
CPlayer::CPlayer(CActBase * lpParent, eACTID ActID, eACTFLAG ActFlag) :
|
||||
CActBase(lpParent, ActID, ActFlag) {
|
||||
this->unknown0x44 = 0;
|
||||
this->unknown0x48 = 0;
|
||||
}
|
||||
|
||||
// Eliminated by link time code generation (aliased with 0x000121D0)
|
||||
CPlayer::~CPlayer() {}
|
||||
|
||||
// Address: 0x00012210
|
||||
// Status: unimplemented
|
||||
CActMan::CActMan(unsigned * unknown1, unsigned unknown2) {
|
||||
}
|
||||
|
||||
// Address: 0x00012390
|
||||
// Status: unimplemented
|
||||
CActMan::~CActMan() {
|
||||
}
|
||||
|
||||
// Address: 0x000123E0
|
||||
// Status: unimplemented
|
||||
void CActMan::ActionExec() {
|
||||
}
|
||||
|
||||
// Address: 0x00012580
|
||||
// Status: unimplemented
|
||||
void CActMan::drawOne(CActBase * lpAct, unsigned unknown) {
|
||||
}
|
||||
|
||||
// Address: 0x000125E0
|
||||
// Status: unimplemented
|
||||
void CActMan::drawListSub(
|
||||
eACTFLAG flagFilterAny1,
|
||||
int drawArg1,
|
||||
int drawArg2,
|
||||
eACTFLAG flagFilterAll,
|
||||
unsigned otherBitfieldFilterAny,
|
||||
eACTFLAG flagFilterNone,
|
||||
eACTFLAG flagFilterAny2
|
||||
) {
|
||||
}
|
||||
|
||||
// Address: 0x00012680
|
||||
// Status: unimplemented
|
||||
void CActMan::drawTree1(CActBase * lpAct) {
|
||||
}
|
||||
|
||||
// Address: 0x000126D0
|
||||
// Status: unimplemented
|
||||
void CActMan::setCoveredPauseNextFrame(BOOL bVal) {
|
||||
}
|
||||
|
||||
// Address: 0x000126F0
|
||||
// Status: unimplemented
|
||||
void CActMan::setEventNextFrame(BOOL bVal) {
|
||||
}
|
||||
|
||||
// Address: 0x00012710
|
||||
// Status: unimplemented
|
||||
void CActMan::setFreezeCamNextFrame(BOOL bVal) {
|
||||
}
|
||||
|
||||
// Address: 0x00012730
|
||||
// Status: unimplemented
|
||||
void CActMan::setUncoveredPauseNextFrame(BOOL bVal) {
|
||||
}
|
||||
|
||||
// Address: 0x00012750
|
||||
// Status: matching
|
||||
void CActMan::DrawChildren() {
|
||||
this->m_bDrawChildren = TRUE;
|
||||
}
|
||||
|
||||
// Address: 0x00012760
|
||||
// Status: matching
|
||||
void CActMan::DrawSkip() {
|
||||
this->m_bSkipDraw = TRUE;
|
||||
}
|
||||
|
||||
// Address: 0x00012770
|
||||
// Status: unimplemented
|
||||
void CActMan::Fatal() {
|
||||
}
|
||||
|
||||
// Address: 0x000127B0
|
||||
// Status: matching
|
||||
void CActMan::SetDrawMode(eDRAWMODE Mode) {
|
||||
this->m_DrawMode = Mode;
|
||||
}
|
||||
|
||||
// Address: 0x000127C0
|
||||
// Status: matching
|
||||
void CActMan::SetGlobal(eGLOBAL Index, DWORD dwVal) {
|
||||
this->m_Globals[Index] = dwVal;
|
||||
}
|
||||
|
||||
// Address: 0x000127E0
|
||||
// Status: matching
|
||||
DWORD CActMan::GetGlobal(eGLOBAL Index) {
|
||||
return this->m_Globals[Index];
|
||||
}
|
||||
|
||||
// Address: 0x000127F0
|
||||
// Status: unimplemented
|
||||
void CActMan::InsertDrawList(CActBase * lpAct) {
|
||||
}
|
||||
|
||||
// Address: 0x00012840
|
||||
// Status: unimplemented
|
||||
void CActMan::DeleteDrawList(CActBase * lpAct) {
|
||||
}
|
||||
|
||||
// Address: 0x00012870
|
||||
// Status: matching
|
||||
void CActMan::InsertActionExecList(eACTID ActID, CActBase * lpAct) {
|
||||
if (0 <= ActID && ActID < eACTID_NUM)
|
||||
this->m_lpActTbl[ActID] = lpAct;
|
||||
}
|
||||
|
||||
// Address: 0x00012890
|
||||
// Status: matching
|
||||
void CActMan::FreeActID(eACTID ActID) {
|
||||
if (0 <= ActID && this->m_lpActTbl[ActID] != NULL)
|
||||
this->m_lpActTbl[ActID] = NULL;
|
||||
}
|
||||
|
||||
// Address: 0x000128C0
|
||||
// Status: matching
|
||||
CActBase * CActMan::GetAction(eACTID ActID) {
|
||||
return 0 <= ActID ? this->m_lpActTbl[ActID] : NULL;
|
||||
}
|
||||
|
||||
// Address: 0x000128E0
|
||||
// Status: matching
|
||||
int CActMan::GetFreeActionID(eACTID Min, eACTID Max) {
|
||||
if (Min <= Max) do
|
||||
if (this->m_lpActTbl[Min] == NULL) return Min;
|
||||
else Min = eACTID(Min + 1);
|
||||
while (Min <= Max);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Address: 0x00012910
|
||||
// Status: matching
|
||||
BOOL CActMan::ActionIDAvail(eACTID ActID) {
|
||||
return this->m_lpActTbl[ActID] == NULL;
|
||||
}
|
||||
|
||||
// Address: 0x00012930
|
||||
// Status: matching
|
||||
void CActMan::SwapActID(eACTID ActID1, eACTID ActID2) {
|
||||
CActBase * tmp = this->m_lpActTbl[ActID1];
|
||||
this->m_lpActTbl[ActID1] = this->m_lpActTbl[ActID2];
|
||||
this->m_lpActTbl[ActID2] = tmp;
|
||||
|
||||
if (this->m_lpActTbl[ActID1] != NULL) this->m_lpActTbl[ActID1]->m_ActID = ActID1;
|
||||
if (this->m_lpActTbl[ActID2] != NULL) this->m_lpActTbl[ActID2]->m_ActID = ActID2;
|
||||
}
|
||||
|
||||
// Address: 0x00012980
|
||||
// Status: unimplemented
|
||||
void CActMan::ClearScreen() {
|
||||
}
|
||||
|
||||
// Address: 0x000129B0
|
||||
// Status: matching
|
||||
void CActMan::EnableSomeExtraDrawListCode() {
|
||||
this->m_bRunSomeExtraDrawListCode = TRUE;
|
||||
}
|
||||
|
||||
// Address: 0x000129C0
|
||||
// Status: matching
|
||||
void CActMan::SetLogosStarted(BOOL bVal) {
|
||||
this->m_bLogosStarted = bVal;
|
||||
}
|
||||
|
||||
// Address: 0x000129D0
|
||||
// Status: matching
|
||||
void CActMan::initSortDrawList() {
|
||||
this->m_lpDrawSortRoot = NULL;
|
||||
this->m_lplpDrawSortPtr = &g_lpActMan->m_lpDrawSortRoot;
|
||||
}
|
||||
|
||||
// Address: 0x000129F0
|
||||
// Status: matching
|
||||
CActBase * CActMan::getSortList() {
|
||||
return this->m_lpDrawSortRoot;
|
||||
}
|
||||
|
||||
// Address: 0x00012A00
|
||||
// Status: matching
|
||||
void CActMan::InsertDrawSortList(CActBase * lpAct) {
|
||||
lpAct->m_lpDrawNext = NULL;
|
||||
*this->m_lplpDrawSortPtr = lpAct;
|
||||
this->m_lplpDrawSortPtr = &lpAct->m_lpDrawNext;
|
||||
}
|
||||
|
||||
// Address: 0x00012A20
|
||||
// Status: unimplemented
|
||||
void CActMan::SortListSub(unsigned char ucSortKeyBitOffset) {
|
||||
for (
|
||||
unsigned i = 0;
|
||||
i < sizeof this->m_lpDrawSortBinRoots/sizeof *this->m_lpDrawSortBinRoots;
|
||||
i++
|
||||
) this->m_lpDrawSortBinRoots[i] = NULL;
|
||||
}
|
||||
|
||||
// Address: 0x00012AC0
|
||||
// Status: matching
|
||||
void CActMan::SetFallbackBgColor(D3DCOLOR Color, BOOL bUseFallback) {
|
||||
this->m_bUseFallbackBgColor = bUseFallback;
|
||||
this->m_BgColorFallback = Color;
|
||||
}
|
||||
|
||||
// Address: 0x00012AE0
|
||||
// Status: unimplemented
|
||||
CActRoot::CActRoot(CActBase * lpParent, eACTID ActID, eACTFLAG ActFlag) :
|
||||
CActBase(lpParent, ActID, ActFlag) {
|
||||
}
|
||||
|
||||
// Address: 0x00012BE0
|
||||
// Status: matching
|
||||
CActRoot::~CActRoot() {
|
||||
}
|
||||
|
||||
// Address: 0x00012C10
|
||||
// Status: unimplemented
|
||||
void CActMan::Init() {
|
||||
}
|
||||
|
||||
// Address: 0x00012C80
|
||||
// Status: unimplemented
|
||||
void CActMan::drawMany(eACTFLAG flagFilterAll, BOOL unknown) {
|
||||
}
|
||||
|
||||
// Address: 0x000131A0
|
||||
// Status: nonmatching
|
||||
void CActMan::sortDrawList() {
|
||||
this->SortListSub(0x00);
|
||||
this->SortListSub(0x08);
|
||||
this->SortListSub(0x10);
|
||||
this->SortListSub(0x18);
|
||||
}
|
||||
|
||||
// Address: 0x000131F0
|
||||
// Status: unimplemented
|
||||
void CActMan::drawSub() {
|
||||
}
|
||||
|
||||
// Address: 0x00013930
|
||||
// Status: unimplemented
|
||||
void CActMan::draw() {
|
||||
}
|
||||
|
||||
// Address: 0x00013A80
|
||||
// Status: unimplemented
|
||||
void CActMan::IdleSub() {
|
||||
readInput();
|
||||
}
|
||||
|
||||
// Address: 0x00013F80
|
||||
// Status: matching
|
||||
int CActMan::Idle() {
|
||||
if (this->m_InitState >= 0) while (true) {
|
||||
if (!this->m_bFatal) this->IdleSub();
|
||||
else {
|
||||
readInput();
|
||||
Sleep(0x10);
|
||||
}
|
||||
} else return -1;
|
||||
}
|
||||
|
||||
// Address: 0x00013FC0
|
||||
// Status: nonmatching
|
||||
void SetActionDelete(eACTID ActID) {
|
||||
CActBase * lpAct = g_lpActMan->GetAction(ActID);
|
||||
if (lpAct != NULL) {
|
||||
lpAct->SetDelete(lpAct);
|
||||
lpAct->SetDeleteChild(lpAct->m_lpChild);
|
||||
}
|
||||
}
|
||||
550
decompile/src/JSRF/Action.hpp
Normal file
550
decompile/src/JSRF/Action.hpp
Normal file
|
|
@ -0,0 +1,550 @@
|
|||
/* JSRF Decompilation: JSRF/Action.hpp
|
||||
CActMan and CActBase classes that form the foundation of the JSRF game code.
|
||||
*/
|
||||
|
||||
#ifndef ACTION_HPP
|
||||
#define ACTION_HPP
|
||||
|
||||
#include "../MUSASHI/MMatrix.hpp"
|
||||
#include "../XDK/CRT/stddef.h"
|
||||
#include "../XDK/D3D.h"
|
||||
#include "../XDK/Win32.h"
|
||||
|
||||
|
||||
// TODO; move to header for Graphics COM object in Smilebit libraries
|
||||
struct SGraphicsPerformanceCounters {
|
||||
unsigned fps;
|
||||
unsigned trianglesPerSecond;
|
||||
unsigned frameTriangleCnt;
|
||||
unsigned unknown0xC;
|
||||
unsigned unknown0x10;
|
||||
unsigned unknown0x14;
|
||||
};
|
||||
|
||||
// TODO: Just here to get delinking working until we make dedicated source
|
||||
// files for these classes
|
||||
struct CSysColiManager {
|
||||
CSysColiManager();
|
||||
virtual ~CSysColiManager();
|
||||
};
|
||||
struct UnknownGlobal {
|
||||
UnknownGlobal();
|
||||
virtual ~UnknownGlobal();
|
||||
};
|
||||
struct UnknownStatic02 {
|
||||
UnknownStatic02();
|
||||
virtual ~UnknownStatic02();
|
||||
};
|
||||
struct UnknownStatic04 {
|
||||
UnknownStatic04();
|
||||
virtual ~UnknownStatic04();
|
||||
};
|
||||
struct UnknownStatic05 {
|
||||
UnknownStatic05();
|
||||
virtual ~UnknownStatic05();
|
||||
};
|
||||
struct UnknownStatic06 {
|
||||
UnknownStatic06();
|
||||
virtual ~UnknownStatic06();
|
||||
};
|
||||
struct UnknownStatic07 {
|
||||
UnknownStatic07();
|
||||
virtual ~UnknownStatic07();
|
||||
};
|
||||
struct UnknownStatic09 {
|
||||
UnknownStatic09();
|
||||
virtual ~UnknownStatic09();
|
||||
};
|
||||
struct UnknownStatic13 {
|
||||
char unknown1[0x274];
|
||||
void * unknown2;
|
||||
void * unknown3;
|
||||
};
|
||||
struct UnknownStatic16 {
|
||||
UnknownStatic16();
|
||||
virtual ~UnknownStatic16();
|
||||
};
|
||||
struct UnknownStatic17 {
|
||||
UnknownStatic17();
|
||||
virtual ~UnknownStatic17();
|
||||
};
|
||||
struct UnknownStatic18 {
|
||||
UnknownStatic18();
|
||||
virtual ~UnknownStatic18();
|
||||
};
|
||||
struct UnknownStatic19 {
|
||||
UnknownStatic19();
|
||||
virtual ~UnknownStatic19();
|
||||
};
|
||||
struct UnknownStatic24 {
|
||||
UnknownStatic24();
|
||||
virtual ~UnknownStatic24();
|
||||
};
|
||||
struct UnknownStatic27 {
|
||||
UnknownStatic27();
|
||||
virtual ~UnknownStatic27();
|
||||
void * unknown[3];
|
||||
};
|
||||
struct SGraphicsSetting {
|
||||
unsigned countedIfZero;
|
||||
char * name;
|
||||
float unknown[3];
|
||||
float value;
|
||||
unsigned index;
|
||||
};
|
||||
struct SGraphicsSettings {
|
||||
float * settings;
|
||||
unsigned settingsArrSizeInBytes;
|
||||
unsigned unknown1;
|
||||
unsigned unknown2;
|
||||
unsigned srcArrZeroCnt;
|
||||
SGraphicsSetting * srcItemsMarked0;
|
||||
unsigned * offsetsFromPrevSrcItemMarked0;
|
||||
};
|
||||
enum eGRAPHICSSETTINGTYPE {
|
||||
eGRAPHICSSETTINGTYPE_WARP = 0x0,
|
||||
eGRAPHICSSETTINGTYPE_WARP_X = 0x1,
|
||||
eGRAPHICSSETTINGTYPE_WARP_Y = 0x2,
|
||||
eGRAPHICSSETTINGTYPE_WARP_Z = 0x3,
|
||||
eGRAPHICSSETTINGTYPE_GO = 0x4,
|
||||
eGRAPHICSSETTINGTYPE_MEMORY = 0x5,
|
||||
eGRAPHICSSETTINGTYPE_DRAW = 0x6,
|
||||
eGRAPHICSSETTINGTYPE_COLOR = 0x7,
|
||||
eGRAPHICSSETTINGTYPE_COLOR_R = 0x8,
|
||||
eGRAPHICSSETTINGTYPE_COLOR_G = 0x9,
|
||||
eGRAPHICSSETTINGTYPE_COLOR_B = 0xa,
|
||||
eGRAPHICSSETTINGTYPE_AMBIENT = 0xb,
|
||||
eGRAPHICSSETTINGTYPE_AMBIENT_R = 0xc,
|
||||
eGRAPHICSSETTINGTYPE_AMBIENT_G = 0xd,
|
||||
eGRAPHICSSETTINGTYPE_AMBIENT_B = 0xe,
|
||||
eGRAPHICSSETTINGTYPE_SHADOWCOLOR = 0xf,
|
||||
eGRAPHICSSETTINGTYPE_SHADOWCOLOR_A = 0x10,
|
||||
eGRAPHICSSETTINGTYPE_SHADOWCOLOR_R = 0x11,
|
||||
eGRAPHICSSETTINGTYPE_SHADOWCOLOR_G = 0x12,
|
||||
eGRAPHICSSETTINGTYPE_SHADOWCOLOR_B = 0x13,
|
||||
eGRAPHICSSETTINGTYPE_BGCOLOR = 0x14,
|
||||
eGRAPHICSSETTINGTYPE_BGCOLOR_R = 0x15,
|
||||
eGRAPHICSSETTINGTYPE_BGCOLOR_G = 0x16,
|
||||
eGRAPHICSSETTINGTYPE_BGCOLOR_B = 0x17,
|
||||
eGRAPHICSSETTINGTYPE_MIPMAPLOD = 0x18,
|
||||
eGRAPHICSSETTINGTYPE_MIPMAPLOD_BIAS = 0x19,
|
||||
eGRAPHICSSETTINGTYPE_G_CONTRAST = 0x1a,
|
||||
eGRAPHICSSETTINGTYPE_G_CONTRAST_R = 0x1b,
|
||||
eGRAPHICSSETTINGTYPE_G_CONTRAST_G = 0x1c,
|
||||
eGRAPHICSSETTINGTYPE_G_CONTRAST_B = 0x1d,
|
||||
eGRAPHICSSETTINGTYPE_G_LUMINANCE = 0x1e,
|
||||
eGRAPHICSSETTINGTYPE_G_LUMINANCE_R = 0x1f,
|
||||
eGRAPHICSSETTINGTYPE_G_LUMINANCE_G = 0x20,
|
||||
eGRAPHICSSETTINGTYPE_G_LUMINANCE_B = 0x21,
|
||||
eGRAPHICSSETTINGTYPE_GRIND = 0x22,
|
||||
eGRAPHICSSETTINGTYPE_GRIND_NS = 0x23,
|
||||
eGRAPHICSSETTINGTYPE_GRIND_XS = 0x24,
|
||||
eGRAPHICSSETTINGTYPE_GRIND_NR = 0x25,
|
||||
eGRAPHICSSETTINGTYPE_GRIND_XR = 0x26,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_NO = 0x27,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_NO_T = 0x28,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_SPEED = 0x29,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_SPEED_R = 0x2a,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_SPEED_T = 0x2b,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_SPEED_S = 0x2c,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_GRIND = 0x2d,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_GRIND_R = 0x2e,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_GRIND_T = 0x2f,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_GRIND_S = 0x30,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_NORMAL = 0x31,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_NORMAL_R = 0x32,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_NORMAL_T = 0x33,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_NORMAL_S = 0x34,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_SDASH = 0x35,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_SDASH_R = 0x36,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_SDASH_T = 0x37,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_SDASH_S = 0x38,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_CAMZ = 0x39,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_CAMZ_ND = 0x3a,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_CAMZ_XD = 0x3b,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_CAMZ_NR = 0x3c,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_CAMZ_XR = 0x3d,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_CAMTRT = 0x3e,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_CAMTRT_ND = 0x3f,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_CAMTRT_XD = 0x40,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_CAMTRT_NR = 0x41,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_CAMTRT_XR = 0x42,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_CAMANG_NA = 0x43,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_CAMANG_XA = 0x44,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_CAMANG_NR = 0x45,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_CAMANG_XR = 0x46,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_MESH = 0x47,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_MESH_IP = 0x48,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_MESH_AP = 0x49,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_MESH_BA = 0x4a,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_CAMALPHA = 0x4b,
|
||||
eGRAPHICSSETTINGTYPE_GIZA_CAMALPHA_ENABLE = 0x4c,
|
||||
eGRAPHICSSETTINGTYPE_DIST = 0x4d,
|
||||
eGRAPHICSSETTINGTYPE_FOG = 0x4e,
|
||||
eGRAPHICSSETTINGTYPE_FOG_ENABLE = 0x4f,
|
||||
eGRAPHICSSETTINGTYPE_FOG_R = 0x50,
|
||||
eGRAPHICSSETTINGTYPE_FOG_G = 0x51,
|
||||
eGRAPHICSSETTINGTYPE_FOG_B = 0x52,
|
||||
eGRAPHICSSETTINGTYPE_FOG_RANGE = 0x53,
|
||||
eGRAPHICSSETTINGTYPE_FOG_RANGE_NEAR = 0x54,
|
||||
eGRAPHICSSETTINGTYPE_FOG_RANGE_FAR = 0x55,
|
||||
eGRAPHICSSETTINGTYPE_POWER = 0x56,
|
||||
eGRAPHICSSETTINGTYPE_WIRE_FRAME = 0x57,
|
||||
eGRAPHICSSETTINGTYPE_WIRE_FRAME_ENABLE = 0x58,
|
||||
eGRAPHICSSETTINGTYPE_TEXTURE = 0x59,
|
||||
eGRAPHICSSETTINGTYPE_TEXTURE_NO = 0x5a,
|
||||
eGRAPHICSSETTINGTYPE_SCREENGAUGE = 0x5b,
|
||||
eGRAPHICSSETTINGTYPE_SCREENGAUGE_ENABLE = 0x5c,
|
||||
eGRAPHICSSETTINGTYPE_OWARI = 0x5d,
|
||||
eGRAPHICSSETTINGTYPE_COUNT = 0x5e,
|
||||
};
|
||||
|
||||
|
||||
enum eACTFLAG {
|
||||
eACTFLAG_CAMERA = 1 << 0,
|
||||
eACTFLAG_SKIPDRAWINGSOMETHING = 1 << 1,
|
||||
eACTFLAG_NODRAWPHASE2 = 1 << 16,
|
||||
eACTFLAG_DRAWTREE2 = 1 << 18,
|
||||
eACTFLAG_DRAWFIRST = 1 << 22,
|
||||
eACTFLAG_CAMERACHILD = 1 << 30,
|
||||
eACTFLAG_DELETE = 1 << 31
|
||||
};
|
||||
|
||||
// Position in g_lpActMan->objects array
|
||||
// Different indices and ranges are dedicated to different kinds of
|
||||
// objecs.
|
||||
enum eACTID {
|
||||
eACTID_NOTINDEXED = -1, // Not stored in array
|
||||
eACTID_DIRECTOR = 0,
|
||||
// TODO
|
||||
|
||||
eACTID_NUM = 0x1DF4
|
||||
};
|
||||
|
||||
// Base class of most objects (and everything in g_lpActMan->objects)
|
||||
struct CActBase {
|
||||
eACTFLAG m_ActFlag;
|
||||
eACTID m_ActID;
|
||||
|
||||
DWORD m_dwDrawChildMask;
|
||||
float m_fZ;
|
||||
DWORD m_dwZSort; // Four-level key, one byte each
|
||||
float m_vSomeTranslation[3];
|
||||
|
||||
// Links forming a tree of objects for exec phase
|
||||
CActBase * m_lpParent;
|
||||
CActBase * m_lpChild;
|
||||
CActBase * m_lpSiblingBefore;
|
||||
CActBase * m_lpSiblingNext;
|
||||
|
||||
// Some data structures used for draw phrase
|
||||
CActBase * m_lpDrawNext;
|
||||
CActBase * * m_lplpDrawBeforePtr;
|
||||
CActBase * * * m_lplplpDrawLastPtr;
|
||||
|
||||
CActBase * m_lpZSort;
|
||||
|
||||
virtual ~CActBase();
|
||||
|
||||
void recursiveExec0Default();
|
||||
void drawManyDefault(
|
||||
eACTFLAG flagFilterAny1,
|
||||
int drawArg1,
|
||||
int drawArg2,
|
||||
eACTFLAG flagFilterAll,
|
||||
unsigned otherBitfieldFilterAny,
|
||||
eACTFLAG flagFilterNone,
|
||||
eACTFLAG flagFilterAny2
|
||||
);
|
||||
void drawTreeDefault1();
|
||||
void drawTreeDefault2();
|
||||
|
||||
void recursiveExec0Event();
|
||||
void drawManyEvent(
|
||||
eACTFLAG flagFilterAny1,
|
||||
int drawArg1,
|
||||
int drawArg2,
|
||||
eACTFLAG flagFilterAll,
|
||||
unsigned otherBitfieldFilterAny,
|
||||
eACTFLAG flagFilterNone,
|
||||
eACTFLAG flagFilterAny2
|
||||
);
|
||||
void drawTreeEvent1();
|
||||
void drawTreeEvent2();
|
||||
|
||||
void recursiveExec0CoveredPause();
|
||||
void drawManyCoveredPause(
|
||||
eACTFLAG flagFilterAny1,
|
||||
int drawArg1,
|
||||
int drawArg2,
|
||||
eACTFLAG flagFilterAll,
|
||||
unsigned otherBitfieldFilterAny,
|
||||
eACTFLAG flagFilterNone,
|
||||
eACTFLAG flagFilterAny2
|
||||
);
|
||||
void drawTreeCoveredPause1();
|
||||
void drawTreeCoveredPause2();
|
||||
|
||||
void recursiveExec0FreezeCam();
|
||||
void drawManyFreezeCam(
|
||||
eACTFLAG flagFilterAny1,
|
||||
int drawArg1,
|
||||
int drawArg2,
|
||||
eACTFLAG flagFilterAll,
|
||||
unsigned otherBitfieldFilterAny,
|
||||
eACTFLAG flagFilterNone,
|
||||
eACTFLAG flagFilterAny2
|
||||
);
|
||||
void drawTreeFreezeCam1();
|
||||
void drawTreeFreezeCam2();
|
||||
|
||||
void recursiveExec0UncoveredPause();
|
||||
void drawManyUncoveredPause(
|
||||
eACTFLAG flagFilterAny1,
|
||||
int drawArg1,
|
||||
int drawArg2,
|
||||
eACTFLAG flagFilterAll,
|
||||
unsigned otherBitfieldFilterAny,
|
||||
eACTFLAG flagFilterNone,
|
||||
eACTFLAG flagFilterAny2
|
||||
);
|
||||
void drawTreeUncoveredPause1();
|
||||
void drawTreeUncoveredPause2();
|
||||
|
||||
void insertActionTreeSub(CActBase * lpSibling, CActBase * lpParent);
|
||||
void deleteActionChild(CActBase * lpChild);
|
||||
CActBase * getParentAction();
|
||||
|
||||
void SetDelete(CActBase * lpAct);
|
||||
void SetDeleteChild(CActBase * lpChild);
|
||||
|
||||
// Each frame, one of these trios of methods is called depending on
|
||||
// which state the game is in
|
||||
// Default implementation of each does nothing; inheriting objects
|
||||
// override these methods to run some code during each phase of each
|
||||
// frame.
|
||||
virtual void Exec0Default();
|
||||
virtual void Exec1Default();
|
||||
virtual void DrawListDefault(unsigned);
|
||||
|
||||
virtual void Exec0Event();
|
||||
virtual void Exec1Event();
|
||||
virtual void DrawListEvent(unsigned);
|
||||
|
||||
virtual void Exec0CoveredPause();
|
||||
virtual void Exec1CoveredPause();
|
||||
virtual void DrawListCoveredPause(unsigned);
|
||||
|
||||
virtual void Exec0FreezeCam();
|
||||
virtual void Exec1FreezeCam();
|
||||
virtual void DrawListFreezeCam(unsigned);
|
||||
|
||||
virtual void Exec0UncoveredPause();
|
||||
virtual void Exec1UncoveredPause();
|
||||
virtual void DrawListUncoveredPause(unsigned);
|
||||
|
||||
void recursiveExec1Default();
|
||||
void recursiveExec1Event();
|
||||
void recursiveExec1CoveredPause();
|
||||
void recursiveExec1FreezeCam();
|
||||
void recursiveExec1UncoveredPause();
|
||||
|
||||
void insertActionTree(CActBase * lpParent);
|
||||
|
||||
CActBase(CActBase * lpParent, eACTID ActID, eACTFLAG ActFlag);
|
||||
};
|
||||
|
||||
// There's a big array of possible arguments for draw methods with these
|
||||
struct SDrawFuncArgs {
|
||||
eACTFLAG flagFilterAny;
|
||||
int arg1;
|
||||
int arg2;
|
||||
};
|
||||
|
||||
// Base class of objects serving as the head of a tree of objects to draw
|
||||
// recursively
|
||||
struct CDrawBase : CActBase {
|
||||
float unknown0x44[3];
|
||||
float unknown0x50[3];
|
||||
float unknown0x5C[3];
|
||||
float unknown0x68[3];
|
||||
unsigned unknown0x74;
|
||||
unsigned unknown0x78;
|
||||
unsigned unknown0x7C;
|
||||
unsigned unknown0x80;
|
||||
float m_fViewport[4];
|
||||
eACTID m_SomeActID;
|
||||
|
||||
void copySomeVectors();
|
||||
CDrawBase(CActBase * lpParent, eACTID ActID, eACTFLAG ActFlag);
|
||||
virtual ~CDrawBase();
|
||||
};
|
||||
|
||||
struct CPlayer : CActBase {
|
||||
unsigned unknown0x44;
|
||||
unsigned unknown0x48;
|
||||
|
||||
CPlayer(CActBase * lpParent, eACTID ActID, eACTFLAG ActFlag);
|
||||
virtual ~CPlayer();
|
||||
};
|
||||
|
||||
// Top-level globally-accessible "god object" that runs the main loop and
|
||||
// provides global access to most other objects and many variables
|
||||
enum eDRAWMODE {
|
||||
eDRAWMODE_YES,
|
||||
eDRAWMODE_WAITVBLANK,
|
||||
eDRAWMODE_NO
|
||||
};
|
||||
|
||||
enum eGLOBAL {
|
||||
};
|
||||
|
||||
#pragma pack(4)
|
||||
struct CActMan {
|
||||
char unknown0x4[4];
|
||||
unsigned unknown0x8;
|
||||
unsigned * unknown0xC;
|
||||
HRESULT m_InitState;
|
||||
unsigned unknown0x14;
|
||||
BOOL m_bDrawProfilingInfo;
|
||||
int unknown0x1C;
|
||||
BOOL m_bLogosStarted;
|
||||
BOOL m_bFatal;
|
||||
|
||||
D3DCOLOR m_Color;
|
||||
D3DCOLOR m_AmbientColor;
|
||||
D3DCOLOR m_ShadowColor;
|
||||
D3DCOLOR m_BgColor;
|
||||
D3DCOLOR m_BgColorFallback;
|
||||
BOOL m_bUseFallbackBgColor;
|
||||
|
||||
// Game state used to select CActBase methods to call in main loop
|
||||
// If multiple states are activated, the precedence is
|
||||
// coveredPause > Event > FreezeCam > UncoveredPause > Default
|
||||
BOOL m_bCoveredPause; // Game paused with world not visible
|
||||
BOOL m_bEvent; // Events (cutscenes)
|
||||
BOOL m_bFreezeCam; // Time-frozen camera shots
|
||||
BOOL m_bUncoveredPause; // Game paused with world visible, or
|
||||
// automatic pause at start of mission
|
||||
|
||||
BOOL m_bCoveredPauseNextFrame;
|
||||
BOOL m_bNoCoveredPauseNextFrame;
|
||||
BOOL m_bEventNextFrame;
|
||||
BOOL m_bNoEventNextFrame;
|
||||
BOOL m_bFreezeCamNextFrame;
|
||||
BOOL m_bNoFreezeCamNextFrame;
|
||||
BOOL m_bUncoveredPauseNextFrame;
|
||||
BOOL m_bNoUncoveredPauseNextFrame;
|
||||
|
||||
BOOL m_bDrawChildren;
|
||||
BOOL m_bSkipDraw;
|
||||
BOOL m_bRunSomeExtraDrawListCode;
|
||||
SGraphicsPerformanceCounters m_PerfCounters;
|
||||
|
||||
eDRAWMODE m_DrawMode;
|
||||
|
||||
// Globally accessible objects and variables
|
||||
CActBase * m_lpActTbl[7668];
|
||||
DWORD m_Globals[461]; // Items may be any 32-bit type, e.g. ptr
|
||||
|
||||
CDrawBase * m_lpCamRoot;
|
||||
CDrawBase * * m_lplpCamPtr;
|
||||
|
||||
CActBase * m_lpDrawRoot;
|
||||
CActBase * * m_lplpDrawPtr;
|
||||
|
||||
CActBase * m_lpDrawSortRoot;
|
||||
CActBase * * m_lplpDrawSortPtr;
|
||||
|
||||
CActBase * m_lpDrawSortBinRoots[256];
|
||||
CActBase * * m_lplpDrawSortBinPtrs[256];
|
||||
|
||||
unsigned unknown0x87B4;
|
||||
|
||||
LARGE_INTEGER m_ExecPerfCount;
|
||||
LARGE_INTEGER m_DrawPerfCount;
|
||||
|
||||
unsigned unknown0x87C8;
|
||||
unsigned unknown0x87CC;
|
||||
DWORD m_dwFrameCount_MAYBE;
|
||||
unsigned unknown0x87D4;
|
||||
unsigned unknown0x87D8;
|
||||
CActBase * m_lpActExecRoot;
|
||||
DWORD m_dwAnimCount_MAYBE;
|
||||
DWORD m_dwAnimStep_MAYBE;
|
||||
DWORD m_dwActCount;
|
||||
CDrawBase * m_pCurrentDraw;
|
||||
eACTID m_CurrentDrawActID;
|
||||
eACTID m_CurrentDrawSomeActID;
|
||||
Mat4 m_mParentMatrix;
|
||||
unsigned unknown0x8838;
|
||||
unsigned unknown0x883C;
|
||||
|
||||
CActMan(unsigned *, unsigned);
|
||||
virtual ~CActMan();
|
||||
void ActionExec();
|
||||
void drawOne(CActBase * lpAct, unsigned);
|
||||
void drawListSub(
|
||||
eACTFLAG flagFilterAny1,
|
||||
int drawArg1,
|
||||
int drawArg2,
|
||||
eACTFLAG flagFilterAll,
|
||||
unsigned otherBitfieldFilterAny,
|
||||
eACTFLAG flagFilterNone,
|
||||
eACTFLAG flagFilterAny2
|
||||
);
|
||||
void drawTree1(CActBase * lpAct);
|
||||
|
||||
void setCoveredPauseNextFrame (BOOL bVal);
|
||||
void setEventNextFrame (BOOL bVal);
|
||||
void setFreezeCamNextFrame (BOOL bVal);
|
||||
void setUncoveredPauseNextFrame(BOOL bVal);
|
||||
|
||||
void DrawChildren();
|
||||
void DrawSkip();
|
||||
void Fatal();
|
||||
void SetDrawMode(eDRAWMODE Mode);
|
||||
|
||||
void SetGlobal(eGLOBAL Index, DWORD dwVal);
|
||||
DWORD GetGlobal(eGLOBAL Index);
|
||||
|
||||
void InsertDrawList(CActBase * lpAct);
|
||||
void DeleteDrawList(CActBase * lpAct);
|
||||
|
||||
void InsertActionExecList(eACTID ActID , CActBase * lpAct);
|
||||
void FreeActID (eACTID ActID);
|
||||
CActBase * GetAction (eACTID ActID);
|
||||
int GetFreeActionID (eACTID Min , eACTID Max);
|
||||
BOOL ActionIDAvail (eACTID ActID);
|
||||
void SwapActID (eACTID ActID1, eACTID ActID2);
|
||||
|
||||
void ClearScreen();
|
||||
void EnableSomeExtraDrawListCode();
|
||||
void SetLogosStarted(BOOL bVal);
|
||||
|
||||
void initSortDrawList();
|
||||
CActBase * getSortList();
|
||||
void InsertDrawSortList(CActBase * lpAct);
|
||||
void SortListSub(unsigned char ucSortKeyBitOffset);
|
||||
|
||||
void SetFallbackBgColor(D3DCOLOR Color, BOOL bUseFallback);
|
||||
void Init();
|
||||
void drawMany(eACTFLAG flagFilterAll, BOOL);
|
||||
void sortDrawList();
|
||||
void drawSub();
|
||||
void draw();
|
||||
void IdleSub();
|
||||
int Idle();
|
||||
};
|
||||
extern CActMan * g_lpActMan;
|
||||
|
||||
// Root of the exec GameObj tree
|
||||
struct CActRoot : CActBase {
|
||||
CActRoot(CActBase * lpParent, eACTID ActID, eACTFLAG ActFlag);
|
||||
virtual ~CActRoot();
|
||||
};
|
||||
|
||||
void SetActionDelete(eACTID ActID);
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -1,595 +0,0 @@
|
|||
/* JSRF Decompilation: JSRF/Core.hpp
|
||||
Game and GameObj classes that form the foundation of the JSRF game code.
|
||||
*/
|
||||
|
||||
#pragma bss_seg(".data")
|
||||
|
||||
#include "../XDK/CRT/stddef.h"
|
||||
#include "Core.hpp"
|
||||
|
||||
// Declarations for symbols not yet defined in their own source files
|
||||
// Remove these once they've been delinked!
|
||||
void readInput();
|
||||
|
||||
// Address: 0x00011000
|
||||
// Status: unimplemented
|
||||
GameObj::~GameObj() {
|
||||
g_game->gameObjCnt -= 1;
|
||||
}
|
||||
|
||||
// Address: 0x00011070
|
||||
// Status: unimplemented
|
||||
void GameObj::recursiveExecDefault() {
|
||||
}
|
||||
|
||||
// Address: 0x000110A0
|
||||
// Status: unimplemented
|
||||
void GameObj::drawListDefault(
|
||||
GameObjFlags flagFilterAny1,
|
||||
int drawArg1,
|
||||
int drawArg2,
|
||||
GameObjFlags flagFilterAll,
|
||||
unsigned otherBitfieldFilterAny,
|
||||
GameObjFlags flagFilterNone,
|
||||
GameObjFlags flagFilterAny2
|
||||
) {
|
||||
}
|
||||
|
||||
// Address: 0x00011220
|
||||
// Status: unimplemented
|
||||
void GameObj::drawTreeDefault1() {
|
||||
}
|
||||
|
||||
// Address: 0x00011260
|
||||
// Status: unimplemented
|
||||
void GameObj::drawTreeDefault2() {
|
||||
}
|
||||
|
||||
// Address: 0x000112A0
|
||||
// Status: unimplemented
|
||||
void GameObj::recursiveExecEvent() {
|
||||
}
|
||||
|
||||
// Address: 0x000112D0
|
||||
// Status: unimplemented
|
||||
void GameObj::drawListEvent(
|
||||
GameObjFlags flagFilterAny1,
|
||||
int drawArg1,
|
||||
int drawArg2,
|
||||
GameObjFlags flagFilterAll,
|
||||
unsigned otherBitfieldFilterAny,
|
||||
GameObjFlags flagFilterNone,
|
||||
GameObjFlags flagFilterAny2
|
||||
) {
|
||||
}
|
||||
|
||||
// Address: 0x00011450
|
||||
// Status: unimplemented
|
||||
void GameObj::drawTreeEvent1() {
|
||||
}
|
||||
|
||||
// Address: 0x00011490
|
||||
// Status: unimplemented
|
||||
void GameObj::drawTreeEvent2() {
|
||||
}
|
||||
|
||||
// Address: 0x000114D0
|
||||
// Status: unimplemented
|
||||
void GameObj::recursiveExecCoveredPause() {
|
||||
}
|
||||
|
||||
// Address: 0x00011500
|
||||
// Status: unimplemented
|
||||
void GameObj::drawListCoveredPause(
|
||||
GameObjFlags flagFilterAny1,
|
||||
int drawArg1,
|
||||
int drawArg2,
|
||||
GameObjFlags flagFilterAll,
|
||||
unsigned otherBitfieldFilterAny,
|
||||
GameObjFlags flagFilterNone,
|
||||
GameObjFlags flagFilterAny2
|
||||
) {
|
||||
}
|
||||
|
||||
// Address: 0x00011680
|
||||
// Status: unimplemented
|
||||
void GameObj::drawTreeCoveredPause1() {
|
||||
}
|
||||
|
||||
// Address: 0x000116C0
|
||||
// Status: unimplemented
|
||||
void GameObj::drawTreeCoveredPause2() {
|
||||
}
|
||||
|
||||
// Address: 0x00011700
|
||||
// Status: unimplemented
|
||||
void GameObj::recursiveExecFreezeCam() {
|
||||
}
|
||||
|
||||
// Address: 0x00011730
|
||||
// Status: unimplemented
|
||||
void GameObj::drawListFreezeCam(
|
||||
GameObjFlags flagFilterAny1,
|
||||
int drawArg1,
|
||||
int drawArg2,
|
||||
GameObjFlags flagFilterAll,
|
||||
unsigned otherBitfieldFilterAny,
|
||||
GameObjFlags flagFilterNone,
|
||||
GameObjFlags flagFilterAny2
|
||||
) {
|
||||
}
|
||||
|
||||
// Address: 0x000118B0
|
||||
// Status: unimplemented
|
||||
void GameObj::drawTreeFreezeCam1() {
|
||||
}
|
||||
|
||||
// Address: 0x000118F0
|
||||
// Status: unimplemented
|
||||
void GameObj::drawTreeFreezeCam2() {
|
||||
}
|
||||
|
||||
// Address: 0x00011930
|
||||
// Status: unimplemented
|
||||
void GameObj::recursiveExecUncoveredPause() {
|
||||
}
|
||||
|
||||
// Address: 0x00011960
|
||||
// Status: unimplemented
|
||||
void GameObj::drawListUncoveredPause(
|
||||
GameObjFlags flagFilterAny1,
|
||||
int drawArg1,
|
||||
int drawArg2,
|
||||
GameObjFlags flagFilterAll,
|
||||
unsigned otherBitfieldFilterAny,
|
||||
GameObjFlags flagFilterNone,
|
||||
GameObjFlags flagFilterAny2
|
||||
) {
|
||||
}
|
||||
|
||||
// Address: 0x00011AE0
|
||||
// Status: unimplemented
|
||||
void GameObj::drawTreeUncoveredPause1() {
|
||||
}
|
||||
|
||||
// Address: 0x00011B20
|
||||
// Status: unimplemented
|
||||
void GameObj::drawTreeUncoveredPause2() {
|
||||
}
|
||||
|
||||
// Address: 0x00011B60
|
||||
// Status: unimplemented
|
||||
void GameObj::addToSiblings(GameObj * sibling, GameObj * parent) {
|
||||
}
|
||||
|
||||
// Address: 0x00011B90
|
||||
// Status: unimplemented
|
||||
void GameObj::destructChildren(GameObj * firstChild) {
|
||||
}
|
||||
|
||||
// Address: 0x00011BD0
|
||||
// Status: matching
|
||||
GameObj * GameObj::getParent() {
|
||||
return this->parent;
|
||||
}
|
||||
|
||||
// Address: 0x00011BE0
|
||||
// Status: unimplemented
|
||||
void GameObj::removeFromObjList(GameObj * obj) {
|
||||
if (obj->flags > -1) {
|
||||
}
|
||||
}
|
||||
|
||||
// Address: 0x00011C20
|
||||
// Status: nonmatching
|
||||
void GameObj::removeChildrenFromObjList(GameObj * firstChild) {
|
||||
if (firstChild != NULL) do {
|
||||
if (firstChild->flags > -1) {
|
||||
firstChild->flags = GameObjFlags(firstChild->flags | GOF_DELETEAFTEREXEC);
|
||||
g_game->removeFromDrawList(firstChild);
|
||||
g_game->unsetObj(firstChild->index);
|
||||
}
|
||||
|
||||
this->removeChildrenFromObjList(firstChild->firstChild);
|
||||
firstChild = firstChild->nextSibling;
|
||||
} while (firstChild != NULL);
|
||||
}
|
||||
|
||||
// Address: 0x00011C80
|
||||
// Status: matching
|
||||
void GameObj::drawDefault(unsigned unknown) {}
|
||||
|
||||
// Address: 0x00011C90
|
||||
// Status: matching
|
||||
void GameObj::execDefault() {}
|
||||
|
||||
// Eliminated by link time code generation (aliased with 0x00011C90)
|
||||
void GameObj::postExecDefault() {}
|
||||
|
||||
// Eliminated by link time code generation (aliased with 0x00011C90)
|
||||
void GameObj::execEvent() {}
|
||||
|
||||
// Eliminated by link time code generation (aliased with 0x00011C90)
|
||||
void GameObj::postExecEvent() {}
|
||||
|
||||
// Eliminated by link time code generation (aliased with 0x00011C80)
|
||||
void GameObj::drawEvent(unsigned unknown) {}
|
||||
|
||||
// Eliminated by link time code generation (aliased with 0x00011C90)
|
||||
void GameObj::execCoveredPause() {}
|
||||
|
||||
// Eliminated by link time code generation (aliased with 0x00011C90)
|
||||
void GameObj::postExecCoveredPause() {}
|
||||
|
||||
// Eliminated by link time code generation (aliased with 0x00011C80)
|
||||
void GameObj::drawCoveredPause(unsigned unknown) {}
|
||||
|
||||
// Eliminated by link time code generation (aliased with 0x00011C90)
|
||||
void GameObj::execFreezeCam() {}
|
||||
|
||||
// Eliminated by link time code generation (aliased with 0x00011C90)
|
||||
void GameObj::postExecFreezeCam() {}
|
||||
|
||||
// Eliminated by link time code generation (aliased with 0x00011C80)
|
||||
void GameObj::drawFreezeCam(unsigned unknown) {}
|
||||
|
||||
// Eliminated by link time code generation (aliased with 0x00011C90)
|
||||
void GameObj::execUncoveredPause() {}
|
||||
|
||||
// Eliminated by link time code generation (aliased with 0x00011C90)
|
||||
void GameObj::postExecUncoveredPause() {}
|
||||
|
||||
// Eliminated by link time code generation (aliased with 0x00011C80)
|
||||
void GameObj::drawUncoveredPause(unsigned unknown) {}
|
||||
|
||||
// Address: 0x00011CA0
|
||||
// Status: unimplemented
|
||||
void DrawTree::copySomeVectors() {
|
||||
}
|
||||
|
||||
// Address: 0x00011D00
|
||||
// Status: unimplemented
|
||||
void GameObj::recursivePostExecDefault() {
|
||||
}
|
||||
|
||||
// Address: 0x00011D00
|
||||
// Status: unimplemented
|
||||
void GameObj::recursivePostExecEvent() {
|
||||
}
|
||||
|
||||
// Address: 0x00011E40
|
||||
// Status: unimplemented
|
||||
void GameObj::recursivePostExecCoveredPause() {
|
||||
}
|
||||
|
||||
// Address: 0x00011EE0
|
||||
// Status: unimplemented
|
||||
void GameObj::recursivePostExecFreezeCam() {
|
||||
}
|
||||
|
||||
// Address: 0x00011F80
|
||||
// Status: unimplemented
|
||||
void GameObj::recursivePostExecUncoveredPause() {
|
||||
}
|
||||
|
||||
// Address: 0x00012020
|
||||
// Status: unimplemented
|
||||
void GameObj::setParent(GameObj * parent) {
|
||||
}
|
||||
|
||||
// Address: 0x00012100
|
||||
// Status: unimplemented
|
||||
GameObj::GameObj(GameObj * parent, GameObjIndex index, GameObjFlags flags) {
|
||||
g_game->setObj(index, this);
|
||||
|
||||
this->parent = NULL;
|
||||
this->firstChild = NULL;
|
||||
this->prevSibling = NULL;
|
||||
this->nextSibling = NULL;
|
||||
this->index = index;
|
||||
this->flags = flags;
|
||||
|
||||
this->setParent(parent);
|
||||
|
||||
this->sortKey = 0;
|
||||
this->otherBitfield = 1;
|
||||
|
||||
g_game->gameObjCnt += 1;
|
||||
}
|
||||
|
||||
// Address: 0x00012170
|
||||
// Status: matching
|
||||
DrawTree::DrawTree(GameObj * parent, GameObjIndex index, GameObjFlags flags) :
|
||||
GameObj(parent, index, flags) {
|
||||
this->otherBitfield = 7;
|
||||
this->someIndex = 0;
|
||||
}
|
||||
|
||||
// Address: 0x000121D0
|
||||
// Status: unimplemented
|
||||
DrawTree::~DrawTree() {}
|
||||
|
||||
// Address: 0x000121E0
|
||||
// Status: unimplemented
|
||||
PlayerObj::PlayerObj(GameObj * parent, GameObjIndex index, GameObjFlags flags) :
|
||||
GameObj(parent, index, flags) {
|
||||
this->unknown0x44 = 0;
|
||||
this->unknown0x48 = 0;
|
||||
}
|
||||
|
||||
// Eliminated by link time code generation (aliased with 0x000121D0)
|
||||
PlayerObj::~PlayerObj() {}
|
||||
|
||||
// Address: 0x00012210
|
||||
// Status: unimplemented
|
||||
Game::Game(unsigned * unknown1, unsigned unknown2) {
|
||||
}
|
||||
|
||||
// Address: 0x00012390
|
||||
// Status: unimplemented
|
||||
Game::~Game() {
|
||||
}
|
||||
|
||||
// Address: 0x000123E0
|
||||
// Status: unimplemented
|
||||
void Game::exec() {
|
||||
}
|
||||
|
||||
// Address: 0x00012580
|
||||
// Status: unimplemented
|
||||
void Game::drawObj(GameObj * obj, unsigned unknown) {
|
||||
}
|
||||
|
||||
// Address: 0x000125E0
|
||||
// Status: unimplemented
|
||||
void Game::drawList_(
|
||||
GameObjFlags flagFilterAny1,
|
||||
int drawArg1,
|
||||
int drawArg2,
|
||||
GameObjFlags flagFilterAll,
|
||||
unsigned otherBitfieldFilterAny,
|
||||
GameObjFlags flagFilterNone,
|
||||
GameObjFlags flagFilterAny2
|
||||
) {
|
||||
}
|
||||
|
||||
// Address: 0x00012680
|
||||
// Status: unimplemented
|
||||
void Game::drawTree1(GameObj * obj) {
|
||||
}
|
||||
|
||||
// Address: 0x000126D0
|
||||
// Status: unimplemented
|
||||
void Game::setCoveredPauseNextFrame(BOOL val) {
|
||||
}
|
||||
|
||||
// Address: 0x000126F0
|
||||
// Status: unimplemented
|
||||
void Game::setEventNextFrame(BOOL val) {
|
||||
}
|
||||
|
||||
// Address: 0x00012710
|
||||
// Status: unimplemented
|
||||
void Game::setFreezeCamNextFrame(BOOL val) {
|
||||
}
|
||||
|
||||
// Address: 0x00012730
|
||||
// Status: unimplemented
|
||||
void Game::setUncoveredPauseNextFrame(BOOL val) {
|
||||
}
|
||||
|
||||
// Address: 0x00012750
|
||||
// Status: matching
|
||||
void Game::enableDrawChildren() {
|
||||
this->drawChildren = TRUE;
|
||||
}
|
||||
|
||||
// Address: 0x00012760
|
||||
// Status: matching
|
||||
void Game::enableSkipDraw() {
|
||||
this->skipDraw = TRUE;
|
||||
}
|
||||
|
||||
// Address: 0x00012770
|
||||
// Status: unimplemented
|
||||
void Game::fatal() {
|
||||
}
|
||||
|
||||
// Address: 0x000127B0
|
||||
// Status: matching
|
||||
void Game::setDrawMode(DrawMode mode) {
|
||||
this->drawMode = mode;
|
||||
}
|
||||
|
||||
// Address: 0x000127C0
|
||||
// Status: matching
|
||||
void Game::setGlobal(GlobalIndex index, unsigned val) {
|
||||
this->globals[index] = val;
|
||||
}
|
||||
|
||||
// Address: 0x000127E0
|
||||
// Status: matching
|
||||
unsigned Game::getGlobal(GlobalIndex index) {
|
||||
return this->globals[index];
|
||||
}
|
||||
|
||||
// Address: 0x000127F0
|
||||
// Status: unimplemented
|
||||
void Game::addToDrawList(GameObj * obj) {
|
||||
}
|
||||
|
||||
// Address: 0x00012840
|
||||
// Status: unimplemented
|
||||
void Game::removeFromDrawList(GameObj * obj) {
|
||||
}
|
||||
|
||||
// Address: 0x00012870
|
||||
// Status: matching
|
||||
void Game::setObj(GameObjIndex index, GameObj * obj) {
|
||||
if (0 <= index && index < OBJ_CNT)
|
||||
this->objects[index] = obj;
|
||||
}
|
||||
|
||||
// Address: 0x00012890
|
||||
// Status: matching
|
||||
void Game::unsetObj(GameObjIndex index) {
|
||||
if (0 <= index && this->objects[index] != NULL)
|
||||
this->objects[index] = NULL;
|
||||
}
|
||||
|
||||
// Address: 0x000128C0
|
||||
// Status: matching
|
||||
GameObj * Game::getObj(GameObjIndex index) {
|
||||
return 0 <= index ? this->objects[index] : NULL;
|
||||
}
|
||||
|
||||
// Address: 0x000128E0
|
||||
// Status: matching
|
||||
int Game::allocObjIndex(GameObjIndex min, GameObjIndex max) {
|
||||
if (min <= max) do
|
||||
if (this->objects[min] == NULL) return min;
|
||||
else min = GameObjIndex(min + 1);
|
||||
while (min <= max);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Address: 0x00012910
|
||||
// Status: matching
|
||||
BOOL Game::objIndexAvail(GameObjIndex index) {
|
||||
return this->objects[index] == NULL;
|
||||
}
|
||||
|
||||
// Address: 0x00012930
|
||||
// Status: matching
|
||||
void Game::swapObjs(GameObjIndex index1, GameObjIndex index2) {
|
||||
GameObj * tmp = this->objects[index1];
|
||||
this->objects[index1] = this->objects[index2];
|
||||
this->objects[index2] = tmp;
|
||||
|
||||
if (this->objects[index1] != NULL) this->objects[index1]->index = index1;
|
||||
if (this->objects[index2] != NULL) this->objects[index2]->index = index2;
|
||||
}
|
||||
|
||||
// Address: 0x00012980
|
||||
// Status: unimplemented
|
||||
void Game::clearScreen() {
|
||||
}
|
||||
|
||||
// Address: 0x000129B0
|
||||
// Status: matching
|
||||
void Game::enableSomeExtraDrawListCode() {
|
||||
this->runSomeExtraDrawListCode = TRUE;
|
||||
}
|
||||
|
||||
// Address: 0x000129C0
|
||||
// Status: matching
|
||||
void Game::setLogosStarted(BOOL val) {
|
||||
this->logosStarted = val;
|
||||
}
|
||||
|
||||
// Address: 0x000129D0
|
||||
// Status: matching
|
||||
void Game::clearDrawPriorityList() {
|
||||
this->drawPriorityListHead = NULL;
|
||||
this->drawPriorityListEndNext = &g_game->drawPriorityListHead;
|
||||
}
|
||||
|
||||
// Address: 0x000129F0
|
||||
// Status: matching
|
||||
GameObj * Game::getDrawPriorityListHead() {
|
||||
return this->drawPriorityListHead;
|
||||
}
|
||||
|
||||
// Address: 0x00012A00
|
||||
// Status: matching
|
||||
void Game::appendToDrawPriorityList(GameObj * obj) {
|
||||
obj->drawPriorityListNext = NULL;
|
||||
*this->drawPriorityListEndNext = obj;
|
||||
this->drawPriorityListEndNext = &obj->drawPriorityListNext;
|
||||
}
|
||||
|
||||
// Address: 0x00012A20
|
||||
// Status: unimplemented
|
||||
void Game::sortDrawPriorityListSingleLevel(unsigned char sortKeyBitOffset) {
|
||||
for (
|
||||
unsigned i = 0;
|
||||
i < sizeof this->drawPriorityListsByKeyHeads/sizeof *this->drawPriorityListsByKeyHeads;
|
||||
i++
|
||||
) this->drawPriorityListsByKeyHeads[i] = NULL;
|
||||
}
|
||||
|
||||
// Address: 0x00012AC0
|
||||
// Status: matching
|
||||
void Game::setFallbackBgColour(D3DCOLOR colour, BOOL useFallback) {
|
||||
this->useFallbackBgColour = useFallback;
|
||||
this->bgColourFallback = colour;
|
||||
}
|
||||
|
||||
// Address: 0x00012AE0
|
||||
// Status: unimplemented
|
||||
RootExecObj::RootExecObj(GameObj * parent, GameObjIndex index, GameObjFlags flags) :
|
||||
GameObj(parent, index, flags) {
|
||||
}
|
||||
|
||||
// Address: 0x00012BE0
|
||||
// Status: matching
|
||||
RootExecObj::~RootExecObj() {
|
||||
}
|
||||
|
||||
// Address: 0x00012C10
|
||||
// Status: unimplemented
|
||||
void Game::initRootExecObj() {
|
||||
}
|
||||
|
||||
// Address: 0x00012C80
|
||||
// Status: unimplemented
|
||||
void Game::drawList(GameObjFlags flagFilterAll, BOOL unknown) {
|
||||
}
|
||||
|
||||
// Address: 0x000131A0
|
||||
// Status: nonmatching
|
||||
void Game::sortDrawPriorityList() {
|
||||
this->sortDrawPriorityListSingleLevel(0x00);
|
||||
this->sortDrawPriorityListSingleLevel(0x08);
|
||||
this->sortDrawPriorityListSingleLevel(0x10);
|
||||
this->sortDrawPriorityListSingleLevel(0x18);
|
||||
}
|
||||
|
||||
// Address: 0x000131F0
|
||||
// Status: unimplemented
|
||||
void Game::drawObjs() {
|
||||
}
|
||||
|
||||
// Address: 0x00013930
|
||||
// Status: unimplemented
|
||||
void Game::draw() {
|
||||
}
|
||||
|
||||
// Address: 0x00013A80
|
||||
// Status: unimplemented
|
||||
void Game::frame() {
|
||||
readInput();
|
||||
}
|
||||
|
||||
// Address: 0x00013F80
|
||||
// Status: matching
|
||||
int Game::mainLoop() {
|
||||
if (this->initState >= 0) while (true) {
|
||||
if (!this->fatalErr) this->frame();
|
||||
else {
|
||||
readInput();
|
||||
Sleep(0x10);
|
||||
}
|
||||
} else return -1;
|
||||
}
|
||||
|
||||
// Address: 0x00013FC0
|
||||
// Status: nonmatching
|
||||
void removeFromObjListByIndex(GameObjIndex index) {
|
||||
GameObj * obj = g_game->getObj(index);
|
||||
if (obj != NULL) {
|
||||
obj->removeFromObjList(obj);
|
||||
obj->removeChildrenFromObjList(obj->firstChild);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,549 +0,0 @@
|
|||
/* JSRF Decompilation: JSRF/Core.hpp
|
||||
Game and GameObj classes that form the foundation of the JSRF game code.
|
||||
*/
|
||||
|
||||
#ifndef CORE_HPP
|
||||
#define CORE_HPP
|
||||
|
||||
#include "../MUSASHI/MMatrix.hpp"
|
||||
#include "../XDK/CRT/stddef.h"
|
||||
#include "../XDK/D3D.h"
|
||||
#include "../XDK/Win32.h"
|
||||
|
||||
|
||||
// TODO; move to header for Graphics COM object in Smilebit libraries
|
||||
struct GraphicsPerformanceCounters {
|
||||
unsigned fps;
|
||||
unsigned trianglesPerSecond;
|
||||
unsigned frameTriangleCnt;
|
||||
unsigned unknown0xC;
|
||||
unsigned unknown0x10;
|
||||
unsigned unknown0x14;
|
||||
};
|
||||
|
||||
// TODO: Just here to get delinking working until we make dedicated source
|
||||
// files for these classes
|
||||
struct CollisionManager {
|
||||
CollisionManager();
|
||||
virtual ~CollisionManager();
|
||||
};
|
||||
struct UnknownGlobal {
|
||||
UnknownGlobal();
|
||||
virtual ~UnknownGlobal();
|
||||
};
|
||||
struct UnknownStatic02 {
|
||||
UnknownStatic02();
|
||||
virtual ~UnknownStatic02();
|
||||
};
|
||||
struct UnknownStatic04 {
|
||||
UnknownStatic04();
|
||||
virtual ~UnknownStatic04();
|
||||
};
|
||||
struct UnknownStatic05 {
|
||||
UnknownStatic05();
|
||||
virtual ~UnknownStatic05();
|
||||
};
|
||||
struct UnknownStatic06 {
|
||||
UnknownStatic06();
|
||||
virtual ~UnknownStatic06();
|
||||
};
|
||||
struct UnknownStatic07 {
|
||||
UnknownStatic07();
|
||||
virtual ~UnknownStatic07();
|
||||
};
|
||||
struct UnknownStatic09 {
|
||||
UnknownStatic09();
|
||||
virtual ~UnknownStatic09();
|
||||
};
|
||||
struct UnknownStatic13 {
|
||||
char unknown1[0x274];
|
||||
void * unknown2;
|
||||
void * unknown3;
|
||||
};
|
||||
struct UnknownStatic16 {
|
||||
UnknownStatic16();
|
||||
virtual ~UnknownStatic16();
|
||||
};
|
||||
struct UnknownStatic17 {
|
||||
UnknownStatic17();
|
||||
virtual ~UnknownStatic17();
|
||||
};
|
||||
struct UnknownStatic18 {
|
||||
UnknownStatic18();
|
||||
virtual ~UnknownStatic18();
|
||||
};
|
||||
struct UnknownStatic19 {
|
||||
UnknownStatic19();
|
||||
virtual ~UnknownStatic19();
|
||||
};
|
||||
struct UnknownStatic24 {
|
||||
UnknownStatic24();
|
||||
virtual ~UnknownStatic24();
|
||||
};
|
||||
struct UnknownStatic27 {
|
||||
UnknownStatic27();
|
||||
virtual ~UnknownStatic27();
|
||||
void * unknown[3];
|
||||
};
|
||||
struct GraphicsSetting {
|
||||
unsigned countedIfZero;
|
||||
char * name;
|
||||
D3DVECTOR unknown;
|
||||
float value;
|
||||
unsigned index;
|
||||
};
|
||||
struct GraphicsSettings {
|
||||
float * settings;
|
||||
unsigned settingsArrSizeInBytes;
|
||||
unsigned unknown1;
|
||||
unsigned unknown2;
|
||||
unsigned srcArrZeroCnt;
|
||||
GraphicsSetting * srcItemsMarked0;
|
||||
unsigned * offsetsFromPrevSrcItemMarked0;
|
||||
};
|
||||
enum GraphicsSettingType {
|
||||
GST_WARP = 0x0,
|
||||
GST_WARP_X = 0x1,
|
||||
GST_WARP_Y = 0x2,
|
||||
GST_WARP_Z = 0x3,
|
||||
GST_GO = 0x4,
|
||||
GST_MEMORY = 0x5,
|
||||
GST_DRAW = 0x6,
|
||||
GST_COLOR = 0x7,
|
||||
GST_COLOR_R = 0x8,
|
||||
GST_COLOR_G = 0x9,
|
||||
GST_COLOR_B = 0xa,
|
||||
GST_AMBIENT = 0xb,
|
||||
GST_AMBIENT_R = 0xc,
|
||||
GST_AMBIENT_G = 0xd,
|
||||
GST_AMBIENT_B = 0xe,
|
||||
GST_SHADOWCOLOR = 0xf,
|
||||
GST_SHADOWCOLOR_A = 0x10,
|
||||
GST_SHADOWCOLOR_R = 0x11,
|
||||
GST_SHADOWCOLOR_G = 0x12,
|
||||
GST_SHADOWCOLOR_B = 0x13,
|
||||
GST_BGCOLOR = 0x14,
|
||||
GST_BGCOLOR_R = 0x15,
|
||||
GST_BGCOLOR_G = 0x16,
|
||||
GST_BGCOLOR_B = 0x17,
|
||||
GST_MIPMAPLOD = 0x18,
|
||||
GST_MIPMAPLOD_BIAS = 0x19,
|
||||
GST_G_CONTRAST = 0x1a,
|
||||
GST_G_CONTRAST_R = 0x1b,
|
||||
GST_G_CONTRAST_G = 0x1c,
|
||||
GST_G_CONTRAST_B = 0x1d,
|
||||
GST_G_LUMINANCE = 0x1e,
|
||||
GST_G_LUMINANCE_R = 0x1f,
|
||||
GST_G_LUMINANCE_G = 0x20,
|
||||
GST_G_LUMINANCE_B = 0x21,
|
||||
GST_GRIND = 0x22,
|
||||
GST_GRIND_NS = 0x23,
|
||||
GST_GRIND_XS = 0x24,
|
||||
GST_GRIND_NR = 0x25,
|
||||
GST_GRIND_XR = 0x26,
|
||||
GST_GIZA_NO = 0x27,
|
||||
GST_GIZA_NO_T = 0x28,
|
||||
GST_GIZA_SPEED = 0x29,
|
||||
GST_GIZA_SPEED_R = 0x2a,
|
||||
GST_GIZA_SPEED_T = 0x2b,
|
||||
GST_GIZA_SPEED_S = 0x2c,
|
||||
GST_GIZA_GRIND = 0x2d,
|
||||
GST_GIZA_GRIND_R = 0x2e,
|
||||
GST_GIZA_GRIND_T = 0x2f,
|
||||
GST_GIZA_GRIND_S = 0x30,
|
||||
GST_GIZA_NORMAL = 0x31,
|
||||
GST_GIZA_NORMAL_R = 0x32,
|
||||
GST_GIZA_NORMAL_T = 0x33,
|
||||
GST_GIZA_NORMAL_S = 0x34,
|
||||
GST_GIZA_SDASH = 0x35,
|
||||
GST_GIZA_SDASH_R = 0x36,
|
||||
GST_GIZA_SDASH_T = 0x37,
|
||||
GST_GIZA_SDASH_S = 0x38,
|
||||
GST_GIZA_CAMZ = 0x39,
|
||||
GST_GIZA_CAMZ_ND = 0x3a,
|
||||
GST_GIZA_CAMZ_XD = 0x3b,
|
||||
GST_GIZA_CAMZ_NR = 0x3c,
|
||||
GST_GIZA_CAMZ_XR = 0x3d,
|
||||
GST_GIZA_CAMTRT = 0x3e,
|
||||
GST_GIZA_CAMTRT_ND = 0x3f,
|
||||
GST_GIZA_CAMTRT_XD = 0x40,
|
||||
GST_GIZA_CAMTRT_NR = 0x41,
|
||||
GST_GIZA_CAMTRT_XR = 0x42,
|
||||
GST_GIZA_CAMANG_NA = 0x43,
|
||||
GST_GIZA_CAMANG_XA = 0x44,
|
||||
GST_GIZA_CAMANG_NR = 0x45,
|
||||
GST_GIZA_CAMANG_XR = 0x46,
|
||||
GST_GIZA_MESH = 0x47,
|
||||
GST_GIZA_MESH_IP = 0x48,
|
||||
GST_GIZA_MESH_AP = 0x49,
|
||||
GST_GIZA_MESH_BA = 0x4a,
|
||||
GST_GIZA_CAMALPHA = 0x4b,
|
||||
GST_GIZA_CAMALPHA_ENABLE = 0x4c,
|
||||
GST_DIST = 0x4d,
|
||||
GST_FOG = 0x4e,
|
||||
GST_FOG_ENABLE = 0x4f,
|
||||
GST_FOG_R = 0x50,
|
||||
GST_FOG_G = 0x51,
|
||||
GST_FOG_B = 0x52,
|
||||
GST_FOG_RANGE = 0x53,
|
||||
GST_FOG_RANGE_NEAR = 0x54,
|
||||
GST_FOG_RANGE_FAR = 0x55,
|
||||
GST_POWER = 0x56,
|
||||
GST_WIRE_FRAME = 0x57,
|
||||
GST_WIRE_FRAME_ENABLE = 0x58,
|
||||
GST_TEXTURE = 0x59,
|
||||
GST_TEXTURE_NO = 0x5a,
|
||||
GST_SCREENGAUGE = 0x5b,
|
||||
GST_SCREENGAUGE_ENABLE = 0x5c,
|
||||
GST_OWARI = 0x5d,
|
||||
GST_COUNT = 0x5e,
|
||||
};
|
||||
|
||||
|
||||
enum GameObjFlags {
|
||||
GOF_DRAWTREEHEAD = 1 << 0,
|
||||
GOF_SKIPDRAWINGSOMETHING = 1 << 1,
|
||||
GOF_NODRAWPHASE2 = 1 << 16,
|
||||
GOF_DRAWTREE2 = 1 << 18,
|
||||
GOF_DRAWPHASE1 = 1 << 22,
|
||||
GOF_DRAWTREECHILD = 1 << 30,
|
||||
GOF_DELETEAFTEREXEC = 1 << 31
|
||||
};
|
||||
|
||||
// Position in g_game->objects array
|
||||
// Different indices and ranges are dedicated to different kinds of
|
||||
// objecs.
|
||||
enum GameObjIndex {
|
||||
OBJ_NOTINDEXED = -1, // Not stored in array
|
||||
OBJ_DIRECTOR = 0,
|
||||
// TODO
|
||||
|
||||
OBJ_CNT = 0x1DF4
|
||||
};
|
||||
|
||||
// Base class of most objects (and everything in g_game->objects)
|
||||
struct GameObj {
|
||||
GameObjFlags flags;
|
||||
GameObjIndex index;
|
||||
|
||||
unsigned otherBitfield;
|
||||
float reverseSortKey; // Sign flipped to produced sortKey
|
||||
unsigned sortKey; // Four-level key, one byte each
|
||||
D3DVECTOR someTranslation;
|
||||
|
||||
// Links forming a tree of objects for exec phase
|
||||
GameObj * parent;
|
||||
GameObj * firstChild;
|
||||
GameObj * prevSibling;
|
||||
GameObj * nextSibling;
|
||||
|
||||
// Some data structures used for draw phrase
|
||||
GameObj * nextDrawTree;
|
||||
GameObj * * prevDrawTreeNext;
|
||||
GameObj * * * lastDrawTreeNextPtr;
|
||||
|
||||
GameObj * drawPriorityListNext;
|
||||
|
||||
virtual ~GameObj();
|
||||
|
||||
void recursiveExecDefault();
|
||||
void drawListDefault(
|
||||
GameObjFlags flagFilterAny1,
|
||||
int drawArg1,
|
||||
int drawArg2,
|
||||
GameObjFlags flagFilterAll,
|
||||
unsigned otherBitfieldFilterAny,
|
||||
GameObjFlags flagFilterNone,
|
||||
GameObjFlags flagFilterAny2
|
||||
);
|
||||
void drawTreeDefault1();
|
||||
void drawTreeDefault2();
|
||||
|
||||
void recursiveExecEvent();
|
||||
void drawListEvent(
|
||||
GameObjFlags flagFilterAny1,
|
||||
int drawArg1,
|
||||
int drawArg2,
|
||||
GameObjFlags flagFilterAll,
|
||||
unsigned otherBitfieldFilterAny,
|
||||
GameObjFlags flagFilterNone,
|
||||
GameObjFlags flagFilterAny2
|
||||
);
|
||||
void drawTreeEvent1();
|
||||
void drawTreeEvent2();
|
||||
|
||||
void recursiveExecCoveredPause();
|
||||
void drawListCoveredPause(
|
||||
GameObjFlags flagFilterAny1,
|
||||
int drawArg1,
|
||||
int drawArg2,
|
||||
GameObjFlags flagFilterAll,
|
||||
unsigned otherBitfieldFilterAny,
|
||||
GameObjFlags flagFilterNone,
|
||||
GameObjFlags flagFilterAny2
|
||||
);
|
||||
void drawTreeCoveredPause1();
|
||||
void drawTreeCoveredPause2();
|
||||
|
||||
void recursiveExecFreezeCam();
|
||||
void drawListFreezeCam(
|
||||
GameObjFlags flagFilterAny1,
|
||||
int drawArg1,
|
||||
int drawArg2,
|
||||
GameObjFlags flagFilterAll,
|
||||
unsigned otherBitfieldFilterAny,
|
||||
GameObjFlags flagFilterNone,
|
||||
GameObjFlags flagFilterAny2
|
||||
);
|
||||
void drawTreeFreezeCam1();
|
||||
void drawTreeFreezeCam2();
|
||||
|
||||
void recursiveExecUncoveredPause();
|
||||
void drawListUncoveredPause(
|
||||
GameObjFlags flagFilterAny1,
|
||||
int drawArg1,
|
||||
int drawArg2,
|
||||
GameObjFlags flagFilterAll,
|
||||
unsigned otherBitfieldFilterAny,
|
||||
GameObjFlags flagFilterNone,
|
||||
GameObjFlags flagFilterAny2
|
||||
);
|
||||
void drawTreeUncoveredPause1();
|
||||
void drawTreeUncoveredPause2();
|
||||
|
||||
void addToSiblings(GameObj * sibling, GameObj * parent);
|
||||
void destructChildren(GameObj * firstChild);
|
||||
GameObj * getParent();
|
||||
|
||||
void removeFromObjList (GameObj * obj);
|
||||
void removeChildrenFromObjList(GameObj * firstChild);
|
||||
|
||||
// Each frame, one of these trios of methods is called depending on
|
||||
// which state the game is in
|
||||
// Default implementation of each does nothing; inheriting objects
|
||||
// override these methods to run some code during each phase of each
|
||||
// frame.
|
||||
virtual void execDefault();
|
||||
virtual void postExecDefault();
|
||||
virtual void drawDefault(unsigned);
|
||||
|
||||
virtual void execEvent();
|
||||
virtual void postExecEvent();
|
||||
virtual void drawEvent(unsigned);
|
||||
|
||||
virtual void execCoveredPause();
|
||||
virtual void postExecCoveredPause();
|
||||
virtual void drawCoveredPause(unsigned);
|
||||
|
||||
virtual void execFreezeCam();
|
||||
virtual void postExecFreezeCam();
|
||||
virtual void drawFreezeCam(unsigned);
|
||||
|
||||
virtual void execUncoveredPause();
|
||||
virtual void postExecUncoveredPause();
|
||||
virtual void drawUncoveredPause(unsigned);
|
||||
|
||||
void recursivePostExecDefault();
|
||||
void recursivePostExecEvent();
|
||||
void recursivePostExecCoveredPause();
|
||||
void recursivePostExecFreezeCam();
|
||||
void recursivePostExecUncoveredPause();
|
||||
|
||||
void setParent(GameObj * parent);
|
||||
|
||||
GameObj(GameObj * parent, GameObjIndex index, GameObjFlags flags);
|
||||
};
|
||||
|
||||
// There's a big array of possible arguments for draw methods with these
|
||||
struct DrawFuncArgs {
|
||||
GameObjFlags flagFilterAny;
|
||||
int arg1;
|
||||
int arg2;
|
||||
};
|
||||
|
||||
// Base class of objects serving as the head of a tree of objects to draw
|
||||
// recursively
|
||||
struct DrawTree : GameObj {
|
||||
D3DVECTOR unknown0x44;
|
||||
D3DVECTOR unknown0x50;
|
||||
D3DVECTOR unknown0x5C;
|
||||
D3DVECTOR unknown0x68;
|
||||
unsigned unknown0x74;
|
||||
unsigned unknown0x78;
|
||||
unsigned unknown0x7C;
|
||||
unsigned unknown0x80;
|
||||
D3DRECT viewport;
|
||||
unsigned someIndex;
|
||||
|
||||
void copySomeVectors();
|
||||
DrawTree(GameObj * parent, GameObjIndex index, GameObjFlags flags);
|
||||
virtual ~DrawTree();
|
||||
};
|
||||
|
||||
struct PlayerObj : GameObj {
|
||||
unsigned unknown0x44;
|
||||
unsigned unknown0x48;
|
||||
|
||||
PlayerObj(GameObj * parent, GameObjIndex index, GameObjFlags flags);
|
||||
virtual ~PlayerObj();
|
||||
};
|
||||
|
||||
// Top-level globally-accessible "god object" that runs the main loop and
|
||||
// provides global access to most other objects and many variables
|
||||
enum DrawMode {
|
||||
DRAW_YES,
|
||||
DRAW_WAITVBLANK,
|
||||
DRAW_NO
|
||||
};
|
||||
|
||||
enum GlobalIndex {
|
||||
};
|
||||
|
||||
#pragma pack(4)
|
||||
struct Game {
|
||||
char unknown0x4[4];
|
||||
unsigned unknown0x8;
|
||||
unsigned * unknown0xC;
|
||||
int initState;
|
||||
unsigned unknown0x14;
|
||||
BOOL drawProfilingInfo;
|
||||
int unknown0x1C;
|
||||
BOOL logosStarted;
|
||||
BOOL fatalErr;
|
||||
|
||||
D3DCOLOR colour;
|
||||
D3DCOLOR ambientColour;
|
||||
D3DCOLOR shadowColour;
|
||||
D3DCOLOR bgColour;
|
||||
D3DCOLOR bgColourFallback;
|
||||
BOOL useFallbackBgColour;
|
||||
|
||||
// Game state used to select GameObj methods to call in main loop
|
||||
// If multiple states are activated, the precedence is
|
||||
// coveredPause > Event > FreezeCam > UncoveredPause > Default
|
||||
BOOL coveredPause; // Game paused with world not visible
|
||||
BOOL event; // Events (cutscenes)
|
||||
BOOL freezeCam; // Time-frozen camera shots
|
||||
BOOL uncoveredPause; // Game paused with world visible, or
|
||||
// automatic pause at start of mission
|
||||
|
||||
BOOL coveredPauseNextFrame;
|
||||
BOOL noCoveredPauseNextFrame;
|
||||
BOOL eventNextFrame;
|
||||
BOOL noEventNextFrame;
|
||||
BOOL freezeCamNextFrame;
|
||||
BOOL noFreezeCamNextFrame;
|
||||
BOOL uncoveredPauseNextFrame;
|
||||
BOOL noUncoveredPauseNextFrame;
|
||||
|
||||
BOOL drawChildren;
|
||||
BOOL skipDraw;
|
||||
BOOL runSomeExtraDrawListCode;
|
||||
GraphicsPerformanceCounters perfCounters;
|
||||
|
||||
DrawMode drawMode;
|
||||
|
||||
// Globally accessible objects and variables
|
||||
GameObj * objects[7668];
|
||||
unsigned globals[461]; // Items may be any 32-bit type, e.g. ptr
|
||||
|
||||
DrawTree * drawTreesHead;
|
||||
DrawTree * * drawTreesEndNext;
|
||||
|
||||
GameObj * drawListHead;
|
||||
GameObj * * drawListEndNext;
|
||||
|
||||
GameObj * drawPriorityListHead;
|
||||
GameObj * * drawPriorityListEndNext;
|
||||
|
||||
GameObj * drawPriorityListsByKeyHeads [256];
|
||||
GameObj * * drawPriorityListsByKeyEndNexts[256];
|
||||
|
||||
unsigned unknown0x87B4;
|
||||
|
||||
LARGE_INTEGER execPerfCount;
|
||||
LARGE_INTEGER drawPerfCount;
|
||||
|
||||
unsigned unknown0x87C8;
|
||||
unsigned unknown0x87CC;
|
||||
unsigned frameCnt1;
|
||||
unsigned unknown0x87D4;
|
||||
unsigned unknown0x87D8;
|
||||
GameObj * rootExecObj;
|
||||
int frameCnt2;
|
||||
int frameCnt3;
|
||||
unsigned gameObjCnt;
|
||||
DrawTree * currentDrawTree;
|
||||
GameObjIndex currentDrawTreeIndex;
|
||||
int unknown0x87F4;
|
||||
Mat4 parentMatrix;
|
||||
unsigned unknown0x8838;
|
||||
unsigned unknown0x883C;
|
||||
|
||||
Game(unsigned *, unsigned);
|
||||
virtual ~Game();
|
||||
void exec();
|
||||
void drawObj(GameObj * obj, unsigned);
|
||||
void drawList_(
|
||||
GameObjFlags flagFilterAny1,
|
||||
int drawArg1,
|
||||
int drawArg2,
|
||||
GameObjFlags flagFilterAll,
|
||||
unsigned otherBitfieldFilterAny,
|
||||
GameObjFlags flagFilterNone,
|
||||
GameObjFlags flagFilterAny2
|
||||
);
|
||||
void drawTree1(GameObj * obj);
|
||||
|
||||
void setCoveredPauseNextFrame (BOOL val);
|
||||
void setEventNextFrame (BOOL val);
|
||||
void setFreezeCamNextFrame (BOOL val);
|
||||
void setUncoveredPauseNextFrame(BOOL val);
|
||||
|
||||
void enableDrawChildren();
|
||||
void enableSkipDraw();
|
||||
void fatal();
|
||||
void setDrawMode(DrawMode mode);
|
||||
|
||||
void setGlobal(GlobalIndex index, unsigned val);
|
||||
unsigned getGlobal(GlobalIndex index);
|
||||
|
||||
void addToDrawList (GameObj * obj);
|
||||
void removeFromDrawList(GameObj * obj);
|
||||
|
||||
void setObj (GameObjIndex index , GameObj * obj);
|
||||
void unsetObj (GameObjIndex index );
|
||||
GameObj * getObj (GameObjIndex index );
|
||||
int allocObjIndex(GameObjIndex min , GameObjIndex max);
|
||||
BOOL objIndexAvail(GameObjIndex index );
|
||||
void swapObjs (GameObjIndex index1, GameObjIndex index2);
|
||||
|
||||
void clearScreen();
|
||||
void enableSomeExtraDrawListCode();
|
||||
void setLogosStarted(BOOL val);
|
||||
|
||||
void clearDrawPriorityList();
|
||||
GameObj * getDrawPriorityListHead();
|
||||
void appendToDrawPriorityList(GameObj * obj);
|
||||
void sortDrawPriorityListSingleLevel(unsigned char sortKeyBitOffset);
|
||||
|
||||
void setFallbackBgColour(D3DCOLOR colour, BOOL useFallback);
|
||||
void initRootExecObj();
|
||||
void drawList(GameObjFlags flagFilterAll, BOOL);
|
||||
void sortDrawPriorityList();
|
||||
void drawObjs();
|
||||
void draw();
|
||||
void frame();
|
||||
int mainLoop();
|
||||
};
|
||||
extern Game * g_game;
|
||||
|
||||
// Root of the exec GameObj tree
|
||||
struct RootExecObj : GameObj {
|
||||
RootExecObj(GameObj * parent, GameObjIndex index, GameObjFlags flags);
|
||||
virtual ~RootExecObj();
|
||||
};
|
||||
|
||||
void removeFromObjListByIndex(GameObjIndex index);
|
||||
|
||||
#endif
|
||||
|
|
@ -1,366 +0,0 @@
|
|||
/* JSRF Decompilation: JSRF/GameData.hpp
|
||||
Save data and closely-related runtime data.
|
||||
*/
|
||||
|
||||
#pragma bss_seg(".data")
|
||||
|
||||
#include "../XDK/Win32.h"
|
||||
#include "GameData.hpp"
|
||||
|
||||
|
||||
GameData g_gameData = GameData();
|
||||
|
||||
|
||||
|
||||
// Address: 0x00039B50
|
||||
// Status: unimplemented
|
||||
BOOL GameData::checkFlagCondition(unsigned cond) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x00039BE0
|
||||
// Status: unimplemented
|
||||
void GameData::writeStateFlag(unsigned flagVal) {
|
||||
}
|
||||
|
||||
// Address: 0x00039C70
|
||||
// Status: unimplemented
|
||||
void GameData::incrementChapter() {
|
||||
}
|
||||
|
||||
// Address: 0x00039C80
|
||||
// Status: unimplemented
|
||||
void GameData::setMissionDigits34(unsigned val) {
|
||||
}
|
||||
|
||||
// Address: 0x00039C90
|
||||
// Status: unimplemented
|
||||
void GameData::setSpawnPosIndex(unsigned val) {
|
||||
}
|
||||
|
||||
// Address: 0x00039CA0
|
||||
// Status: unimplemented
|
||||
unsigned GameData::getSpawnPosIndex() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x00039CB0
|
||||
// Status: unimplemented
|
||||
void GameData::unlockCharacter(PlayerCharId charId) {
|
||||
}
|
||||
|
||||
// Address: 0x00039CF0
|
||||
// Status: unimplemented
|
||||
void GameData::lockCharacter(PlayerCharId charId) {
|
||||
}
|
||||
|
||||
// Address: 0x00039D10
|
||||
// Status: unimplemented
|
||||
BOOL GameData::characterUnlocked(PlayerCharId charId) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x00039D40
|
||||
// Status: unimplemented
|
||||
BOOL GameData::checkFlagConditions(unsigned * conds, unsigned count) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x00039D80
|
||||
// Status: unimplemented
|
||||
void GameData::writeStateFlags(unsigned * writes, unsigned count) {
|
||||
}
|
||||
|
||||
// Address: 0x00039DB0
|
||||
// Status: unimplemented
|
||||
BOOL GameData::checkFlagConditionUnpacked(FlagList flagList, unsigned index) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x00039DE0
|
||||
// Status: unimplemented
|
||||
void GameData::writeStateFlagUnpacked(FlagList flagList, unsigned index, unsigned val) {
|
||||
}
|
||||
|
||||
// Address: 0x00039E10
|
||||
// Status: unimplemented
|
||||
void GameData::setSoulSpawned(unsigned soulId) {
|
||||
}
|
||||
|
||||
// Address: 0x00039E40
|
||||
// Status: unimplemented
|
||||
BOOL GameData::getSoulSpawned(unsigned soulId) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x00039E80
|
||||
// Status: unimplemented
|
||||
void GameData::setSoulCollected(unsigned soulId) {
|
||||
}
|
||||
|
||||
// Address: 0x00039EB0
|
||||
// Status: unimplemented
|
||||
BOOL GameData::getSoulHeld(unsigned soulId) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x00039EF0
|
||||
// Status: unimplemented
|
||||
BOOL GameData::soulSpawnedUncollected(unsigned soulId) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x00039F40
|
||||
// Status: unimplemented
|
||||
void GameData::clearHeldSouls() {
|
||||
}
|
||||
|
||||
// Address: 0x00039F60
|
||||
// Status: unimplemented
|
||||
void GameData::restoreHeldSouls() {
|
||||
}
|
||||
|
||||
// Address: 0x00039FD0
|
||||
// Status: unimplemented
|
||||
unsigned GameData::getSoulCount() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x0003A0A0
|
||||
// Status: unimplemented
|
||||
unsigned GameData::getTotalSoulsInStage(unsigned stageId) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x0003A130
|
||||
// Status: unimplemented
|
||||
unsigned GameData::getHeldSoulsInStage(unsigned stageId) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x0003A2B0
|
||||
// Status: unimplemented
|
||||
BOOL GameData::getSoulCollectedBySize(TagSize size, unsigned index) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x0003A2F0
|
||||
// Status: unimplemented
|
||||
void GameData::setUnusedPerStageBitmask(unsigned stageId, unsigned index) {
|
||||
}
|
||||
|
||||
// Address: 0x0003A340
|
||||
// Status: unimplemented
|
||||
int GameData::getTagState(unsigned stageId, unsigned tagIndex, BOOL rivalTag) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x0003A3A0
|
||||
// Status: unimplemented
|
||||
void GameData::setTagState(unsigned stageId, unsigned tagIndex, BOOL rivalTag, unsigned val) {
|
||||
}
|
||||
|
||||
// Address: 0x0003A400
|
||||
// Status: unimplemented
|
||||
void GameData::setTagCovered(unsigned stageId, unsigned tagIndex, BOOL rivalTag, unsigned gangOrPlayer) {
|
||||
}
|
||||
|
||||
// Address: 0x0003A4A0
|
||||
// Status: unimplemented
|
||||
void GameData::setVolumeSettings(float volMusic, float volSfx) {
|
||||
}
|
||||
|
||||
// Address: 0x0003A4C0
|
||||
// Status: unimplemented
|
||||
void GameData::getVolumeSettings(float * outMusic, float * outSfx) {
|
||||
}
|
||||
|
||||
// Address: 0x0003A4E0
|
||||
// Status: unimplemented
|
||||
void GameData::setRumbleEnabled(BOOL val) {
|
||||
}
|
||||
|
||||
// Address: 0x0003A4F0
|
||||
// Status: unimplemented
|
||||
BOOL GameData::getRumbleEnabled() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x0003A500
|
||||
// Status: unimplemented
|
||||
void GameData::setGarageMusic(unsigned songId) {
|
||||
}
|
||||
|
||||
// Address: 0x0003A510
|
||||
// Status: unimplemented
|
||||
unsigned GameData::getGarageMusic() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x0003A520
|
||||
// Status: unimplemented
|
||||
void GameData::setUnusedBitfield(unsigned index) {
|
||||
}
|
||||
|
||||
// Address: 0x0003A550
|
||||
// Status: unimplemented
|
||||
void GameData::setMiscObjective(unsigned index) {
|
||||
}
|
||||
|
||||
// Address: 0x0003A580
|
||||
// Status: unimplemented
|
||||
BOOL GameData::getMiscObjective(unsigned index) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x0003A5C0
|
||||
// Status: unimplemented
|
||||
unsigned GameData::countMiscObjectives() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x0003A690
|
||||
// Status: unimplemented
|
||||
BOOL GameData::getHighScore(unsigned stageId, TestRunType type, unsigned rank, TestRunScore * out) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x0003A750
|
||||
// Status: unimplemented
|
||||
void GameData::incrementTimer(Timer timer) {
|
||||
}
|
||||
|
||||
// Address: 0x0003A780
|
||||
// Status: unimplemented
|
||||
unsigned GameData::getTimer(Timer timer) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x0003A7B0
|
||||
// Status: unimplemented
|
||||
void GameData::setTimer(Timer timer, unsigned frames) {
|
||||
}
|
||||
|
||||
// Address: 0x0003A7F0
|
||||
// Status: unimplemented
|
||||
void GameData::setSelectedTag(unsigned gangOrPlayer, TagSize size, unsigned tagId, BOOL multiplayer) {
|
||||
}
|
||||
|
||||
// Address: 0x0003A820
|
||||
// Status: unimplemented
|
||||
unsigned GameData::getSelectedTag(unsigned gangOrPlayer, TagSize size, BOOL multiplayer) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x0003A840
|
||||
// Status: unimplemented
|
||||
void GameData::setCustomTagSelected(unsigned gangOrPlayer, TagSize size, BOOL active, BOOL multiplayer) {
|
||||
}
|
||||
|
||||
// Address: 0x0003A870
|
||||
// Status: unimplemented
|
||||
BOOL GameData::getCustomTagSelected(unsigned gangOrPlayer, TagSize size, BOOL multiplayer) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x0003A890
|
||||
// Status: unimplemented
|
||||
void GameData::setEventSeen(unsigned eventId) {
|
||||
}
|
||||
|
||||
// Address: 0x0003A8C0
|
||||
// Status: unimplemented
|
||||
BOOL GameData::eventSeen(unsigned eventId) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x0003A900
|
||||
// Status: unimplemented
|
||||
void GameData::incrementPlaytime() {
|
||||
}
|
||||
|
||||
// Address: 0x0003A910
|
||||
// Status: matching
|
||||
unsigned GameData::getSaveDataSize() {
|
||||
// 0x50 byte key + 0x3508 actual save data + 0x8 extra (why extra?)
|
||||
return 0x50 + sizeof this->saveActive + 0x8;
|
||||
}
|
||||
|
||||
// Address: 0x0003A920
|
||||
// Status: unimplemented
|
||||
BOOL GameData::decrypt(char * saveData) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x0003AB60
|
||||
// Status: unimplemented
|
||||
void GameData::encrypt(char * outSaveData) {
|
||||
}
|
||||
|
||||
// Address: 0x0003AE00
|
||||
// Status: unimplemented
|
||||
void GameData::getSaveDescription(SaveDescription * outDesc) {
|
||||
}
|
||||
|
||||
// Address: 0x0003AE20
|
||||
// Status: unimplemented
|
||||
void GameData::clearStateFlags(FlagListOrPtr flagList) {
|
||||
}
|
||||
|
||||
// Address: 0x0003AEA0
|
||||
// Status: unimplemented
|
||||
void GameData::resetTimer(Timer timer) {
|
||||
}
|
||||
|
||||
// Address: 0x0003AED0
|
||||
// Status: unimplemented
|
||||
GameData::GameData() {
|
||||
}
|
||||
|
||||
// Address: 0x0003B3C0
|
||||
// Status: unimplemented
|
||||
void GameData::resetSelectedTags() {
|
||||
}
|
||||
|
||||
// Address: 0x0003B420
|
||||
// Status: unimplemented
|
||||
void GameData::resetExceptSettingsAndSouls() {
|
||||
}
|
||||
|
||||
// Address: 0x0003B5A0
|
||||
// Status: unimplemented
|
||||
void GameData::resetExceptSettingsAndHighScores() {
|
||||
}
|
||||
|
||||
// Address: 0x0003B640
|
||||
// Status: unimplemented
|
||||
void GameData::resetExceptSettings() {
|
||||
}
|
||||
|
||||
// Address: 0x0003B680
|
||||
// Status: unimplemented
|
||||
void GameData::stash() {
|
||||
}
|
||||
|
||||
// Address: 0x0003B6A0
|
||||
// Status: unimplemented
|
||||
void GameData::stashRestoreExceptSpecialFlags() {
|
||||
}
|
||||
|
||||
// Address: 0x0003B6F0
|
||||
// Status: unimplemented
|
||||
void GameData::stashRestoreExceptHighScores() {
|
||||
}
|
||||
|
||||
// Address: 0x0003B790
|
||||
// Status: unimplemented
|
||||
void GameData::stashRestore() {
|
||||
}
|
||||
|
||||
// Optimized out
|
||||
GameData::~GameData() {}
|
||||
|
||||
// Address: 0x0003B7E0
|
||||
// Status: unimplemented
|
||||
void GameData::addHighScore(unsigned stageId, TestRunType type, TestRunScore * score) {
|
||||
}
|
||||
|
|
@ -1,237 +0,0 @@
|
|||
/* JSRF Decompilation: JSRF/GameData.hpp
|
||||
Save data and closely-related runtime data.
|
||||
*/
|
||||
|
||||
#ifndef GAMEDATA_HPP
|
||||
#define GAMEDATA_HPP
|
||||
|
||||
#include "../XDK/Win32.h"
|
||||
|
||||
|
||||
// Enum that should probably go somewhere else
|
||||
enum PlayerCharId {
|
||||
PCHARID_BEAT,
|
||||
PCHARID_CORN,
|
||||
PCHARID_GUM,
|
||||
PCHARID_COMBO,
|
||||
PCHARID_RHYTH,
|
||||
PCHARID_SODA,
|
||||
PCHARID_YOYO,
|
||||
PCHARID_NT3000,
|
||||
PCHARID_GARAM,
|
||||
PCHARID_BOOGIE,
|
||||
PCHARID_CUBE,
|
||||
PCHARID_LOVESHOCKERS,
|
||||
PCHARID_POISONJAM,
|
||||
PCHARID_NOISETANK,
|
||||
PCHARID_IMMORTALS,
|
||||
PCHARID_DOOMRIDERS,
|
||||
PCHARID_RAPID99,
|
||||
PCHARID_POTTS,
|
||||
PCHARID_GOUJI,
|
||||
PCHARID_ROBOY,
|
||||
PCHARID_CLUTCH,
|
||||
PCHARID_JAZZ,
|
||||
PCHARID_AKUMU,
|
||||
PCHARID_ZEROBEAT
|
||||
};
|
||||
|
||||
// Data structure actually saved to disk
|
||||
struct SaveData {
|
||||
unsigned chapter;
|
||||
unsigned missionDigits34;
|
||||
unsigned spawnPosIndex;
|
||||
unsigned playtimeFrames;
|
||||
unsigned unlockedChars;
|
||||
|
||||
// Boolean flags read and written by missions
|
||||
unsigned chapterFlags[16]; // Reset every chapter
|
||||
unsigned globalFlags [16]; // Never reset
|
||||
unsigned specialFlags[16]; // Never reset; special effects like
|
||||
// unlocking/completing tutorials, finishing
|
||||
// street challenges
|
||||
|
||||
unsigned spawnedSouls [8]; // Souls that have appeared on streets
|
||||
unsigned collectedSouls[8]; // Souls that have been acquired
|
||||
unsigned heldSouls [8]; // Souls currently usable (i.e. not stolen)
|
||||
|
||||
unsigned unusedPerStageBitmask[16];
|
||||
|
||||
// Which tags have been sprayed and by who
|
||||
// Indexed by stage, tag ID, and player/rival tag; rival tags don't
|
||||
// count towards completion and can be painted over. Each entry is a
|
||||
// packed bit array of 3 bits per "G" mark, valued 7 if nothing is
|
||||
// painted or 0-3 to indicate player 1-4 painted it (in story mode,
|
||||
// rival graffiti is considered painted by players 2-4).
|
||||
unsigned tagState[16][80][2];
|
||||
|
||||
struct SaveSettings {
|
||||
float volumeMusic;
|
||||
float volumeSfx;
|
||||
BOOL rumbleEnabled;
|
||||
unsigned unused[29];
|
||||
} saveSettings;
|
||||
|
||||
unsigned garageMusic;
|
||||
unsigned unusedBitfield[8];
|
||||
|
||||
// Sewer switches at offset 0 then noise tanks at offset 3
|
||||
unsigned miscObjectives[32];
|
||||
|
||||
struct TestRunScoreSaved {
|
||||
unsigned score;
|
||||
unsigned char character;
|
||||
unsigned char rank1; // Used by Jet Tech
|
||||
unsigned char rank2; // Used by other test runs
|
||||
} highScores[16][4][5];
|
||||
|
||||
unsigned clutchTimer;
|
||||
unsigned unusedTimer;
|
||||
|
||||
unsigned selectedTags [5]; // Like GameData but for P1 in 1-player
|
||||
unsigned customTagSelected[5]; // Like GameData but for P1 in 1-player
|
||||
|
||||
unsigned eventsSeen[16];
|
||||
};
|
||||
|
||||
// Numeric IDs for selecting different listss of state flags
|
||||
enum FlagList {
|
||||
FLAGLIST_MISSION,
|
||||
FLAGLIST_CHAPTER,
|
||||
FLAGLIST_GLOBAL,
|
||||
FLAGLIST_SPECIAL
|
||||
};
|
||||
|
||||
// Numeric IDs for tag sizes (should maybe put somewhere else?)
|
||||
enum TagSize {
|
||||
TAGSIZE_SS,
|
||||
TAGSIZE_S,
|
||||
TAGSIZE_M,
|
||||
TAGSIZE_L,
|
||||
TAGSIZE_XL
|
||||
};
|
||||
|
||||
// Numeric IDs for different test run categories
|
||||
enum TestRunType {
|
||||
TESTRUN_GRAFFITI,
|
||||
TESTRUN_TECH,
|
||||
TESTRUN_DASH,
|
||||
TESTRUN_FLAG
|
||||
};
|
||||
|
||||
// Unpacked version of TestRunScoreSaved
|
||||
struct TestRunScore {
|
||||
unsigned score;
|
||||
PlayerCharId character;
|
||||
unsigned rank1; // Used by Jet Tech
|
||||
unsigned rank2; // Used by other test runs
|
||||
};
|
||||
|
||||
// Numeric IDs for different timers
|
||||
enum Timer {
|
||||
TIMER_DEATHBALLPRACTICE,
|
||||
TIMER_CLUTCH,
|
||||
TIMER_UNUSED
|
||||
};
|
||||
|
||||
// Info showed in save/load menu
|
||||
struct SaveDescription {
|
||||
unsigned chapter, playtimeSeconds;
|
||||
};
|
||||
|
||||
union FlagListOrPtr {
|
||||
FlagList list;
|
||||
unsigned * ptr;
|
||||
};
|
||||
|
||||
// Save data-ish data structure used at runtime
|
||||
struct GameData {
|
||||
SaveData saveActive;
|
||||
SaveData saveStashed; // Holds save data during test runs/tutorials
|
||||
|
||||
unsigned missionFlags[16]; // Reset every mission transition
|
||||
unsigned deathBallPracticeTimer; // For Jazz sequence in Future Site
|
||||
|
||||
// Indexed like SaveData.highScores; true if score is most recent and
|
||||
// also made leaderboard
|
||||
BOOL mostRecentHighScore[16][4][5];
|
||||
|
||||
// Tags indexed by single or multiplayer, then gang (GGs, Golden
|
||||
// Rhinos/Zero Beat, Poison Jam, Immortals) or player, then size
|
||||
unsigned selectedTags [2][4][5]; // IDs of tags in use
|
||||
BOOL customTagSelected[2][4][5]; // True means tag ID is for custom
|
||||
// graffiti list, not ingame list
|
||||
|
||||
BOOL checkFlagCondition (unsigned cond);
|
||||
void writeStateFlag (unsigned flagVal);
|
||||
void incrementChapter ();
|
||||
void setMissionDigits34 (unsigned val);
|
||||
void setSpawnPosIndex (unsigned val);
|
||||
unsigned getSpawnPosIndex ();
|
||||
void unlockCharacter (PlayerCharId charId);
|
||||
void lockCharacter (PlayerCharId charId);
|
||||
BOOL characterUnlocked (PlayerCharId charId);
|
||||
BOOL checkFlagConditions (unsigned * conds , unsigned count);
|
||||
void writeStateFlags (unsigned * writes, unsigned count);
|
||||
BOOL checkFlagConditionUnpacked(FlagList flagList, unsigned index);
|
||||
void writeStateFlagUnpacked (FlagList flagList, unsigned index, unsigned val);
|
||||
void setSoulSpawned (unsigned soulId);
|
||||
BOOL getSoulSpawned (unsigned soulId);
|
||||
void setSoulCollected (unsigned soulId);
|
||||
BOOL getSoulHeld (unsigned soulId);
|
||||
BOOL soulSpawnedUncollected(unsigned soulId);
|
||||
void clearHeldSouls ();
|
||||
void restoreHeldSouls ();
|
||||
unsigned getSoulCount ();
|
||||
unsigned getTotalSoulsInStage(unsigned stageId);
|
||||
unsigned getHeldSoulsInStage (unsigned stageId);
|
||||
BOOL getSoulCollectedBySize(TagSize size, unsigned index);
|
||||
void setUnusedPerStageBitmask(unsigned stageId, unsigned index);
|
||||
int getTagState (unsigned stageId, unsigned index, BOOL rivalTag);
|
||||
void setTagState (unsigned stageId, unsigned index, BOOL rivalTag, unsigned val);
|
||||
void setTagCovered (unsigned stageId, unsigned index, BOOL rivalTag, unsigned gangOrPlayer);
|
||||
void setVolumeSettings (float volMusic, float volSfx);
|
||||
void getVolumeSettings (float * outMusic, float * outSfx);
|
||||
void setRumbleEnabled (BOOL val);
|
||||
BOOL getRumbleEnabled ();
|
||||
void setGarageMusic (unsigned songId);
|
||||
unsigned getGarageMusic ();
|
||||
void setUnusedBitfield (unsigned index);
|
||||
void setMiscObjective (unsigned index);
|
||||
BOOL getMiscObjective (unsigned index);
|
||||
unsigned countMiscObjectives ();
|
||||
BOOL getHighScore (unsigned stageId, TestRunType type, unsigned rank, TestRunScore * out);
|
||||
void incrementTimer (Timer timer);
|
||||
unsigned getTimer (Timer timer);
|
||||
void setTimer (Timer timer, unsigned frames);
|
||||
void setSelectedTag (unsigned gangOrPlayer, TagSize size, unsigned tagId, BOOL multiplayer);
|
||||
unsigned getSelectedTag (unsigned gangOrPlayer, TagSize size, BOOL multiplayer);
|
||||
void setCustomTagSelected(unsigned gangOrPlayer, TagSize size, BOOL active, BOOL multiplayer);
|
||||
BOOL getCustomTagSelected(unsigned gangOrPlayer, TagSize size, BOOL multiplayer);
|
||||
void setEventSeen (unsigned eventId);
|
||||
BOOL eventSeen (unsigned eventId);
|
||||
void incrementPlaytime ();
|
||||
unsigned getSaveDataSize ();
|
||||
BOOL decrypt (char * saveData);
|
||||
void encrypt (char * outSaveData);
|
||||
void getSaveDescription (SaveDescription * outDesc);
|
||||
void clearStateFlags (FlagListOrPtr flags);
|
||||
void resetTimer (Timer timer);
|
||||
GameData();
|
||||
void resetSelectedTags ();
|
||||
|
||||
void resetExceptSettingsAndSouls ();
|
||||
void resetExceptSettingsAndHighScores();
|
||||
void resetExceptSettings ();
|
||||
|
||||
void stash ();
|
||||
void stashRestoreExceptSpecialFlags();
|
||||
void stashRestoreExceptHighScores ();
|
||||
void stashRestore ();
|
||||
|
||||
virtual ~GameData();
|
||||
void addHighScore(unsigned stageId, TestRunType type, TestRunScore * score);
|
||||
};
|
||||
extern GameData g_gameData;
|
||||
|
||||
#endif
|
||||
|
|
@ -5,18 +5,18 @@ Main function.
|
|||
#pragma bss_seg(".data")
|
||||
|
||||
#include "../XDK/CRT/stddef.h"
|
||||
#include "Core.hpp"
|
||||
#include "Action.hpp"
|
||||
|
||||
|
||||
// Address: 0x0022FCE0
|
||||
Game * g_game;
|
||||
CActMan * g_lpActMan;
|
||||
|
||||
|
||||
// Address: 0x0006F9E0
|
||||
// Status: matching
|
||||
void main(void) {
|
||||
g_game = new Game(NULL, 0);
|
||||
g_game->initRootExecObj();
|
||||
g_game->mainLoop();
|
||||
delete g_game;
|
||||
g_lpActMan = new CActMan(NULL, 0);
|
||||
g_lpActMan->Init();
|
||||
g_lpActMan->Idle();
|
||||
delete g_lpActMan;
|
||||
}
|
||||
|
|
|
|||
366
decompile/src/JSRF/SaveData.cpp
Normal file
366
decompile/src/JSRF/SaveData.cpp
Normal file
|
|
@ -0,0 +1,366 @@
|
|||
/* JSRF Decompilation: JSRF/SaveData.cpp
|
||||
Save data and closely-related runtime data.
|
||||
*/
|
||||
|
||||
#pragma bss_seg(".data")
|
||||
|
||||
#include "../XDK/Win32.h"
|
||||
#include "SaveData.hpp"
|
||||
|
||||
|
||||
CSaveData g_SaveData = CSaveData();
|
||||
|
||||
|
||||
|
||||
// Address: 0x00039B50
|
||||
// Status: unimplemented
|
||||
BOOL CSaveData::CheckFlagCondition(DWORD dwCond) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x00039BE0
|
||||
// Status: unimplemented
|
||||
void CSaveData::WriteStateFlag(DWORD dwFlagVal) {
|
||||
}
|
||||
|
||||
// Address: 0x00039C70
|
||||
// Status: unimplemented
|
||||
void CSaveData::IncreaseChapter() {
|
||||
}
|
||||
|
||||
// Address: 0x00039C80
|
||||
// Status: unimplemented
|
||||
void CSaveData::SetReturnMissionNo(DWORD dwVal) {
|
||||
}
|
||||
|
||||
// Address: 0x00039C90
|
||||
// Status: unimplemented
|
||||
void CSaveData::SetSpawnPosIndex(DWORD dwVal) {
|
||||
}
|
||||
|
||||
// Address: 0x00039CA0
|
||||
// Status: unimplemented
|
||||
DWORD CSaveData::GetSpawnPosIndex() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x00039CB0
|
||||
// Status: unimplemented
|
||||
void CSaveData::UnlockCharacter(ePLAYERCHARID CharId) {
|
||||
}
|
||||
|
||||
// Address: 0x00039CF0
|
||||
// Status: unimplemented
|
||||
void CSaveData::LockCharacter(ePLAYERCHARID CharId) {
|
||||
}
|
||||
|
||||
// Address: 0x00039D10
|
||||
// Status: unimplemented
|
||||
BOOL CSaveData::IsCharacterUnlocked(ePLAYERCHARID CharId) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x00039D40
|
||||
// Status: unimplemented
|
||||
BOOL CSaveData::CheckFlagConditions(DWORD * lpdwConds, DWORD dwCount) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x00039D80
|
||||
// Status: unimplemented
|
||||
void CSaveData::WriteStateFlags(DWORD * lpdwWrites, DWORD dwCount) {
|
||||
}
|
||||
|
||||
// Address: 0x00039DB0
|
||||
// Status: unimplemented
|
||||
BOOL CSaveData::CheckFlagConditionUnpacked(eFLAGLIST FlagList, DWORD dwIndex) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x00039DE0
|
||||
// Status: unimplemented
|
||||
void CSaveData::WriteStateFlagUnpacked(eFLAGLIST FlagList, DWORD dwIndex, DWORD dwVal) {
|
||||
}
|
||||
|
||||
// Address: 0x00039E10
|
||||
// Status: unimplemented
|
||||
void CSaveData::SetSoulSpawned(DWORD dwSoulId) {
|
||||
}
|
||||
|
||||
// Address: 0x00039E40
|
||||
// Status: unimplemented
|
||||
BOOL CSaveData::GetSoulSpawned(DWORD dwSoulId) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x00039E80
|
||||
// Status: unimplemented
|
||||
void CSaveData::SetSoulCollected(DWORD dwSoulId) {
|
||||
}
|
||||
|
||||
// Address: 0x00039EB0
|
||||
// Status: unimplemented
|
||||
BOOL CSaveData::GetSoulHeld(DWORD dwSoulId) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x00039EF0
|
||||
// Status: unimplemented
|
||||
BOOL CSaveData::IsSoulSpawnedUncollected(DWORD dwSoulId) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x00039F40
|
||||
// Status: unimplemented
|
||||
void CSaveData::ClearHeldSouls() {
|
||||
}
|
||||
|
||||
// Address: 0x00039F60
|
||||
// Status: unimplemented
|
||||
void CSaveData::RestoreHeldSouls() {
|
||||
}
|
||||
|
||||
// Address: 0x00039FD0
|
||||
// Status: unimplemented
|
||||
DWORD CSaveData::GetSoulCount() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x0003A0A0
|
||||
// Status: unimplemented
|
||||
DWORD CSaveData::GetTotalSoulsInStage(DWORD dwStageId) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x0003A130
|
||||
// Status: unimplemented
|
||||
DWORD CSaveData::GetHeldSoulsInStage(DWORD dwStageId) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x0003A2B0
|
||||
// Status: unimplemented
|
||||
BOOL CSaveData::GetSoulCollectedBySize(eTAGSIZE Size, DWORD dwIndex) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x0003A2F0
|
||||
// Status: unimplemented
|
||||
void CSaveData::SetUnusedPerStageBitmask(DWORD dwStageId, DWORD dwIndex) {
|
||||
}
|
||||
|
||||
// Address: 0x0003A340
|
||||
// Status: unimplemented
|
||||
int CSaveData::GetTagState(DWORD dwStageId, DWORD dwTagIndex, BOOL bRivalTag) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x0003A3A0
|
||||
// Status: unimplemented
|
||||
void CSaveData::SetTagState(DWORD dwStageId, DWORD dwTagIndex, BOOL bRivalTag, DWORD dwVal) {
|
||||
}
|
||||
|
||||
// Address: 0x0003A400
|
||||
// Status: unimplemented
|
||||
void CSaveData::SetTagCovered(DWORD dwStageId, DWORD dwTagIndex, BOOL bRivalTag, DWORD dwGangOrPlayer) {
|
||||
}
|
||||
|
||||
// Address: 0x0003A4A0
|
||||
// Status: unimplemented
|
||||
void CSaveData::SetVolumeSettings(float fVolMusic, float fVolSfx) {
|
||||
}
|
||||
|
||||
// Address: 0x0003A4C0
|
||||
// Status: unimplemented
|
||||
void CSaveData::GetVolumeSettings(float * lpfOutMusic, float * lpfOutSfx) {
|
||||
}
|
||||
|
||||
// Address: 0x0003A4E0
|
||||
// Status: unimplemented
|
||||
void CSaveData::SetRumbleEnabled(BOOL bVal) {
|
||||
}
|
||||
|
||||
// Address: 0x0003A4F0
|
||||
// Status: unimplemented
|
||||
BOOL CSaveData::GetRumbleEnabled() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x0003A500
|
||||
// Status: unimplemented
|
||||
void CSaveData::SetGarageMusic(DWORD dwSongId) {
|
||||
}
|
||||
|
||||
// Address: 0x0003A510
|
||||
// Status: unimplemented
|
||||
DWORD CSaveData::GetGarageMusic() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x0003A520
|
||||
// Status: unimplemented
|
||||
void CSaveData::SetUnusedBitfield(DWORD dwIndex) {
|
||||
}
|
||||
|
||||
// Address: 0x0003A550
|
||||
// Status: unimplemented
|
||||
void CSaveData::SetMiscObjective(DWORD dwIndex) {
|
||||
}
|
||||
|
||||
// Address: 0x0003A580
|
||||
// Status: unimplemented
|
||||
BOOL CSaveData::GetMiscObjective(DWORD dwIndex) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x0003A5C0
|
||||
// Status: unimplemented
|
||||
DWORD CSaveData::CountMiscObjectives() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x0003A690
|
||||
// Status: unimplemented
|
||||
BOOL CSaveData::GetHighScore(DWORD dwStageId, eTESTRUN Type, DWORD dwRank, STestRunScore * lpOut) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x0003A750
|
||||
// Status: unimplemented
|
||||
void CSaveData::IncreaseTimer(eTIMER Timer) {
|
||||
}
|
||||
|
||||
// Address: 0x0003A780
|
||||
// Status: unimplemented
|
||||
DWORD CSaveData::GetTimer(eTIMER Timer) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x0003A7B0
|
||||
// Status: unimplemented
|
||||
void CSaveData::SetTimer(eTIMER Timer, DWORD dwFrames) {
|
||||
}
|
||||
|
||||
// Address: 0x0003A7F0
|
||||
// Status: unimplemented
|
||||
void CSaveData::SetSelectedTag(DWORD dwGangOrPlayer, eTAGSIZE Size, DWORD dwTagId, BOOL bMultiplayer) {
|
||||
}
|
||||
|
||||
// Address: 0x0003A820
|
||||
// Status: unimplemented
|
||||
DWORD CSaveData::GetSelectedTag(DWORD dwGangOrPlayer, eTAGSIZE Size, BOOL bMultiplayer) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x0003A840
|
||||
// Status: unimplemented
|
||||
void CSaveData::SetCustomTagSelected(DWORD dwGangOrPlayer, eTAGSIZE Size, BOOL active, BOOL bMultiplayer) {
|
||||
}
|
||||
|
||||
// Address: 0x0003A870
|
||||
// Status: unimplemented
|
||||
BOOL CSaveData::GetCustomTagSelected(DWORD dwGangOrPlayer, eTAGSIZE Size, BOOL bMultiplayer) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x0003A890
|
||||
// Status: unimplemented
|
||||
void CSaveData::SetEventSeen(DWORD dwEventId) {
|
||||
}
|
||||
|
||||
// Address: 0x0003A8C0
|
||||
// Status: unimplemented
|
||||
BOOL CSaveData::GetEventSeen(DWORD dwEventId) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x0003A900
|
||||
// Status: unimplemented
|
||||
void CSaveData::IncreasePlaytime() {
|
||||
}
|
||||
|
||||
// Address: 0x0003A910
|
||||
// Status: matching
|
||||
DWORD CSaveData::GetSaveDataSize() {
|
||||
// 0x50 byte key + 0x3508 actual save data + 0x8 extra (why extra?)
|
||||
return 0x50 + sizeof this->m_SaveData + 0x8;
|
||||
}
|
||||
|
||||
// Address: 0x0003A920
|
||||
// Status: unimplemented
|
||||
BOOL CSaveData::Decode(void * lpvSaveData) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Address: 0x0003AB60
|
||||
// Status: unimplemented
|
||||
void CSaveData::Encode(void * lpvOutSaveData) {
|
||||
}
|
||||
|
||||
// Address: 0x0003AE00
|
||||
// Status: unimplemented
|
||||
void CSaveData::GetSaveDescription(SSaveDescription * lpOutDesc) {
|
||||
}
|
||||
|
||||
// Address: 0x0003AE20
|
||||
// Status: unimplemented
|
||||
void CSaveData::ClearStateFlags(UFlagListOrPtr FlagList) {
|
||||
}
|
||||
|
||||
// Address: 0x0003AEA0
|
||||
// Status: unimplemented
|
||||
void CSaveData::ResetTimer(eTIMER Timer) {
|
||||
}
|
||||
|
||||
// Address: 0x0003AED0
|
||||
// Status: unimplemented
|
||||
CSaveData::CSaveData() {
|
||||
}
|
||||
|
||||
// Address: 0x0003B3C0
|
||||
// Status: unimplemented
|
||||
void CSaveData::ResetSelectedTags() {
|
||||
}
|
||||
|
||||
// Address: 0x0003B420
|
||||
// Status: unimplemented
|
||||
void CSaveData::SaveDataResetTutorial() {
|
||||
}
|
||||
|
||||
// Address: 0x0003B5A0
|
||||
// Status: unimplemented
|
||||
void CSaveData::SaveDataResetTestRun() {
|
||||
}
|
||||
|
||||
// Address: 0x0003B640
|
||||
// Status: unimplemented
|
||||
void CSaveData::SaveDataResetVs() {
|
||||
}
|
||||
|
||||
// Address: 0x0003B680
|
||||
// Status: unimplemented
|
||||
void CSaveData::SaveDataBackup() {
|
||||
}
|
||||
|
||||
// Address: 0x0003B6A0
|
||||
// Status: unimplemented
|
||||
void CSaveData::SaveDataRestoreTutorial() {
|
||||
}
|
||||
|
||||
// Address: 0x0003B6F0
|
||||
// Status: unimplemented
|
||||
void CSaveData::SaveDataRestoreTestRun() {
|
||||
}
|
||||
|
||||
// Address: 0x0003B790
|
||||
// Status: unimplemented
|
||||
void CSaveData::SaveDataRestoreVs() {
|
||||
}
|
||||
|
||||
// Optimized out
|
||||
CSaveData::~CSaveData() {}
|
||||
|
||||
// Address: 0x0003B7E0
|
||||
// Status: unimplemented
|
||||
void CSaveData::AddHighScore(DWORD dwStageId, eTESTRUN Type, STestRunScore * lpScore) {
|
||||
}
|
||||
237
decompile/src/JSRF/SaveData.hpp
Normal file
237
decompile/src/JSRF/SaveData.hpp
Normal file
|
|
@ -0,0 +1,237 @@
|
|||
/* JSRF Decompilation: JSRF/SaveData.hpp
|
||||
Save data and closely-related runtime data.
|
||||
*/
|
||||
|
||||
#ifndef SAVEDATA_HPP
|
||||
#define SAVEDATA_HPP
|
||||
|
||||
#include "../XDK/Win32.h"
|
||||
|
||||
|
||||
// Enum that should probably go somewhere else
|
||||
enum ePLAYERCHARID {
|
||||
ePLAYERCHARID_BEAT,
|
||||
ePLAYERCHARID_CORN,
|
||||
ePLAYERCHARID_GUM,
|
||||
ePLAYERCHARID_COMBO,
|
||||
ePLAYERCHARID_RHYTH,
|
||||
ePLAYERCHARID_SODA,
|
||||
ePLAYERCHARID_YOYO,
|
||||
ePLAYERCHARID_NT3000,
|
||||
ePLAYERCHARID_GARAM,
|
||||
ePLAYERCHARID_BOOGIE,
|
||||
ePLAYERCHARID_CUBE,
|
||||
ePLAYERCHARID_LOVESHOCKERS,
|
||||
ePLAYERCHARID_POISONJAM,
|
||||
ePLAYERCHARID_NOISETANK,
|
||||
ePLAYERCHARID_IMMORTALS,
|
||||
ePLAYERCHARID_DOOMRIDERS,
|
||||
ePLAYERCHARID_RAPID99,
|
||||
ePLAYERCHARID_POTTS,
|
||||
ePLAYERCHARID_GOUJI,
|
||||
ePLAYERCHARID_ROBOY,
|
||||
ePLAYERCHARID_CLUTCH,
|
||||
ePLAYERCHARID_JAZZ,
|
||||
ePLAYERCHARID_AKUMU,
|
||||
ePLAYERCHARID_ZEROBEAT
|
||||
};
|
||||
|
||||
// Data structure actually saved to disk
|
||||
struct sdData {
|
||||
DWORD m_dwReturnChapterNo;
|
||||
DWORD m_dwReturnMissionNo;
|
||||
DWORD m_dwSpawnPosIndex;
|
||||
DWORD m_dwPlaytimeFrames;
|
||||
DWORD m_dwUnlockedChars;
|
||||
|
||||
// Boolean flags read and written by missions
|
||||
DWORD m_dwChapterFlags[16]; // Reset every chapter
|
||||
DWORD m_dwGlobalFlags [16]; // Never reset
|
||||
DWORD m_dwSpecialFlags[16]; // Never reset; special effects like
|
||||
// unlocking/completing tutorials, finishing
|
||||
// street challenges
|
||||
|
||||
DWORD m_dwSpawnedSouls [8]; // Souls that have appeared on streets
|
||||
DWORD m_dwCollectedSouls[8]; // Souls that have been acquired
|
||||
DWORD m_dwHeldSouls [8]; // Souls currently usable (i.e. not stolen)
|
||||
|
||||
DWORD m_dwUnusedPerStageBitmask[16];
|
||||
|
||||
// Which tags have been sprayed and by who
|
||||
// Indexed by stage, tag ID, and player/rival tag; rival tags don't
|
||||
// count towards completion and can be painted over. Each entry is a
|
||||
// packed bit array of 3 bits per "G" mark, valued 7 if nothing is
|
||||
// painted or 0-3 to indicate player 1-4 painted it (in story mode,
|
||||
// rival graffiti is considered painted by players 2-4).
|
||||
DWORD m_dwTagState[16][80][2];
|
||||
|
||||
struct sdSettings {
|
||||
float m_fVolumeMusic;
|
||||
float m_fVolumeSfx;
|
||||
BOOL m_bRumbleEnabled;
|
||||
unsigned m_dwUnused[29];
|
||||
} m_Settings;
|
||||
|
||||
DWORD m_dwGarageMusic;
|
||||
DWORD m_dwUnusedBitfield[8];
|
||||
|
||||
// Sewer switches at offset 0 then noise tanks at offset 3
|
||||
DWORD m_dwMiscObjectives[32];
|
||||
|
||||
struct sdTestRunScore {
|
||||
DWORD m_dwScore;
|
||||
unsigned char m_ucCharacter;
|
||||
unsigned char m_ucRank1; // Used by Jet Tech
|
||||
unsigned char m_ucRank2; // Used by other test runs
|
||||
} m_HighScores[16][4][5];
|
||||
|
||||
DWORD m_dwClutchTimer;
|
||||
DWORD m_dwUnusedTimer;
|
||||
|
||||
DWORD m_dwSelectedTags [5]; // Like GameData but for P1 in 1-player
|
||||
DWORD m_dwCustomTagSelected[5]; // Like GameData but for P1 in 1-player
|
||||
|
||||
DWORD m_dwEventsSeen[16];
|
||||
};
|
||||
|
||||
// Numeric IDs for selecting different listss of state flags
|
||||
enum eFLAGLIST {
|
||||
eFLAGLIST_MISSION,
|
||||
eFLAGLIST_CHAPTER,
|
||||
eFLAGLIST_GLOBAL,
|
||||
eFLAGLIST_SPECIAL
|
||||
};
|
||||
|
||||
// Numeric IDs for tag sizes (should maybe put somewhere else?)
|
||||
enum eTAGSIZE {
|
||||
eTAGSIZE_SS,
|
||||
eTAGSIZE_S,
|
||||
eTAGSIZE_M,
|
||||
eTAGSIZE_L,
|
||||
eTAGSIZE_XL
|
||||
};
|
||||
|
||||
// Numeric IDs for different test run categories
|
||||
enum eTESTRUN {
|
||||
eTESTRUN_GRAFFITI,
|
||||
eTESTRUN_TECH,
|
||||
eTESTRUN_DASH,
|
||||
eTESTRUN_FLAG
|
||||
};
|
||||
|
||||
// Unpacked version of STestRunScoreSaved
|
||||
struct STestRunScore {
|
||||
DWORD m_dwScore;
|
||||
ePLAYERCHARID m_Character;
|
||||
DWORD m_dwRank1; // Used by Jet Tech
|
||||
DWORD m_dwRank2; // Used by other test runs
|
||||
};
|
||||
|
||||
// Numeric IDs for different timers
|
||||
enum eTIMER {
|
||||
eTIMER_DEATHBALLPRACTICE,
|
||||
eTIMER_CLUTCH,
|
||||
eTIMER_UNUSED
|
||||
};
|
||||
|
||||
// Info showed in save/load menu
|
||||
struct SSaveDescription {
|
||||
DWORD m_dwChapter;
|
||||
DWORD m_dwPlaytimeSeconds;
|
||||
};
|
||||
|
||||
union UFlagListOrPtr {
|
||||
eFLAGLIST list;
|
||||
DWORD * lpdw;
|
||||
};
|
||||
|
||||
// Save data-ish data structure used at runtime
|
||||
struct CSaveData {
|
||||
sdData m_SaveData;
|
||||
sdData m_SaveBack; // Holds save data during test runs/tutorials
|
||||
|
||||
DWORD m_dwMissionFlags[16]; // Reset every mission transition
|
||||
DWORD m_dwDeathBallPracticeTimer; // For Jazz sequence in Future Site
|
||||
|
||||
// Indexed like SaveData.highScores; true if score is most recent and
|
||||
// also made leaderboard
|
||||
BOOL m_bMostRecentHighScore[16][4][5];
|
||||
|
||||
// Tags indexed by single or multiplayer, then gang (GGs, Golden
|
||||
// Rhinos/Zero Beat, Poison Jam, Immortals) or player, then size
|
||||
DWORD m_dwSelectedTags [2][4][5]; // IDs of tags in use
|
||||
BOOL m_bCustomTagSelected[2][4][5]; // True means tag ID is for custom
|
||||
// graffiti list, not ingame list
|
||||
|
||||
BOOL CheckFlagCondition (DWORD dwCond);
|
||||
void WriteStateFlag (DWORD dwFlagVal);
|
||||
void IncreaseChapter ();
|
||||
void SetReturnMissionNo (DWORD dwVal);
|
||||
void SetSpawnPosIndex (DWORD dwVal);
|
||||
DWORD GetSpawnPosIndex ();
|
||||
void UnlockCharacter (ePLAYERCHARID CharId);
|
||||
void LockCharacter (ePLAYERCHARID CharId);
|
||||
BOOL IsCharacterUnlocked (ePLAYERCHARID CharId);
|
||||
BOOL CheckFlagConditions (DWORD * lpdwConds , DWORD dwCount);
|
||||
void WriteStateFlags (DWORD * lpdwWrites, DWORD dwCount);
|
||||
BOOL CheckFlagConditionUnpacked(eFLAGLIST FlagList, DWORD dwIndex);
|
||||
void WriteStateFlagUnpacked (eFLAGLIST FlagList, DWORD dwIndex, DWORD dwVal);
|
||||
void SetSoulSpawned (DWORD dwSoulId);
|
||||
BOOL GetSoulSpawned (DWORD dwSoulId);
|
||||
void SetSoulCollected (DWORD dwSoulId);
|
||||
BOOL GetSoulHeld (DWORD dwSoulId);
|
||||
BOOL IsSoulSpawnedUncollected(DWORD dwSoulId);
|
||||
void ClearHeldSouls ();
|
||||
void RestoreHeldSouls ();
|
||||
DWORD GetSoulCount ();
|
||||
DWORD GetTotalSoulsInStage(DWORD dwStageId);
|
||||
DWORD GetHeldSoulsInStage (DWORD dwStageId);
|
||||
BOOL GetSoulCollectedBySize(eTAGSIZE Size, DWORD dwIndex);
|
||||
void SetUnusedPerStageBitmask(DWORD dwStageId, DWORD dwIndex);
|
||||
int GetTagState (DWORD dwStageId, DWORD dwIndex, BOOL bRivalTag);
|
||||
void SetTagState (DWORD dwStageId, DWORD dwIndex, BOOL bRivalTag, DWORD dwVal);
|
||||
void SetTagCovered (DWORD dwStageId, DWORD dwIndex, BOOL bRivalTag, DWORD dwGangOrPlayer);
|
||||
void SetVolumeSettings (float fVolMusic , float fVolSfx);
|
||||
void GetVolumeSettings (float * lpfOutMusic, float * lpfOutSfx);
|
||||
void SetRumbleEnabled (BOOL bVal);
|
||||
BOOL GetRumbleEnabled ();
|
||||
void SetGarageMusic (DWORD dwSongId);
|
||||
DWORD GetGarageMusic ();
|
||||
void SetUnusedBitfield (DWORD dwIndex);
|
||||
void SetMiscObjective (DWORD dwIndex);
|
||||
BOOL GetMiscObjective (DWORD dwIndex);
|
||||
DWORD CountMiscObjectives ();
|
||||
BOOL GetHighScore (DWORD dwStageId, eTESTRUN Type, DWORD dwRank, STestRunScore * lpOut);
|
||||
void IncreaseTimer (eTIMER Timer);
|
||||
DWORD GetTimer (eTIMER Timer);
|
||||
void SetTimer (eTIMER Timer, DWORD frames);
|
||||
void SetSelectedTag (DWORD dwGangOrPlayer, eTAGSIZE Size, DWORD dwTagId, BOOL bMultiplayer);
|
||||
DWORD GetSelectedTag (DWORD dwGangOrPlayer, eTAGSIZE Size, BOOL bMultiplayer);
|
||||
void SetCustomTagSelected(DWORD dwGangOrPlayer, eTAGSIZE Size, BOOL bActive, BOOL bMultiplayer);
|
||||
BOOL GetCustomTagSelected(DWORD dwGangOrPlayer, eTAGSIZE Size, BOOL bMultiplayer);
|
||||
void SetEventSeen (DWORD dwEventId);
|
||||
BOOL GetEventSeen (DWORD dwEventId);
|
||||
void IncreasePlaytime ();
|
||||
DWORD GetSaveDataSize ();
|
||||
BOOL Decode (void * lpvSaveData);
|
||||
void Encode (void * lpvOutSaveData);
|
||||
void GetSaveDescription (SSaveDescription * lpOutDesc);
|
||||
void ClearStateFlags (UFlagListOrPtr Flags);
|
||||
void ResetTimer (eTIMER Timer);
|
||||
CSaveData();
|
||||
void ResetSelectedTags ();
|
||||
|
||||
void SaveDataResetTutorial ();
|
||||
void SaveDataResetTestRun ();
|
||||
void SaveDataResetVs ();
|
||||
void SaveDataBackup ();
|
||||
void SaveDataRestoreTutorial();
|
||||
void SaveDataRestoreTestRun ();
|
||||
void SaveDataRestoreVs ();
|
||||
|
||||
virtual ~CSaveData();
|
||||
void AddHighScore(DWORD dwStageId, eTESTRUN Type, STestRunScore * lpScore);
|
||||
};
|
||||
extern CSaveData g_SaveData;
|
||||
|
||||
#endif
|
||||
|
|
@ -9,6 +9,6 @@ Smilebit's stack-based matrix math library.
|
|||
|
||||
|
||||
// 4x4 matrix type
|
||||
typedef D3DVECTOR4 Mat4[4];
|
||||
typedef float Mat4[4][4];
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ HEADERS="
|
|||
XDK/CRT/ehdata.h
|
||||
XDK/D3D.h
|
||||
MUSASHI/MMatrix.hpp
|
||||
JSRF/Core.hpp
|
||||
JSRF/GameData.hpp
|
||||
JSRF/Action.hpp
|
||||
JSRF/SaveData.hpp
|
||||
"
|
||||
|
||||
# Process each header file into jsrf.h
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Object,Delink?,.text,.text$yc,.text$yd,.text$x,D3D,DSOUND,MMATRIX,XGRPH,XPP,.rdata,.rdata$x,.data$CRT,.data,DOLBY
|
||||
JSRF/Core.obj,true,0x00011000-0x00013FEB,,,0x00186BA0-0x00186C14,,,,,,0x001C4390-0x001C44F9,0x001E4D20-0x001E4DAB,,0x001EB880-0x001EB933,
|
||||
JSRF/GameData.obj,true,0x00039B50-0x0003B937,0x0018AD60-0x0018AD75,0x0018C9A0-0x0018C9AA,,,,,,,0x001CA16C-0x001CA3DB,,0x001EB790-0x001EB793,0x001EFC88-0x001F7047,
|
||||
JSRF/Action.obj,true,0x00011000-0x00013FEB,,,0x00186BA0-0x00186C14,,,,,,0x001C4390-0x001C44F9,0x001E4D20-0x001E4DAB,,0x001EB880-0x001EB933,
|
||||
JSRF/SaveData.obj,true,0x00039B50-0x0003B937,0x0018AD60-0x0018AD75,0x0018C9A0-0x0018C9AA,,,,,,,0x001CA16C-0x001CA3DB,,0x001EB790-0x001EB793,0x001EFC88-0x001F7047,
|
||||
JSRF/Jet2.obj,true,0x0006F9E0-0x0006FA6F,,,0x00187710-0x00187724,,,,,,,0x001E620C-0x001E622F,,0x0022FCE0-0x0022FCE3,
|
||||
ADX (need to decompose),false,0x0013A570-0x0014555F,?,?,?,?,,,,,,?,?,?,
|
||||
Xapi (need to decompose),false,0x00145560-0x0014B79F,?,?,?,?,,,,,,?,?,?,
|
||||
|
|
|
|||
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue