Skip to content

Commit 0054c86

Browse files
committed
Update all usages of WarpPointer to ActorPointer.
1 parent 9b0b9e9 commit 0054c86

26 files changed

+97
-97
lines changed

Event VM Functions.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ Prepares the entities that are involved with the current event attempting to run
5858
* If true, then the client checks if the entity is within the current event playing.
5959
* If this is false, the function hard-exists in failure.
6060
* `if ( (entity->ServerId & 0xFF000000) == 0 )`
61-
* If this is true, the client will call `XiActor::SetCastMagicID` function on the entity and set another value inside of its `WarpPointer` to `0x20202020`
61+
* If this is true, the client will call `XiActor::SetCastMagicID` function on the entity and set another value inside of its `ActorPointer` to `0x20202020`
6262
* `if ( (v8->Render.Flags0 & 0x4000) != 0 || (v8->Render.Flags0 & 0x8000) != 0 )`
6363
* If this is true, further checks are skipped and go straight to the call to `XiAtelBuff::EventNew`.
64-
* `if ( XiActor::IsLockedStatus(entity->WarpPointer) )`
64+
* `if ( XiActor::IsLockedStatus(entity->ActorPointer) )`
6565
* If this is true, the function hard-exists in failure.
6666
* Once the above has been checked, then the entity is considered valid. The following then happens:
6767
* `XiAtelBuff::EventNew` is called for this entity.
@@ -98,7 +98,7 @@ The XiEvent object destructor. This cleans up the various allocations and other
9898

9999
This function is fairly straight forward in cleaning things up, but here's a quick rundown of what happens:
100100

101-
* The entity is obtained, if valid then it's event action is cancelled via: `XiAtelBuff::KillLastAction`
101+
* The entity is obtained, if valid then it's event action is cancelled via: `XiAtelBuff::KillLastAction`
102102
* The entity is tested for type `XiSkeletonActor::classXiSkeletonActor`
103103
* If matched, then the entity is told to stop moving its mouth via: `XiAtelBuff::StopMouth` and `XiSkeletonActor::DeleteResp`
104104
* The entities various flags and animation fields are reset from the event state.
@@ -143,7 +143,7 @@ The second initializer for the XiEvent object. This is used to finalize the init
143143

144144
Sets up the `ReqStack` that will be executed on the current tick then runs `XiEvent::ExecProg` in a loop until `RetFlag` is set.
145145

146-
When this function first starts, it ensures that an entity server id has been set. If not, then it returns 0.
146+
When this function first starts, it ensures that an entity server id has been set. If not, then it returns 0.
147147

148148
Next, it determines the `ReqStack` that has the 'highest' `Priority`. The one found most important to run has it's index set into `RunPos`. This looks like:
149149

@@ -197,7 +197,7 @@ void __thiscall FUNC_XiEvent_OpCode_0x0000(xievent_t* this)
197197
}
198198
```
199199
200-
Opcode `0x0000` is used to stop/reset the current `ReqStack` object. Since this handler sets `RetFlag` then the loop processing `XiEvent::ExecProg` will break. When this happens, `ExecPointer` is then stored into `ReqStack[RunPos].StackExecPointer`. However, this also sets the `Priority` to 255, which means on next tick, this stack is not considered valid and will fail the check done in `XiEvent::EventIdle` for `Priority`.
200+
Opcode `0x0000` is used to stop/reset the current `ReqStack` object. Since this handler sets `RetFlag` then the loop processing `XiEvent::ExecProg` will break. When this happens, `ExecPointer` is then stored into `ReqStack[RunPos].StackExecPointer`. However, this also sets the `Priority` to 255, which means on next tick, this stack is not considered valid and will fail the check done in `XiEvent::EventIdle` for `Priority`.
201201
202202
## `XiEvent::eventgetcode`
203203
@@ -467,7 +467,7 @@ bool __thiscall FUNC_XiEvent_GetActorIndex(xievent_t* this, int32_t lookupValue,
467467
* These values are used to return the local players party members info (based on their index in the party, 0 is skipped for local player). (Party 0)
468468
* `0x7FFFFFC6`, `0x7FFFFFC7`, `0x7FFFFFC8`, `0x7FFFFFC9`, `0x7FFFFFCA`, `0x7FFFFFCB`
469469
* These are intentionally overflowed upward by `+0x44`, resulting in the values: 10, 11, 12, 13, 14, 15
470-
* These values are used to return the local players alliance party members info. (Party 1)
470+
* These values are used to return the local players alliance party members info. (Party 1)
471471
* `0x7FFFFFCC`, `0x7FFFFFCD`, `0x7FFFFFCE`, `0x7FFFFFCF`, `0x7FFFFFD0`, `0x7FFFFFD1`
472472
* These are intentionally overflowed upward by `+0x48`, resulting in the values: 20, 21, 22, 23, 24, 25
473473
* These values are used to return the local players alliance party members info. (Party 2)
@@ -479,7 +479,7 @@ bool __thiscall FUNC_XiEvent_GetActorIndex(xievent_t* this, int32_t lookupValue,
479479
* The default handler tests if the value is a normal entity server id for NPCs. `if ((val & 0xFF000000) != 0)`
480480
* If true, the return values will be the value given as the server id and `val & 0x3FF` to get the target index.
481481
* If false, the return values default to the local event entity information. (`EntityServerId[1]` and `EntityTargetIndex[1]`)
482-
482+
483483
When the return values are set (they are put back into the incoming parameters), the function then returns true or false based on if the entity is valid/exists, and if the server id matches what was determined.
484484
485485
## `XiEvent::GetReqLevel`
@@ -513,7 +513,7 @@ int __thiscall FUNC_XiEvent_GetReqLevel(xievent_t* this, int priority)
513513

514514
**Pattern:** `33 C0 8B 54 24 04 66 8B 81 58 02 00 00 56 C1 E0 05 0F BE 44 08 3A 3B C2 75 ?? 33 C0 5E C2 04 00`
515515

516-
Determines if the given event id (tagnum) is currently running or is queued to run in any `ReqStack` entries.
516+
Determines if the given event id (tagnum) is currently running or is queued to run in any `ReqStack` entries.
517517

518518
* Returns 0 if the current `ReqStack[RunPos].TagNum` equals the given event id.
519519
* Returns 1 if one of the non-currently running `ReqStack` objects contains the given event id.

OpCodes/0x0023.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99

1010
## Description
1111

12-
Waits for the local player to interact with a dialog message.
12+
Waits for the local player to interact with a dialog message.
1313

1414
If a dialog is open and waiting for an interaction, the function will act like a yielding coroutine. Internally, `PTR_CliEventMessOpenFlag` will be set to 2 elsewhere and the `XiEvent::ExecProg` loop will hault until the user has made a selection. However, if `PTR_CliEventMessOpenFlag` is already 2 when this is called, then the state is considered invalid and the event is stopped by force.
1515

16-
If no dialog is opened/present, then the current `MouthIndex` entitiy, if one is set, is updated to stop talking and `MouthIndex` is reset to 0.
16+
If no dialog is opened/present, then the current `MouthIndex` entitiy, if one is set, is updated to stop talking and `MouthIndex` is reset to 0.
1717

1818
## Pseudo Code
1919

@@ -46,10 +46,10 @@ void __thiscall FUNC_XiEvent_OpCode_0x0023(xievent_t* this)
4646
{
4747
entity->Unknown0011 = 0;
4848

49-
if ((entity->Render.Flags0 & 0x200) != 0 && entity->WarpPointer)
49+
if ((entity->Render.Flags0 & 0x200) != 0 && entity->ActorPointer)
5050
{
51-
if (FUNC_YmObject_IsKindOf(entity->WarpPointer, "XiSkeletonActor")
52-
FUNC_XiSkeletonActor_SpeakStop(entity->WarpPointer);
51+
if (FUNC_YmObject_IsKindOf(entity->ActorPointer, "XiSkeletonActor")
52+
FUNC_XiSkeletonActor_SpeakStop(entity->ActorPointer);
5353
}
5454
}
5555
}

OpCodes/0x002C.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void __thiscall FUNC_XiEvent_OpCode_0x002C(xievent_t* this)
4747

4848
// Note: Potentially the incorrect call, but appears to be correct..
4949
// Note: May also be: XiSkeletonActor::SetAction instead..
50-
FUNC_XiActor_SetAction(entity1->WarpPointer, val3, entity2->WarpPointer, 0);
50+
FUNC_XiActor_SetAction(entity1->ActorPointer, val3, entity2->ActorPointer, 0);
5151
}
5252

5353
this->ExecPointer += 13;

OpCodes/0x002D.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void __thiscall FUNC_XiEvent_OpCode_0x002D(xievent_t* this)
4646
const auto val3 = FUNC_XiEvent_eventgetcode2(this, 9);
4747

4848
// Note: Potentially the incorrect call, but appears to be correct..
49-
FUNC_XiZone_SetAction(PTR_Zone, val3, entity1->WarpPointer, entity2->WarpPointer);
49+
FUNC_XiZone_SetAction(PTR_Zone, val3, entity1->ActorPointer, entity2->ActorPointer);
5050
}
5151

5252
this->ExecPointer += 13;

OpCodes/0x0045.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ void __thiscall FUNC_XiEvent_OpCode_0x0045_(xievent_t* this, int32_t param1)
5959
if (param1 == 30704)
6060
val4 = FUNC_DatIdHelper(val4);
6161

62-
FUNC_LoadStartScheduler(param1 + val4, val3, entity1->WarpPointer, entity2->WarpPointer, FUNC_XiEvent_getworkofs_(this, 15));
62+
FUNC_LoadStartScheduler(param1 + val4, val3, entity1->ActorPointer, entity2->ActorPointer, FUNC_XiEvent_getworkofs_(this, 15));
6363
}
6464

6565
this->ExecPointer += 17;

OpCodes/0x0046.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void __thiscall FUNC_XiEvent_OpCode_0x0046(xievent_t* this)
4949
FUNC_XiActor_EnableUserControlCamera();
5050

5151
FUNC_YmCameraManager_SetAt(FUNC_GetCameraDefaultPos(), PTR_EntityMap[PTR_LoginActIndex]->Movement);
52-
FUNC_YmCameraManager_SetCameraPos(FUNC_GetCameraDefaultPos(), PTR_UnknownCameraPos, PTR_EntityMap[PTR_LoginActIndex]->WarpPointer)
52+
FUNC_YmCameraManager_SetCameraPos(FUNC_GetCameraDefaultPos(), PTR_UnknownCameraPos, PTR_EntityMap[PTR_LoginActIndex]->ActorPointer)
5353
}
5454
}
5555

OpCodes/0x0050.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void __thiscall FUNC_XiEvent_OpCode_0x0050(xievent_t* this)
4747

4848
// Note: Potentially the incorrect call, but appears to be correct..
4949
// Note: May also be: XiSkeletonActor::KillAction instead..
50-
FUNC_XiActor_KillAction(entity1->WarpPointer, val3, entity2->WarpPointer);
50+
FUNC_XiActor_KillAction(entity1->ActorPointer, val3, entity2->ActorPointer);
5151
}
5252

5353
this->ExecPointer += 13;

OpCodes/0x0051.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void __thiscall FUNC_XiEvent_OpCode_0x0051(xievent_t* this)
4646
const auto val3 = FUNC_XiEvent_eventgetcode2(this, 9);
4747

4848
// Note: Potentially the incorrect call, but appears to be correct..
49-
FUNC_XiZone_KillAction(PTR_Zone, val3, entity1->WarpPointer, entity2->WarpPointer);
49+
FUNC_XiZone_KillAction(PTR_Zone, val3, entity1->ActorPointer, entity2->ActorPointer);
5050
}
5151

5252
this->ExecPointer += 13;

OpCodes/0x0052.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void __thiscall FUNC_XiEvent_OpCode_0x0052_(xievent_t* this, int32_t param)
6060
val4 = FUNC_DatIdHelper(val4);
6161

6262
// Note: Potentially the incorrect call, but appears to be correct..
63-
FUNC_KillScheduler(param + val4, val3, entity1->WarpPointer, entity2->WarpPointer);
63+
FUNC_KillScheduler(param + val4, val3, entity1->ActorPointer, entity2->ActorPointer);
6464
}
6565

6666
this->ExecPointer += 15;

OpCodes/0x0053.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ void __thiscall FUNC_XiEvent_OpCode_0x0053_(xievent_t* this, int32_t param1, int
4646
const auto val3 = FUNC_XiEvent_eventgetcode2(this, 9);
4747

4848
// Note: Potentially the incorrect calls, but appear to be correct..
49-
if (param2 ? entity1->IsMovingAction(val3, entity2->WarpPointer)
50-
: entity1->SetAction(val3, entity2->WarpPointer))
49+
if (param2 ? entity1->IsMovingAction(val3, entity2->ActorPointer)
50+
: entity1->SetAction(val3, entity2->ActorPointer))
5151
this->RetFlag = 1;
5252

5353
if (this->RetFlag)

OpCodes/0x0054.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void __thiscall FUNC_XiEvent_OpCode_0x0054(xievent_t* this)
4646
const auto val3 = FUNC_XiEvent_eventgetcode2(this, 9);
4747

4848
// Note: Potentially the incorrect call, but appears to be correct..
49-
if (FUNC_XiZone_IsMovingAction(PTR_Zone, val3, entity1->WarpPointer, entity2->WarpPointer))
49+
if (FUNC_XiZone_IsMovingAction(PTR_Zone, val3, entity1->ActorPointer, entity2->ActorPointer))
5050
this->RetFlag = 1;
5151
}
5252
else

OpCodes/0x0055.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void __thiscall FUNC_XiEvent_OpCode_0x0055_(xievent_t* this, int32_t param1)
6060
val4 = FUNC_DatIdHelper(val4);
6161

6262
// Note: Potentially the incorrect call, but appears to be correct..
63-
if (FUNC_IsMovingScheduler(param1 + val4, val3, entity1->WarpPointer, entity2->WarpPointer))
63+
if (FUNC_IsMovingScheduler(param1 + val4, val3, entity1->ActorPointer, entity2->ActorPointer))
6464
this->RetFlag = 1;
6565
}
6666
else

OpCodes/0x0059.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ void __thiscall FUNC_XiEvent_OpCode_0x0059(xievent_t* this)
6565
if (FUNC_XiEvent_GetActorIndex(this, val, &serverId, &index))
6666
{
6767
const auto entity = PTR_EntityMap[index];
68-
if (entity && entity->WarpPointer)
68+
if (entity && entity->ActorPointer)
6969
this->ExtData[1]->MainSpeed = FUNC_XiEvent_getworkofs_(this, 6) * 0.1;
7070
}
7171

@@ -94,7 +94,7 @@ void __thiscall FUNC_XiEvent_OpCode_0x0059(xievent_t* this)
9494
const auto entity = PTR_EntityMap[index];
9595

9696
// Note: Potentially the incorrect call, but appears to be correct..
97-
if (FUNC_XiActor_SetAction(entity->WarpPointer, entity->EmoteIdString, entity->WarpPointer) == 1)
97+
if (FUNC_XiActor_SetAction(entity->ActorPointer, entity->EmoteIdString, entity->ActorPointer) == 1)
9898
{
9999
this->RetFlag = 1;
100100
return;

OpCodes/0x005B.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ void __thiscall FUNC_XiEvent_OpCode_0x005B_(xievent_t* this, int32_t param1, int
5151
return 1;
5252
}
5353

54-
if (entity1->ServerId != serverId1 || entity2->ServerId != serverId2
55-
|| (entity1->Render.Flags0 & 0x200) == 0 || (entity1->Render.Flags0 & 0x80) == 0
54+
if (entity1->ServerId != serverId1 || entity2->ServerId != serverId2
55+
|| (entity1->Render.Flags0 & 0x200) == 0 || (entity1->Render.Flags0 & 0x80) == 0
5656
|| (entity2->Render.Flags0 & 0x200) == 0 || (entity2->Render.Flags0 & 0x80) == 0)
5757
{
5858
this->ExecPointer += 15;
@@ -74,7 +74,7 @@ void __thiscall FUNC_XiEvent_OpCode_0x005B_(xievent_t* this, int32_t param1, int
7474
if (param)
7575
{
7676
// Note: Potentially incorrect call..
77-
FUNC_XiSkeletonActor_ReadTpcEventMotionRes(entity1->WarpPointer, val);
77+
FUNC_XiSkeletonActor_ReadTpcEventMotionRes(entity1->ActorPointer, val);
7878
}
7979
else if (v17 < 3072)
8080
{
@@ -83,31 +83,31 @@ void __thiscall FUNC_XiEvent_OpCode_0x005B_(xievent_t* this, int32_t param1, int
8383
if (val < 1024)
8484
{
8585
if (val < 512)
86-
FUNC_XiSkeletonActor_ReadEventMotionRes(entity1->WarpPointer, &param1, val + 32104);
86+
FUNC_XiSkeletonActor_ReadEventMotionRes(entity1->ActorPointer, &param1, val + 32104);
8787
else
88-
FUNC_XiSkeletonActor_ReadEventMotionRes(entity1->WarpPointer, &param1, val + 49135);
88+
FUNC_XiSkeletonActor_ReadEventMotionRes(entity1->ActorPointer, &param1, val + 49135);
8989
}
9090
else
9191
{
92-
FUNC_XiSkeletonActor_ReadEventMotionRes(entity1->WarpPointer, &param1, val + 56345);
92+
FUNC_XiSkeletonActor_ReadEventMotionRes(entity1->ActorPointer, &param1, val + 56345);
9393
}
9494
}
9595
else
9696
{
97-
FUNC_XiSkeletonActor_ReadEventMotionRes(entity1->WarpPointer, &param1, val + 59739);
97+
FUNC_XiSkeletonActor_ReadEventMotionRes(entity1->ActorPointer, &param1, val + 59739);
9898
}
9999
}
100100
else
101101
{
102-
FUNC_XiSkeletonActor_ReadEventMotionRes(entity1->WarpPointer, &param1, val + 66339);
102+
FUNC_XiSkeletonActor_ReadEventMotionRes(entity1->ActorPointer, &param1, val + 66339);
103103
}
104104

105105
this->ExtData[1]->ReadEventMotionResFlag[param] = 1;
106106
} while (!this->ExtData[1]->ReadEventMotionResFlag[param] );
107107
}
108108

109109
// Note: Potentially incorrect call..
110-
if (!FUNC_XiSkeletonActor_IsReadCompleteResList(entity1->WarpPointer))
110+
if (!FUNC_XiSkeletonActor_IsReadCompleteResList(entity1->ActorPointer))
111111
{
112112
this->RetFlag = 1;
113113
return 0;
@@ -120,19 +120,19 @@ void __thiscall FUNC_XiEvent_OpCode_0x005B_(xievent_t* this, int32_t param1, int
120120
FUNC_XiAtelBuff_KillLastAction(entity1);
121121

122122
*(uint32_t*)&entity1->Unknown0020[0] = val3;
123-
*(uint32_t*)&entity1->Unknown0020[8] = entity2->WarpPointer;
123+
*(uint32_t*)&entity1->Unknown0020[8] = entity2->ActorPointer;
124124

125125
// Note: Potentially the incorrect call, but appears to be correct..
126126
// Note: May also be: XiSkeletonActor::SetAction instead..
127-
FUNC_XiActor_SetAction(entity1->WarpPointer, val3, entity2->WarpPointer, 0);
127+
FUNC_XiActor_SetAction(entity1->ActorPointer, val3, entity2->ActorPointer, 0);
128128
}
129129

130130
this->ExtData[1]->ReadEventMotionResFlag[param] = 0;
131131

132132
if (param3)
133133
{
134134
const auto val = FUNC_XiEvent_getworkofs_(this, 15);
135-
FUNC_XiActor_UnknownCall(entity1->WarpPointer, val, val3, entity1->WarpPointer);
135+
FUNC_XiActor_UnknownCall(entity1->ActorPointer, val, val3, entity1->ActorPointer);
136136
}
137137

138138
this->ExecPointer += 15;

OpCodes/0x005E.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ void __thiscall FUNC_XiEvent_OpCode_0x005E(xievent_t* this)
2626

2727
FUNC_XiAtelBuff_IdleDefMotion(PTR_EntityMap[this->EntityTargetIndex[1]]);
2828

29-
if (FUNC_YmObject_IsKindOf(PTR_EntityMap[this->EntityTargetIndex[1]]->WarpPointer, "CXiSkeletonActor"))
29+
if (FUNC_YmObject_IsKindOf(PTR_EntityMap[this->EntityTargetIndex[1]]->ActorPointer, "CXiSkeletonActor"))
3030
{
31-
PTR_EntityMap[this->EntityTargetIndex[1]]->WarpPointer->Unknown0000 = val;
32-
PTR_EntityMap[this->EntityTargetIndex[1]]->WarpPointer->Unknown0001 = 0x20202020;
31+
PTR_EntityMap[this->EntityTargetIndex[1]]->ActorPointer->Unknown0000 = val;
32+
PTR_EntityMap[this->EntityTargetIndex[1]]->ActorPointer->Unknown0001 = 0x20202020;
3333

34-
FUNC_XiAtelBuff_UnknownFlagAdjustment(PTR_EntityMap[this->EntityTargetIndex[1]]->WarpPointer, 0);
34+
FUNC_XiAtelBuff_UnknownFlagAdjustment(PTR_EntityMap[this->EntityTargetIndex[1]]->ActorPointer, 0);
3535
}
3636
}
37-
37+
3838
this->ExecPointer += 5;
3939
}
4040
```

OpCodes/0x006B.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@ void __thiscall FUNC_XiEvent_OpCode_0x006B(xievent_t* this)
2626
if (entity and (entity->Render.Flags0 & 0x200) != 0)
2727
{
2828
FUNC_XiAtelBuff_KillLastAction(entity);
29-
29+
3030
const auto val2 = FUNC_XiEvent_eventgetcode2(this, 1);
3131
entity->Animations[5] = v5;
3232

3333
FUNC_XiAtelBuff_IdleDefMotion(entity);
3434

35-
if (FUNC_YmObject_IsKindOf(entity->WarpPointer, "CXiSkeletonActor"))
35+
if (FUNC_YmObject_IsKindOf(entity->ActorPointer, "CXiSkeletonActor"))
3636
{
37-
entity->WarpPointer->Unknown0000 = val;
38-
entity->WarpPointer->Unknown0001 = 0x20202020;
37+
entity->ActorPointer->Unknown0000 = val;
38+
entity->ActorPointer->Unknown0001 = 0x20202020;
3939

40-
FUNC_XiAtelBuff_UnknownFlagAdjustment(entity->WarpPointer, 0);
40+
FUNC_XiAtelBuff_UnknownFlagAdjustment(entity->ActorPointer, 0);
4141
}
4242
}
4343
}

0 commit comments

Comments
 (0)