d_event_debug equivalent & modifications to dEvLib_callback_c (#2359)

* WIP d_event_debug
* Implemented most functions close to matching
* Removed erroneous comment in d_com_inf_game.h
* Implemented getEventP in dEvDtBase_c
* Retyped dEvLib_callback_c function returns from BOOL to bool
* Implemented getHeader, getEventList, and setDbgData in dEvent_manager_c
* Moved relevant dEvDb_* classes from d_event.h to d_event_debug.h and changed to structs
* Extended JORFile mFilename character array from 8 to 256 characters
* Implemented combo boxes and update slider functionalities in JORMContext
* Named field_0xC of JORProperyEvent as id, based on use of field in d_event_debug.cpp
* Corrected debug event tables and created missing table
* Debug tables explicitly pasted in d_event_debug.cpp to circumvent ShiftJIS not properly encoding tables via #include directive

* Change return types for implemented virtual functions of actors that inherit from dEvLib_callback_c

* Add const modifier to several d_com_inf_game functions called in d_event_debug, and change respective fields in dEvDb_bit & reg_c to be const

* d_event_debug Equivalent
* Changed configure.py entry to equivalent instead of matching
* Preliminary documentation

* Remove debug tables from d_event.cpp
This commit is contained in:
Huitzi
2025-03-30 23:11:50 -04:00
committed by GitHub
parent 559d389e3d
commit 4ccca6b893
43 changed files with 9956 additions and 162 deletions
+13 -12
View File
@@ -5,6 +5,7 @@
#include "d/d_event_lib.h"
#include "d/d_com_inf_game.h"
#include "f_op/f_op_actor.h"
/* 803A82B8-803A82C4 0053D8 000C+00 1/1 0/0 0/0 .data cNullVec__6Z2Calc */
static u8 cNullVec__6Z2Calc[12] = {
@@ -12,7 +13,7 @@ static u8 cNullVec__6Z2Calc[12] = {
};
/* 8004886C-800488A4 0431AC 0038+00 0/0 0/0 23/23 .text eventUpdate__17dEvLib_callback_cFv */
BOOL dEvLib_callback_c::eventUpdate() {
bool dEvLib_callback_c::eventUpdate() {
if (mAction == NULL) {
return FALSE;
} else {
@@ -31,13 +32,13 @@ static action_class<dEvLib_callback_c> l_runAction(&dEvLib_callback_c::initRun,
/* 800488A4-80048940 0431E4 009C+00 1/1 0/0 1/1 .text setEvent__17dEvLib_callback_cFiii
*/
BOOL dEvLib_callback_c::setEvent(int mapToolId, int eventIdx, int param_2) {
bool dEvLib_callback_c::setEvent(int mapToolId, int eventIdx, int param_2) {
if (mAction != NULL) {
return FALSE;
} else {
mActor->eventInfo.setMapToolId(mapToolId);
if (mapToolId != 0xFF && eventIdx == 0xFF) {
eventIdx = dComIfGp_getEventManager().getEventIdx(mActor, mapToolId);
eventIdx = dComIfGp_getEventManager().getEventIdx(mActor, static_cast<u16>(mapToolId));
}
mActor->eventInfo.setEventId(eventIdx);
_C = param_2;
@@ -52,10 +53,10 @@ void dEvLib_callback_c::orderEvent(int param_0, int param_1, int param_2) {
/* 80048970-800489A8 0432B0 0038+00 3/3 0/0 0/0 .text
* setAction__17dEvLib_callback_cFP33action_class<17dEvLib_callback_c> */
BOOL dEvLib_callback_c::setAction(action_class<dEvLib_callback_c>* action) {
bool dEvLib_callback_c::setAction(action_class<dEvLib_callback_c>* action) {
mAction = action;
if (mAction == NULL) {
return FALSE;
return false;
} else {
return initAction();
}
@@ -63,7 +64,7 @@ BOOL dEvLib_callback_c::setAction(action_class<dEvLib_callback_c>* action) {
/* 800489A8-800489F8 0432E8 0050+00 1/1 0/0 0/0 .text initAction__17dEvLib_callback_cFv
*/
BOOL dEvLib_callback_c::initAction() {
bool dEvLib_callback_c::initAction() {
if (!mAction->getInit()) {
return TRUE;
} else {
@@ -72,7 +73,7 @@ BOOL dEvLib_callback_c::initAction() {
}
/* 800489F8-80048A50 043338 0058+00 1/1 0/0 0/0 .text executeAction__17dEvLib_callback_cFv */
BOOL dEvLib_callback_c::executeAction() {
bool dEvLib_callback_c::executeAction() {
if (!mAction->getExecute()) {
return TRUE;
} else {
@@ -81,13 +82,13 @@ BOOL dEvLib_callback_c::executeAction() {
}
/* 80048A50-80048A70 043390 0020+00 1/0 0/0 0/0 .text initStart__17dEvLib_callback_cFv */
BOOL dEvLib_callback_c::initStart() {
bool dEvLib_callback_c::initStart() {
return executeStart();
}
/* 80048A70-80048B1C 0433B0 00AC+00 2/1 0/0 0/0 .text executeStart__17dEvLib_callback_cFv
*/
BOOL dEvLib_callback_c::executeStart() {
bool dEvLib_callback_c::executeStart() {
if (!mActor->eventInfo.checkCommandDemoAccrpt()) {
if (mActor->eventInfo.getMapToolId() != 0xFF) {
fopAcM_orderMapToolEvent(mActor, mActor->eventInfo.getMapToolId(),
@@ -104,14 +105,14 @@ BOOL dEvLib_callback_c::executeStart() {
}
/* 80048B1C-80048B48 04345C 002C+00 1/0 0/0 0/0 .text initRun__17dEvLib_callback_cFv */
BOOL dEvLib_callback_c::initRun() {
bool dEvLib_callback_c::initRun() {
return eventStart();
}
/* 80048B48-80048BD8 043488 0090+00 1/0 0/0 0/0 .text executeRun__17dEvLib_callback_cFv
*/
BOOL dEvLib_callback_c::executeRun() {
if (!dComIfGp_getEventManager().endCheck(mActor->eventInfo.getEventId())) {
bool dEvLib_callback_c::executeRun() {
if (!dComIfGp_evmng_endCheck(mActor->eventInfo.getEventId())) {
return eventRun();
} else {
dComIfGp_getEvent().reset();