summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mm/2s2h/Rando/ActorBehavior/EnAl.cpp2
-rw-r--r--mm/2s2h/Rando/ActorBehavior/EnAn.cpp2
-rw-r--r--mm/2s2h/Rando/ActorBehavior/EnGo.cpp6
-rw-r--r--mm/2s2h/Rando/ActorBehavior/EnPm.cpp2
-rw-r--r--mm/2s2h/Rando/ActorBehavior/EnShn.cpp3
5 files changed, 7 insertions, 8 deletions
diff --git a/mm/2s2h/Rando/ActorBehavior/EnAl.cpp b/mm/2s2h/Rando/ActorBehavior/EnAl.cpp
index 74b9d675c..a528682fa 100644
--- a/mm/2s2h/Rando/ActorBehavior/EnAl.cpp
+++ b/mm/2s2h/Rando/ActorBehavior/EnAl.cpp
@@ -24,7 +24,7 @@ void Rando::ActorBehavior::InitEnAlBehavior() {
if (cmdId == MSCRIPT_CMD_ID_OFFER_ITEM) {
*should = false;
- MsgScriptCmdOfferItem* cmd = (MsgScriptCmdOfferItem*)*va_arg(args, MsgScript*);
+ MsgScriptCmdOfferItem* cmd = va_arg(args, MsgScriptCmdOfferItem*);
GetItemId getItemId = (GetItemId)SCRIPT_PACK_16(cmd->itemIdH, cmd->itemIdL);
skipCmds.clear();
if (getItemId == GI_MASK_KAFEIS_MASK) { // Mayor's Residence
diff --git a/mm/2s2h/Rando/ActorBehavior/EnAn.cpp b/mm/2s2h/Rando/ActorBehavior/EnAn.cpp
index f0b835508..a64f5c2cf 100644
--- a/mm/2s2h/Rando/ActorBehavior/EnAn.cpp
+++ b/mm/2s2h/Rando/ActorBehavior/EnAn.cpp
@@ -26,7 +26,7 @@ void Rando::ActorBehavior::InitEnAnBehavior() {
skipCmds.clear();
skipCmds.push_back(MSCRIPT_CMD_ID_AWAIT_TEXT); // Have to skip this to prevent a crash
skipCmds.push_back(MSCRIPT_CMD_ID_AUTOTALK); // And have to skip this to prevent a softlock on repeats
- MsgScriptCmdOfferItem* cmd = (MsgScriptCmdOfferItem*)*va_arg(args, MsgScript*);
+ MsgScriptCmdOfferItem* cmd = va_arg(args, MsgScriptCmdOfferItem*);
GetItemId getItemId = (GetItemId)SCRIPT_PACK_16(cmd->itemIdH, cmd->itemIdL);
/*
* If the player has the Bombers' Notebook and this is the Letter to Kafei check, the game will crash
diff --git a/mm/2s2h/Rando/ActorBehavior/EnGo.cpp b/mm/2s2h/Rando/ActorBehavior/EnGo.cpp
index e8f2b900e..253eaba1f 100644
--- a/mm/2s2h/Rando/ActorBehavior/EnGo.cpp
+++ b/mm/2s2h/Rando/ActorBehavior/EnGo.cpp
@@ -38,7 +38,7 @@ void Rando::ActorBehavior::InitEnGoBehavior() {
Player* player = GET_PLAYER(gPlayState);
if (cmdId == MSCRIPT_CMD_ID_CHECK_ITEM) {
- MsgScriptCmdCheckItem* cmd = (MsgScriptCmdCheckItem*)*script;
+ MsgScriptCmdCheckItem* cmd = (MsgScriptCmdCheckItem*)script;
s16 skip = SCRIPT_PACK_16(cmd->offsetH, cmd->offsetL);
s16 jumpTarget = 0x009A;
@@ -57,7 +57,7 @@ void Rando::ActorBehavior::InitEnGoBehavior() {
if (cmdId == MSCRIPT_CMD_ID_BEGIN_TEXT || cmdId == MSCRIPT_CMD_ID_CONTINUE_TEXT) {
// Could also be MsgScriptCmdContinueText, but structs are essentially identical
- MsgScriptCmdBeginText* cmd = (MsgScriptCmdBeginText*)*script;
+ MsgScriptCmdBeginText* cmd = (MsgScriptCmdBeginText*)script;
u16 textId = SCRIPT_PACK_16(cmd->textIdH, cmd->textIdL);
// Only override behavior if the player has yet to discover powder kegs
@@ -76,7 +76,7 @@ void Rando::ActorBehavior::InitEnGoBehavior() {
// Identify text choice branch at 0x004E by skip offset values
if (cmdId == MSCRIPT_CMD_ID_CHECK_TEXT_CHOICE) {
- MsgScriptCmdCheckTextChoice* cmd = (MsgScriptCmdCheckTextChoice*)*script;
+ MsgScriptCmdCheckTextChoice* cmd = (MsgScriptCmdCheckTextChoice*)script;
s16 skipChoice1 = SCRIPT_PACK_16(cmd->offset0H, cmd->offset0L);
s16 skipChoice2 = SCRIPT_PACK_16(cmd->offset1H, cmd->offset1L);
s16 skipChoice3 = SCRIPT_PACK_16(cmd->offset2H, cmd->offset2L);
diff --git a/mm/2s2h/Rando/ActorBehavior/EnPm.cpp b/mm/2s2h/Rando/ActorBehavior/EnPm.cpp
index 57249f5db..62c9c8370 100644
--- a/mm/2s2h/Rando/ActorBehavior/EnPm.cpp
+++ b/mm/2s2h/Rando/ActorBehavior/EnPm.cpp
@@ -27,7 +27,7 @@ void Rando::ActorBehavior::InitEnPmBehavior() {
* Express Mail, so we're just going to always act as if the player does not have the Postman's Hat.
* This enables repeat rewards as well, which does slightly differ from vanilla.
*/
- MsgScriptCmdCheckItem* cmd = (MsgScriptCmdCheckItem*)*script;
+ MsgScriptCmdCheckItem* cmd = (MsgScriptCmdCheckItem*)script;
ItemId itemId = (ItemId)SCRIPT_PACK_16(cmd->itemH, cmd->itemL);
if (itemId == ITEM_MASK_POSTMAN) {
*should = false;
diff --git a/mm/2s2h/Rando/ActorBehavior/EnShn.cpp b/mm/2s2h/Rando/ActorBehavior/EnShn.cpp
index 3807da132..b5478d72a 100644
--- a/mm/2s2h/Rando/ActorBehavior/EnShn.cpp
+++ b/mm/2s2h/Rando/ActorBehavior/EnShn.cpp
@@ -7,8 +7,7 @@ void Rando::ActorBehavior::InitEnShnBehavior() {
Actor* actor = va_arg(args, Actor*);
if (actor->id == ACTOR_EN_SHN && cmdId == MSCRIPT_CMD_ID_OFFER_ITEM) { // Swamp Tourist Center Guide
- MsgScript* script = va_arg(args, MsgScript*);
- MsgScriptCmdOfferItem* cmd = (MsgScriptCmdOfferItem*)*va_arg(args, MsgScript*);
+ MsgScriptCmdOfferItem* cmd = va_arg(args, MsgScriptCmdOfferItem*);
GetItemId getItemId = (GetItemId)SCRIPT_PACK_16(cmd->itemIdH, cmd->itemIdL);
if (getItemId == GI_HEART_PIECE) { // Showed picture of Tingle or the Deku King
// Do not do any substituted behavior, just skip this single command