bool8 ScrCmd_comparevars(struct ScriptContext *ctx) { u16 *ptr1 = GetVarPointer(ScriptReadHalfword(ctx)); u16 *ptr2 = GetVarPointer(ScriptReadHalfword(ctx)); ctx->comparisonResult = compare_012(*ptr1, *ptr2); return FALSE; }
bool8 ScrCmd_getplayerxy(struct ScriptContext *ctx) { u16 *ptr1 = GetVarPointer(ScriptReadHalfword(ctx)); u16 *ptr2 = GetVarPointer(ScriptReadHalfword(ctx)); *ptr1 = gSaveBlock1.pos.x; *ptr2 = gSaveBlock1.pos.y; return FALSE; }
bool8 ScrCmd_compare(struct ScriptContext *ctx) { u16 value1 = *GetVarPointer(ScriptReadHalfword(ctx)); u16 value2 = ScriptReadHalfword(ctx); ctx->comparisonResult = compare_012(value1, value2); return FALSE; }
static void CB2_GiveStarter(void) { u16 starterPoke; *GetVarPointer(VAR_STARTER_MON) = gSpecialVar_Result; starterPoke = GetStarterPokemon(gSpecialVar_Result); ScriptGiveMon(starterPoke, 5, 0, 0, 0, 0); ResetTasks(); sub_80408BC(); SetMainCallback2(CB2_StartFirstBattle); BattleTransition_Start(0); }
bool8 ScrCmd_subvar(struct ScriptContext *ctx) { u16 *ptr = GetVarPointer(ScriptReadHalfword(ctx)); *ptr -= VarGet(ScriptReadHalfword(ctx)); return FALSE; }
bool8 ScrCmd_addvar(struct ScriptContext *ctx) { u16 *ptr = GetVarPointer(ScriptReadHalfword(ctx)); *ptr += ScriptReadHalfword(ctx); return FALSE; }
bool8 ScrCmd_specialval(struct ScriptContext *ctx) { u16 *var = GetVarPointer(ScriptReadHalfword(ctx)); *var = gSpecials[ScriptReadHalfword(ctx)](); return FALSE; }
bool8 ScrCmd_checkcoins(struct ScriptContext *ctx) { u16 *ptr = GetVarPointer(ScriptReadHalfword(ctx)); *ptr = GetCoins(); return FALSE; }