예제 #1
0
파일: scrcmd.c 프로젝트: pret/pokeruby
bool8 ScrCmd_comparevars(struct ScriptContext *ctx)
{
    u16 *ptr1 = GetVarPointer(ScriptReadHalfword(ctx));
    u16 *ptr2 = GetVarPointer(ScriptReadHalfword(ctx));
    ctx->comparisonResult = compare_012(*ptr1, *ptr2);
    return FALSE;
}
예제 #2
0
파일: scrcmd.c 프로젝트: pret/pokeruby
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;
}
예제 #3
0
파일: scrcmd.c 프로젝트: pret/pokeruby
bool8 ScrCmd_compare(struct ScriptContext *ctx)
{
    u16 value1 = *GetVarPointer(ScriptReadHalfword(ctx));
    u16 value2 = ScriptReadHalfword(ctx);
    ctx->comparisonResult = compare_012(value1, value2);
    return FALSE;
}
예제 #4
0
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);
}
예제 #5
0
파일: scrcmd.c 프로젝트: pret/pokeruby
bool8 ScrCmd_subvar(struct ScriptContext *ctx)
{
    u16 *ptr = GetVarPointer(ScriptReadHalfword(ctx));
    *ptr -= VarGet(ScriptReadHalfword(ctx));
    return FALSE;
}
예제 #6
0
파일: scrcmd.c 프로젝트: pret/pokeruby
bool8 ScrCmd_addvar(struct ScriptContext *ctx)
{
    u16 *ptr = GetVarPointer(ScriptReadHalfword(ctx));
    *ptr += ScriptReadHalfword(ctx);
    return FALSE;
}
예제 #7
0
파일: scrcmd.c 프로젝트: pret/pokeruby
bool8 ScrCmd_specialval(struct ScriptContext *ctx)
{
    u16 *var = GetVarPointer(ScriptReadHalfword(ctx));
    *var = gSpecials[ScriptReadHalfword(ctx)]();
    return FALSE;
}
예제 #8
0
파일: scrcmd.c 프로젝트: pret/pokeruby
bool8 ScrCmd_checkcoins(struct ScriptContext *ctx)
{
    u16 *ptr = GetVarPointer(ScriptReadHalfword(ctx));
    *ptr = GetCoins();
    return FALSE;
}