Finish updating macro comments
This commit is contained in:
@@ -502,7 +502,7 @@ void DoDiveWarp(void)
|
||||
CreateTask(Task_WarpAndLoadMap, 10);
|
||||
}
|
||||
|
||||
void DoSootopolisLegendWarp(void)
|
||||
void DoWhiteFadeWarp(void)
|
||||
{
|
||||
ScriptContext2_Enable();
|
||||
TryFadeOutOldMapMusic();
|
||||
|
||||
@@ -111,16 +111,16 @@ static bool8 GetEventLoadMessage(u8 *dest, u32 status)
|
||||
{
|
||||
bool8 retVal = TRUE;
|
||||
|
||||
if (status == 0)
|
||||
if (status == MEVENT_STATUS_LOAD_OK)
|
||||
{
|
||||
StringCopy(dest, gText_EventSafelyLoaded);
|
||||
retVal = FALSE;
|
||||
}
|
||||
|
||||
if (status == 2)
|
||||
if (status == MEVENT_STATUS_SUCCESS)
|
||||
retVal = FALSE;
|
||||
|
||||
if (status == 1)
|
||||
if (status == MEVENT_STATUS_LOAD_ERROR)
|
||||
StringCopy(dest, gText_LoadErrorEndingSession);
|
||||
|
||||
return retVal;
|
||||
@@ -193,7 +193,7 @@ static void CB2_MysteryEventMenu(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
GetEventLoadMessage(gStringVar4, 1);
|
||||
GetEventLoadMessage(gStringVar4, MEVENT_STATUS_LOAD_ERROR);
|
||||
PrintMysteryMenuText(0, gStringVar4, 1, 2, 1);
|
||||
gMain.state = 13;
|
||||
}
|
||||
@@ -206,7 +206,7 @@ static void CB2_MysteryEventMenu(void)
|
||||
if (GetLinkPlayerDataExchangeStatusTimed(2, 2) == EXCHANGE_DIFF_SELECTIONS)
|
||||
{
|
||||
SetCloseLinkCallback();
|
||||
GetEventLoadMessage(gStringVar4, 1);
|
||||
GetEventLoadMessage(gStringVar4, MEVENT_STATUS_LOAD_ERROR);
|
||||
PrintMysteryMenuText(0, gStringVar4, 1, 2, 1);
|
||||
gMain.state = 13;
|
||||
}
|
||||
@@ -218,7 +218,7 @@ static void CB2_MysteryEventMenu(void)
|
||||
else
|
||||
{
|
||||
CloseLink();
|
||||
GetEventLoadMessage(gStringVar4, 1);
|
||||
GetEventLoadMessage(gStringVar4, MEVENT_STATUS_LOAD_ERROR);
|
||||
PrintMysteryMenuText(0, gStringVar4, 1, 2, 1);
|
||||
gMain.state = 13;
|
||||
}
|
||||
@@ -252,9 +252,9 @@ static void CB2_MysteryEventMenu(void)
|
||||
case 11:
|
||||
if (gReceivedRemoteLinkPlayers == 0)
|
||||
{
|
||||
u16 unkVal = RunMysteryEventScript(gDecompressionBuffer);
|
||||
u16 status = RunMysteryEventScript(gDecompressionBuffer);
|
||||
CpuFill32(0, gDecompressionBuffer, 0x7D4);
|
||||
if (!GetEventLoadMessage(gStringVar4, unkVal))
|
||||
if (!GetEventLoadMessage(gStringVar4, status))
|
||||
TrySavingData(SAVE_NORMAL);
|
||||
gMain.state++;
|
||||
}
|
||||
@@ -290,7 +290,7 @@ static void CB2_MysteryEventMenu(void)
|
||||
if (gLinkStatus & 0x40 && !IsLinkMaster())
|
||||
{
|
||||
CloseLink();
|
||||
GetEventLoadMessage(gStringVar4, 1);
|
||||
GetEventLoadMessage(gStringVar4, MEVENT_STATUS_LOAD_ERROR);
|
||||
PrintMysteryMenuText(0, gStringVar4, 1, 2, 1);
|
||||
gMain.state = 13;
|
||||
}
|
||||
|
||||
@@ -22,6 +22,11 @@ extern ScrCmdFunc gMysteryEventScriptCmdTableEnd[];
|
||||
#define LANGUAGE_MASK 0x1
|
||||
#define VERSION_MASK 0x200
|
||||
|
||||
#define mScriptBase data[0]
|
||||
#define mOffset data[1]
|
||||
#define mStatus data[2]
|
||||
#define mValid data[3]
|
||||
|
||||
EWRAM_DATA static struct ScriptContext sMysteryEventScriptContext = {0};
|
||||
|
||||
static bool32 CheckCompatibility(u16 a1, u32 a2, u16 a3, u32 a4)
|
||||
@@ -44,22 +49,22 @@ static bool32 CheckCompatibility(u16 a1, u32 a2, u16 a3, u32 a4)
|
||||
static void SetIncompatible(void)
|
||||
{
|
||||
StringExpandPlaceholders(gStringVar4, gText_MysteryEventCantBeUsed);
|
||||
SetMysteryEventScriptStatus(3);
|
||||
SetMysteryEventScriptStatus(MEVENT_STATUS_FAILURE);
|
||||
}
|
||||
|
||||
static void InitMysteryEventScript(struct ScriptContext *ctx, u8 *script)
|
||||
{
|
||||
InitScriptContext(ctx, gMysteryEventScriptCmdTable, gMysteryEventScriptCmdTableEnd);
|
||||
SetupBytecodeScript(ctx, script);
|
||||
ctx->data[0] = (u32)script;
|
||||
ctx->data[1] = 0;
|
||||
ctx->data[2] = 0;
|
||||
ctx->data[3] = 0;
|
||||
ctx->mScriptBase = (u32)script;
|
||||
ctx->mOffset = 0;
|
||||
ctx->mStatus = MEVENT_STATUS_LOAD_OK;
|
||||
ctx->mValid = FALSE;
|
||||
}
|
||||
|
||||
static bool32 RunMysteryEventScriptCommand(struct ScriptContext *ctx)
|
||||
{
|
||||
if (RunScriptCommand(ctx) && ctx->data[3])
|
||||
if (RunScriptCommand(ctx) && ctx->mValid)
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
@@ -70,10 +75,10 @@ void InitMysteryEventScriptContext(u8 *script)
|
||||
InitMysteryEventScript(&sMysteryEventScriptContext, script);
|
||||
}
|
||||
|
||||
bool32 RunMysteryEventScriptContextCommand(u32 *script)
|
||||
bool32 RunMysteryEventScriptContextCommand(u32 *status)
|
||||
{
|
||||
bool32 ret = RunMysteryEventScriptCommand(&sMysteryEventScriptContext);
|
||||
*script = sMysteryEventScriptContext.data[2];
|
||||
*status = sMysteryEventScriptContext.mStatus;
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -84,12 +89,12 @@ u32 RunMysteryEventScript(u8 *script)
|
||||
InitMysteryEventScript(ctx, script);
|
||||
while (RunMysteryEventScriptCommand(ctx));
|
||||
|
||||
return ctx->data[2];
|
||||
return ctx->mStatus;
|
||||
}
|
||||
|
||||
void SetMysteryEventScriptStatus(u32 val)
|
||||
void SetMysteryEventScriptStatus(u32 status)
|
||||
{
|
||||
sMysteryEventScriptContext.data[2] = val;
|
||||
sMysteryEventScriptContext.mStatus = status;
|
||||
}
|
||||
|
||||
static int CalcRecordMixingGiftChecksum(void)
|
||||
@@ -174,14 +179,14 @@ bool8 MEScrCmd_checkcompat(struct ScriptContext *ctx)
|
||||
u16 v3;
|
||||
u32 v4;
|
||||
|
||||
ctx->data[1] = ScriptReadWord(ctx);
|
||||
ctx->mOffset = ScriptReadWord(ctx);
|
||||
v1 = ScriptReadHalfword(ctx);
|
||||
v2 = ScriptReadWord(ctx);
|
||||
v3 = ScriptReadHalfword(ctx);
|
||||
v4 = ScriptReadWord(ctx);
|
||||
|
||||
if (CheckCompatibility(v1, v2, v3, v4) == TRUE)
|
||||
ctx->data[3] = 1;
|
||||
ctx->mValid = TRUE;
|
||||
else
|
||||
SetIncompatible();
|
||||
|
||||
@@ -195,23 +200,23 @@ bool8 MEScrCmd_nop(struct ScriptContext *ctx)
|
||||
|
||||
bool8 MEScrCmd_setstatus(struct ScriptContext *ctx)
|
||||
{
|
||||
u8 value = ScriptReadByte(ctx);
|
||||
ctx->data[2] = value;
|
||||
u8 status = ScriptReadByte(ctx);
|
||||
ctx->mStatus = status;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 MEScrCmd_setmsg(struct ScriptContext *ctx)
|
||||
{
|
||||
u8 value = ScriptReadByte(ctx);
|
||||
u8 *str = (u8 *)(ScriptReadWord(ctx) - ctx->data[1] + ctx->data[0]);
|
||||
if (value == 0xFF || value == ctx->data[2])
|
||||
u8 status = ScriptReadByte(ctx);
|
||||
u8 *str = (u8 *)(ScriptReadWord(ctx) - ctx->mOffset + ctx->mScriptBase);
|
||||
if (status == MEVENT_STATUS_FF || status == ctx->mStatus)
|
||||
StringExpandPlaceholders(gStringVar4, str);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 MEScrCmd_runscript(struct ScriptContext *ctx)
|
||||
{
|
||||
u8 *script = (u8 *)(ScriptReadWord(ctx) - ctx->data[1] + ctx->data[0]);
|
||||
u8 *script = (u8 *)(ScriptReadWord(ctx) - ctx->mOffset + ctx->mScriptBase);
|
||||
ScriptContext2_RunNewScript(script);
|
||||
return FALSE;
|
||||
}
|
||||
@@ -221,7 +226,7 @@ bool8 MEScrCmd_setenigmaberry(struct ScriptContext *ctx)
|
||||
u8 *str;
|
||||
const u8 *message;
|
||||
bool32 haveBerry = IsEnigmaBerryValid();
|
||||
u8 *berry = (u8 *)(ScriptReadWord(ctx) - ctx->data[1] + ctx->data[0]);
|
||||
u8 *berry = (u8 *)(ScriptReadWord(ctx) - ctx->mOffset + ctx->mScriptBase);
|
||||
StringCopyN(gStringVar1, gSaveBlock1Ptr->enigmaBerry.berry.name, BERRY_NAME_LENGTH + 1);
|
||||
SetEnigmaBerry(berry);
|
||||
StringCopyN(gStringVar2, gSaveBlock1Ptr->enigmaBerry.berry.name, BERRY_NAME_LENGTH + 1);
|
||||
@@ -244,12 +249,12 @@ bool8 MEScrCmd_setenigmaberry(struct ScriptContext *ctx)
|
||||
|
||||
StringExpandPlaceholders(str, message);
|
||||
|
||||
ctx->data[2] = 2;
|
||||
ctx->mStatus = MEVENT_STATUS_SUCCESS;
|
||||
|
||||
if (IsEnigmaBerryValid() == TRUE)
|
||||
VarSet(VAR_ENIGMA_BERRY_AVAILABLE, 1);
|
||||
else
|
||||
ctx->data[2] = 1;
|
||||
ctx->mStatus = MEVENT_STATUS_LOAD_ERROR;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -260,7 +265,7 @@ bool8 MEScrCmd_giveribbon(struct ScriptContext *ctx)
|
||||
u8 ribbonId = ScriptReadByte(ctx);
|
||||
GiveGiftRibbonToParty(index, ribbonId);
|
||||
StringExpandPlaceholders(gStringVar4, gText_MysteryEventSpecialRibbon);
|
||||
ctx->data[2] = 2;
|
||||
ctx->mStatus = MEVENT_STATUS_SUCCESS;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -269,8 +274,8 @@ bool8 MEScrCmd_initramscript(struct ScriptContext *ctx)
|
||||
u8 mapGroup = ScriptReadByte(ctx);
|
||||
u8 mapNum = ScriptReadByte(ctx);
|
||||
u8 objectId = ScriptReadByte(ctx);
|
||||
u8 *script = (u8 *)(ScriptReadWord(ctx) - ctx->data[1] + ctx->data[0]);
|
||||
u8 *scriptEnd = (u8 *)(ScriptReadWord(ctx) - ctx->data[1] + ctx->data[0]);
|
||||
u8 *script = (u8 *)(ScriptReadWord(ctx) - ctx->mOffset + ctx->mScriptBase);
|
||||
u8 *scriptEnd = (u8 *)(ScriptReadWord(ctx) - ctx->mOffset + ctx->mScriptBase);
|
||||
InitRamScript(script, scriptEnd - script, mapGroup, mapNum, objectId);
|
||||
return FALSE;
|
||||
}
|
||||
@@ -279,7 +284,7 @@ bool8 MEScrCmd_givenationaldex(struct ScriptContext *ctx)
|
||||
{
|
||||
EnableNationalPokedex();
|
||||
StringExpandPlaceholders(gStringVar4, gText_MysteryEventNationalDex);
|
||||
ctx->data[2] = 2;
|
||||
ctx->mStatus = MEVENT_STATUS_SUCCESS;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -287,7 +292,7 @@ bool8 MEScrCmd_addrareword(struct ScriptContext *ctx)
|
||||
{
|
||||
UnlockAdditionalPhrase(ScriptReadByte(ctx));
|
||||
StringExpandPlaceholders(gStringVar4, gText_MysteryEventRareWord);
|
||||
ctx->data[2] = 2;
|
||||
ctx->mStatus = MEVENT_STATUS_SUCCESS;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -306,7 +311,7 @@ bool8 MEScrCmd_givepokemon(struct ScriptContext *ctx)
|
||||
struct Pokemon pokemon;
|
||||
u16 species;
|
||||
u16 heldItem;
|
||||
u32 data = ScriptReadWord(ctx) - ctx->data[1] + ctx->data[0];
|
||||
u32 data = ScriptReadWord(ctx) - ctx->mOffset + ctx->mScriptBase;
|
||||
void *pokemonPtr = (void *)data;
|
||||
void *mailPtr = (void *)(data + sizeof(struct Pokemon));
|
||||
|
||||
@@ -321,7 +326,7 @@ bool8 MEScrCmd_givepokemon(struct ScriptContext *ctx)
|
||||
if (gPlayerPartyCount == PARTY_SIZE)
|
||||
{
|
||||
StringExpandPlaceholders(gStringVar4, gText_MysteryEventFullParty);
|
||||
ctx->data[2] = 3;
|
||||
ctx->mStatus = MEVENT_STATUS_FAILURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -341,7 +346,7 @@ bool8 MEScrCmd_givepokemon(struct ScriptContext *ctx)
|
||||
CompactPartySlots();
|
||||
CalculatePlayerPartyCount();
|
||||
StringExpandPlaceholders(gStringVar4, gText_MysteryEventSentOver);
|
||||
ctx->data[2] = 2;
|
||||
ctx->mStatus = MEVENT_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
@@ -349,11 +354,11 @@ bool8 MEScrCmd_givepokemon(struct ScriptContext *ctx)
|
||||
|
||||
bool8 MEScrCmd_addtrainer(struct ScriptContext *ctx)
|
||||
{
|
||||
u32 data = ScriptReadWord(ctx) - ctx->data[1] + ctx->data[0];
|
||||
u32 data = ScriptReadWord(ctx) - ctx->mOffset + ctx->mScriptBase;
|
||||
memcpy(&gSaveBlock2Ptr->frontier.ereaderTrainer, (void *)data, sizeof(gSaveBlock2Ptr->frontier.ereaderTrainer));
|
||||
ValidateEReaderTrainer();
|
||||
StringExpandPlaceholders(gStringVar4, gText_MysteryEventNewTrainer);
|
||||
ctx->data[2] = 2;
|
||||
ctx->mStatus = MEVENT_STATUS_SUCCESS;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -361,19 +366,19 @@ bool8 MEScrCmd_enableresetrtc(struct ScriptContext *ctx)
|
||||
{
|
||||
EnableResetRTC();
|
||||
StringExpandPlaceholders(gStringVar4, gText_InGameClockUsable);
|
||||
ctx->data[2] = 2;
|
||||
ctx->mStatus = MEVENT_STATUS_SUCCESS;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 MEScrCmd_checksum(struct ScriptContext *ctx)
|
||||
{
|
||||
int checksum = ScriptReadWord(ctx);
|
||||
u8 *data = (u8 *)(ScriptReadWord(ctx) - ctx->data[1] + ctx->data[0]);
|
||||
u8 *dataEnd = (u8 *)(ScriptReadWord(ctx) - ctx->data[1] + ctx->data[0]);
|
||||
u8 *data = (u8 *)(ScriptReadWord(ctx) - ctx->mOffset + ctx->mScriptBase);
|
||||
u8 *dataEnd = (u8 *)(ScriptReadWord(ctx) - ctx->mOffset + ctx->mScriptBase);
|
||||
if (checksum != CalcByteArraySum(data, dataEnd - data))
|
||||
{
|
||||
ctx->data[3] = 0;
|
||||
ctx->data[2] = 1;
|
||||
ctx->mValid = FALSE;
|
||||
ctx->mStatus = MEVENT_STATUS_LOAD_ERROR;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
@@ -381,12 +386,12 @@ bool8 MEScrCmd_checksum(struct ScriptContext *ctx)
|
||||
bool8 MEScrCmd_crc(struct ScriptContext *ctx)
|
||||
{
|
||||
int crc = ScriptReadWord(ctx);
|
||||
u8 *data = (u8 *)(ScriptReadWord(ctx) - ctx->data[1] + ctx->data[0]);
|
||||
u8 *dataEnd = (u8 *)(ScriptReadWord(ctx) - ctx->data[1] + ctx->data[0]);
|
||||
u8 *data = (u8 *)(ScriptReadWord(ctx) - ctx->mOffset + ctx->mScriptBase);
|
||||
u8 *dataEnd = (u8 *)(ScriptReadWord(ctx) - ctx->mOffset + ctx->mScriptBase);
|
||||
if (crc != CalcCRC16(data, dataEnd - data))
|
||||
{
|
||||
ctx->data[3] = 0;
|
||||
ctx->data[2] = 1;
|
||||
ctx->mValid = FALSE;
|
||||
ctx->mStatus = MEVENT_STATUS_LOAD_ERROR;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
48
src/scrcmd.c
48
src/scrcmd.c
@@ -286,7 +286,7 @@ bool8 ScrCmd_returnram(struct ScriptContext *ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 ScrCmd_killscript(struct ScriptContext *ctx)
|
||||
bool8 ScrCmd_endram(struct ScriptContext *ctx)
|
||||
{
|
||||
ClearRamScript();
|
||||
StopScript(ctx);
|
||||
@@ -295,9 +295,9 @@ bool8 ScrCmd_killscript(struct ScriptContext *ctx)
|
||||
|
||||
bool8 ScrCmd_setmysteryeventstatus(struct ScriptContext *ctx)
|
||||
{
|
||||
u8 value = ScriptReadByte(ctx);
|
||||
u8 status = ScriptReadByte(ctx);
|
||||
|
||||
SetMysteryEventScriptStatus(value);
|
||||
SetMysteryEventScriptStatus(status);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -309,7 +309,7 @@ bool8 ScrCmd_loadword(struct ScriptContext *ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 ScrCmd_loadbytefromaddr(struct ScriptContext *ctx)
|
||||
bool8 ScrCmd_loadbytefromptr(struct ScriptContext *ctx)
|
||||
{
|
||||
u8 index = ScriptReadByte(ctx);
|
||||
|
||||
@@ -317,7 +317,7 @@ bool8 ScrCmd_loadbytefromaddr(struct ScriptContext *ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 ScrCmd_writebytetoaddr(struct ScriptContext *ctx)
|
||||
bool8 ScrCmd_setptr(struct ScriptContext *ctx)
|
||||
{
|
||||
u8 value = ScriptReadByte(ctx);
|
||||
|
||||
@@ -405,7 +405,7 @@ bool8 ScrCmd_compare_local_to_value(struct ScriptContext *ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 ScrCmd_compare_local_to_addr(struct ScriptContext *ctx)
|
||||
bool8 ScrCmd_compare_local_to_ptr(struct ScriptContext *ctx)
|
||||
{
|
||||
const u8 value1 = ctx->data[ScriptReadByte(ctx)];
|
||||
const u8 value2 = *(const u8 *)ScriptReadWord(ctx);
|
||||
@@ -414,7 +414,7 @@ bool8 ScrCmd_compare_local_to_addr(struct ScriptContext *ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 ScrCmd_compare_addr_to_local(struct ScriptContext *ctx)
|
||||
bool8 ScrCmd_compare_ptr_to_local(struct ScriptContext *ctx)
|
||||
{
|
||||
const u8 value1 = *(const u8 *)ScriptReadWord(ctx);
|
||||
const u8 value2 = ctx->data[ScriptReadByte(ctx)];
|
||||
@@ -423,7 +423,7 @@ bool8 ScrCmd_compare_addr_to_local(struct ScriptContext *ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 ScrCmd_compare_addr_to_value(struct ScriptContext *ctx)
|
||||
bool8 ScrCmd_compare_ptr_to_value(struct ScriptContext *ctx)
|
||||
{
|
||||
const u8 value1 = *(const u8 *)ScriptReadWord(ctx);
|
||||
const u8 value2 = ScriptReadByte(ctx);
|
||||
@@ -432,7 +432,7 @@ bool8 ScrCmd_compare_addr_to_value(struct ScriptContext *ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 ScrCmd_compare_addr_to_addr(struct ScriptContext *ctx)
|
||||
bool8 ScrCmd_compare_ptr_to_ptr(struct ScriptContext *ctx)
|
||||
{
|
||||
const u8 value1 = *(const u8 *)ScriptReadWord(ctx);
|
||||
const u8 value2 = *(const u8 *)ScriptReadWord(ctx);
|
||||
@@ -646,17 +646,17 @@ bool8 ScrCmd_fadescreenswapbuffers(struct ScriptContext *ctx)
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
case FADE_TO_BLACK:
|
||||
case FADE_TO_WHITE:
|
||||
default:
|
||||
CpuCopy32(gPlttBufferUnfaded, gPaletteDecompressionBuffer, PLTT_DECOMP_BUFFER_SIZE);
|
||||
FadeScreen(mode, 0);
|
||||
break;
|
||||
case FADE_FROM_BLACK:
|
||||
case FADE_FROM_WHITE:
|
||||
CpuCopy32(gPaletteDecompressionBuffer, gPlttBufferUnfaded, PLTT_DECOMP_BUFFER_SIZE);
|
||||
FadeScreen(mode, 0);
|
||||
break;
|
||||
case FADE_TO_BLACK:
|
||||
case FADE_TO_WHITE:
|
||||
default:
|
||||
CpuCopy32(gPlttBufferUnfaded, gPaletteDecompressionBuffer, PLTT_DECOMP_BUFFER_SIZE);
|
||||
FadeScreen(mode, 0);
|
||||
break;
|
||||
case FADE_FROM_BLACK:
|
||||
case FADE_FROM_WHITE:
|
||||
CpuCopy32(gPaletteDecompressionBuffer, gPlttBufferUnfaded, PLTT_DECOMP_BUFFER_SIZE);
|
||||
FadeScreen(mode, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
SetupNativeScript(ctx, IsPaletteNotActive);
|
||||
@@ -1653,7 +1653,7 @@ bool8 ScrCmd_bufferstring(struct ScriptContext *ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 ScrCmd_vloadword(struct ScriptContext *ctx)
|
||||
bool8 ScrCmd_vbuffermessage(struct ScriptContext *ctx)
|
||||
{
|
||||
const u8 *ptr = (u8 *)(ScriptReadWord(ctx) - sAddressOffset);
|
||||
|
||||
@@ -2227,7 +2227,7 @@ bool8 ScrCmd_checkmoneventlegal(struct ScriptContext *ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 ScrCmd_gotowondercardscript(struct ScriptContext *ctx)
|
||||
bool8 ScrCmd_trywondercardscript(struct ScriptContext *ctx)
|
||||
{
|
||||
const u8* script = GetSavedRamScriptIfValid();
|
||||
|
||||
@@ -2295,7 +2295,7 @@ void SetMovingNpcId(u16 npcId)
|
||||
sMovingNpcId = npcId;
|
||||
}
|
||||
|
||||
bool8 ScrCmd_warpsootopolislegend(struct ScriptContext *ctx)
|
||||
bool8 ScrCmd_warpwhitefade(struct ScriptContext *ctx)
|
||||
{
|
||||
u8 mapGroup = ScriptReadByte(ctx);
|
||||
u8 mapNum = ScriptReadByte(ctx);
|
||||
@@ -2304,7 +2304,7 @@ bool8 ScrCmd_warpsootopolislegend(struct ScriptContext *ctx)
|
||||
u16 y = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
SetWarpDestination(mapGroup, mapNum, warpId, x, y);
|
||||
DoSootopolisLegendWarp();
|
||||
DoWhiteFadeWarp();
|
||||
ResetInitialPlayerAvatarState();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user