Event RAII

This commit is contained in:
robojumper
2024-05-25 14:04:37 +02:00
parent 51dae63c9a
commit 419097a192
4 changed files with 8 additions and 7 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ toBeSorted/save_manager.cpp:
d/a/d_a_base.cpp:
.text start:0x8002C3A0 end:0x8002DE40
.data start:0x80501544 end:0x805015B8
.data start:0x80501538 end:0x805015B8
.sdata start:0x80571920 end:0x80571930
.sbss start:0x80575080 end:0x80575098
.sdata2 start:0x80576C88 end:0x80576C8C
+3 -3
View File
@@ -3562,7 +3562,7 @@ fn_8009EB10 = .text:0x8009EB10; // type:function size:0xC
fn_8009EB20 = .text:0x8009EB20; // type:function size:0x8
fn_8009EB30 = .text:0x8009EB30; // type:function size:0x36C
fn_8009EEA0 = .text:0x8009EEA0; // type:function size:0x53C
fn_8009F3E0 = .text:0x8009F3E0; // type:function size:0x470
alsoSetAsCurrentEvent = .text:0x8009F3E0; // type:function size:0x470
fn_8009F850 = .text:0x8009F850; // type:function size:0x134
fn_8009F990 = .text:0x8009F990; // type:function size:0x80
fn_8009FA10 = .text:0x8009FA10; // type:function size:0x8
@@ -3596,11 +3596,11 @@ fn_800A09B0 = .text:0x800A09B0; // type:function size:0x1D0
fn_800A0B80 = .text:0x800A0B80; // type:function size:0x10
fn_800A0B90 = .text:0x800A0B90; // type:function size:0x10
fn_800A0BA0 = .text:0x800A0BA0; // type:function size:0x94
fn_800A0C40 = .text:0x800A0C40; // type:function size:0xEC
__ct__5EventFPcUlUlPvPv = .text:0x800A0C40; // type:function size:0xEC
fn_800A0D30 = .text:0x800A0D30; // type:function size:0xEC
fn_800A0E20 = .text:0x800A0E20; // type:function size:0x208
fn_800A1030 = .text:0x800A1030; // type:function size:0x208
fn_800A1240 = .text:0x800A1240; // type:function size:0x40
__dt__5EventFv = .text:0x800A1240; // type:function size:0x40
fn_800A1280 = .text:0x800A1280; // type:function size:0x2E4
fn_800A1570 = .text:0x800A1570; // type:function size:0x84
fn_800A1600 = .text:0x800A1600; // type:function size:0x5C
+2
View File
@@ -15,7 +15,9 @@ public:
void *callback2;
public:
/** 0x800A0C40 */
Event(char *eventName, u32 unk, u32 eventFlags, void *callback1, void *callback2);
/** 0x800A1240 */
virtual ~Event();
};
+2 -3
View File
@@ -552,9 +552,8 @@ void dAcBase_c::unkVirtFunc_0x6C() {}
// 8002dba0
void dAcBase_c::doInteraction(s32 param) {
if (param == 4 || param == 5 || param == 12) {
Event *event = &Event("DefaultTalk", 400, 0x100001, nullptr, nullptr);
alsoSetAsCurrentEvent(this, event, nullptr);
event->~Event();
Event event = Event("DefaultTalk", 400, 0x100001, nullptr, nullptr);
alsoSetAsCurrentEvent(this, &event, nullptr);
}
}