Minor decompiling in JSRF/Core

This commit is contained in:
KeybadeBlox 2026-01-02 23:14:59 -05:00
parent 1b08163c08
commit 4dae5206c0
3 changed files with 40 additions and 15 deletions

View file

@ -6,6 +6,10 @@ Game and GameObj classes that form the foundation of the JSRF game code.
#include "Core.hpp" #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 // Address: 0x00011000
// Matching: no // Matching: no
GameObj::~GameObj() { GameObj::~GameObj() {
@ -171,11 +175,17 @@ GameObj * GameObj::getParent() {
// Address: 0x00011BE0 // Address: 0x00011BE0
// Matching: no // Matching: no
void GameObj::removeFromObjList(GameObj * obj) { void GameObj::removeFromObjList(GameObj * obj) {
if (obj->flags > -1) {
}
} }
// Address: 0x00011C20 // Address: 0x00011C20
// Matching: no // Matching: no
void GameObj::removeChildrenFromObjList(GameObj * firstChild) { void GameObj::removeChildrenFromObjList(GameObj * firstChild) {
if (firstChild != NULL) do {
if (firstChild->flags > -1) {
}
} while (firstChild != NULL);
} }
// Address: 0x00011C80 // Address: 0x00011C80
@ -281,7 +291,7 @@ GameObj::GameObj(GameObj * parent, GameObjIndex index, GameObjFlags flags) {
} }
// Address: 0x00012170 // Address: 0x00012170
// Matching: no // Matching: yes
DrawTree::DrawTree(GameObj * parent, GameObjIndex index, GameObjFlags flags) : DrawTree::DrawTree(GameObj * parent, GameObjIndex index, GameObjFlags flags) :
GameObj(parent, index, flags) { GameObj(parent, index, flags) {
this->otherBitfield = 7; this->otherBitfield = 7;
@ -495,6 +505,11 @@ void Game::appendToDrawPriorityList(GameObj * obj) {
// Address: 0x00012A20 // Address: 0x00012A20
// Matching: no // Matching: no
void Game::sortDrawPriorityListSingleLevel(char sortKeyBitOffset) { void Game::sortDrawPriorityListSingleLevel(char sortKeyBitOffset) {
for (
unsigned i = 0;
i < sizeof this->drawPriorityListsByKeyHeads/sizeof *this->drawPriorityListsByKeyHeads;
i++
) this->drawPriorityListsByKeyHeads[i] = NULL;
} }
// Address: 0x00012AC0 // Address: 0x00012AC0
@ -547,22 +562,19 @@ void Game::draw() {
// Address: 0x00013A80 // Address: 0x00013A80
// Matching: no // Matching: no
void Game::frame() { void Game::frame() {
readInput();
} }
// Address: 0x00013F80 // Address: 0x00013F80
// Matching: no // Matching: yes
int Game::mainLoop() { int Game::mainLoop() {
if (this->initState < 0) return -1; if (this->initState >= 0) while (true) {
if (this->fatalErr == FALSE) this->frame();
while (true) { else {
while (this->fatalErr) { readInput();
// (need to declare these somewhere) Sleep(0x10);
//readInput();
//Sleep(0x10);
}
this->frame();
} }
} else return -1;
} }
// Address: 0x00013FC0 // Address: 0x00013FC0

View file

@ -21,8 +21,11 @@ typedef unsigned char BYTE;
typedef unsigned short WORD; typedef unsigned short WORD;
typedef unsigned long DWORD; typedef unsigned long DWORD;
typedef int BOOL; typedef void VOID;
typedef void * LPVOID;
typedef unsigned long SIZE_T;
typedef float FLOAT; typedef float FLOAT;
typedef int BOOL;
#define TRUE 1 #define TRUE 1
#define FALSE 0 #define FALSE 0
@ -46,4 +49,14 @@ typedef long HRESULT;
#define ERROR_SUCCESS 0L #define ERROR_SUCCESS 0L
#define E_OUTOFMEMORY 0x8007000EL #define E_OUTOFMEMORY 0x8007000EL
// Standard Win32 functions
VOID __stdcall Sleep(DWORD dwMilliseconds);
LPVOID __stdcall VirtualAlloc(
LPVOID lpAddress,
SIZE_T dwSize,
DWORD flAllocationType,
DWORD flProtect
);
#endif #endif

View file

@ -3,7 +3,7 @@ A matching decompilation of the Xbox game Jet Set Radio Future.
## Progress ## Progress
- Delinking progress: 0.52% (13263 out of 2574172 bytes in XBE address space) - Delinking progress: 0.52% (13263 out of 2574172 bytes in XBE address space)
- Decompilation progress: 29.6% (29 out of the 98 functions delinked so far) - Decompilation progress: 30.6% (30 out of the 98 functions delinked so far)
## Roadmap ## Roadmap
The approach of this decompilation is to: The approach of this decompilation is to: