Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ktOnFire setLight() #2297

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions include/d/actor/d_a_obj_ktOnFire.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ class daKtOnFire_c : public fopAc_ac_c {
/* 8058C9F8 */ void cutLight();
/* 8058CA1C */ void Execute();
/* 8058CDF8 */ bool Draw();
/* 8058CE00 */ void Delete();
/* 8058CE00 */ bool Delete();
Comment on lines 21 to +23
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just adding on to what hatal said, all actors generally have a create, delete, draw and execute function, and sometimes a createHeap and isDelete function, which should all return int values to stay consistent


static u8 const mCcDObjInfo[48];
static u8 mCcDCyl[68];

private:
/* 0x568 */ u8 field_0x568[0x728 - 0x568];
/* 0x568 */ u8 field_0x568[0x708 - 0x568];
/* 0x708 */ LIGHT_INFLUENCE mLight;
};

STATIC_ASSERT(sizeof(daKtOnFire_c) == 0x728);
Expand Down
17 changes: 9 additions & 8 deletions src/d/actor/d_a_obj_ktOnFire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,12 @@ void daKtOnFire_c::lightInit() {

/* 8058C9D4-8058C9F8 0004B4 0024+00 2/2 0/0 0/0 .text setLight__12daKtOnFire_cFv */
void daKtOnFire_c::setLight() {
// NONMATCHING
dKy_plight_set(&mLight);
}

/* 8058C9F8-8058CA1C 0004D8 0024+00 1/1 0/0 0/0 .text cutLight__12daKtOnFire_cFv */
void daKtOnFire_c::cutLight() {
// NONMATCHING
dKy_plight_cut(&mLight);
}

/* ############################################################################################## */
Expand Down Expand Up @@ -273,31 +273,32 @@ bool daKtOnFire_c::Draw() {
}

/* 8058CE00-8058CE28 0008E0 0028+00 1/1 0/0 0/0 .text Delete__12daKtOnFire_cFv */
void daKtOnFire_c::Delete() {
// NONMATCHING
bool daKtOnFire_c::Delete() {
dKy_plight_cut(&mLight);
return true;
}

/* 8058CE28-8058CE48 000908 0020+00 1/0 0/0 0/0 .text daKtOnFire_Draw__FP12daKtOnFire_c
*/
static void daKtOnFire_Draw(daKtOnFire_c* param_0) {
// NONMATCHING
param_0->Draw();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The draw, delete and execute static functions usually have an int return value that propagates the inner function return value.

}

/* 8058CE48-8058CE68 000928 0020+00 1/0 0/0 0/0 .text daKtOnFire_Execute__FP12daKtOnFire_c */
static void daKtOnFire_Execute(daKtOnFire_c* param_0) {
// NONMATCHING
param_0->Execute();
}

/* 8058CE68-8058CE88 000948 0020+00 1/0 0/0 0/0 .text daKtOnFire_Delete__FP12daKtOnFire_c
*/
static void daKtOnFire_Delete(daKtOnFire_c* param_0) {
// NONMATCHING
param_0->Delete();
}

/* 8058CE88-8058CEA8 000968 0020+00 1/0 0/0 0/0 .text daKtOnFire_Create__FP10fopAc_ac_c
*/
static void daKtOnFire_Create(fopAc_ac_c* param_0) {
// NONMATCHING
((daKtOnFire_c*)param_0)->create();
}

/* 8058CEA8-8058CF04 000988 005C+00 2/1 0/0 0/0 .text __dt__16daKtOnFire_HIO_cFv */
Expand Down