Replaced all usages of tabs in C files with spaces (#5261)
Co-authored-by: Hedara <hedara90@gmail.com>
This commit is contained in:
parent
a9f31dcc4f
commit
74c309e2b0
25 changed files with 1792 additions and 1792 deletions
|
@ -71,11 +71,11 @@ void GetAIPartyIndexes(u32 battler, s32 *firstId, s32 *lastId)
|
|||
static bool32 HasBadOdds(u32 battler, bool32 emitResult)
|
||||
{
|
||||
//Variable initialization
|
||||
u8 opposingPosition, atkType1, atkType2, defType1, defType2, effectiveness;
|
||||
u8 opposingPosition, atkType1, atkType2, defType1, defType2, effectiveness;
|
||||
s32 i, damageDealt = 0, maxDamageDealt = 0, damageTaken = 0, maxDamageTaken = 0;
|
||||
u32 aiMove, playerMove, aiBestMove = MOVE_NONE, aiAbility = AI_DATA->abilities[battler], opposingBattler, weather = AI_GetWeather(AI_DATA);
|
||||
bool32 getsOneShot = FALSE, hasStatusMove = FALSE, hasSuperEffectiveMove = FALSE;
|
||||
u16 typeEffectiveness = UQ_4_12(1.0), aiMoveEffect; //baseline typing damage
|
||||
u16 typeEffectiveness = UQ_4_12(1.0), aiMoveEffect; //baseline typing damage
|
||||
|
||||
// Only use this if AI_FLAG_SMART_SWITCHING is set for the trainer
|
||||
if (!(AI_THINKING_STRUCT->aiFlags[battler] & AI_FLAG_SMART_SWITCHING))
|
||||
|
@ -85,14 +85,14 @@ static bool32 HasBadOdds(u32 battler, bool32 emitResult)
|
|||
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
|
||||
return FALSE;
|
||||
|
||||
opposingPosition = BATTLE_OPPOSITE(GetBattlerPosition(battler));
|
||||
opposingPosition = BATTLE_OPPOSITE(GetBattlerPosition(battler));
|
||||
opposingBattler = GetBattlerAtPosition(opposingPosition);
|
||||
|
||||
// Gets types of player (opposingBattler) and computer (battler)
|
||||
atkType1 = gBattleMons[opposingBattler].types[0];
|
||||
atkType2 = gBattleMons[opposingBattler].types[1];
|
||||
defType1 = gBattleMons[battler].types[0];
|
||||
defType2 = gBattleMons[battler].types[1];
|
||||
atkType1 = gBattleMons[opposingBattler].types[0];
|
||||
atkType2 = gBattleMons[opposingBattler].types[1];
|
||||
defType1 = gBattleMons[battler].types[0];
|
||||
defType2 = gBattleMons[battler].types[1];
|
||||
|
||||
// Check AI moves for damage dealt
|
||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||
|
@ -191,13 +191,13 @@ static bool32 HasBadOdds(u32 battler, bool32 emitResult)
|
|||
}
|
||||
|
||||
// General bad type matchups have more wiggle room
|
||||
if (typeEffectiveness >= UQ_4_12(2.0)) // If the player has at least a 2x type advantage
|
||||
{
|
||||
if (!hasSuperEffectiveMove // If the AI doesn't have a super effective move
|
||||
&& (gBattleMons[battler].hp >= gBattleMons[battler].maxHP / 2 // And the current mon has at least 1/2 their HP, or 1/4 HP and Regenerator
|
||||
if (typeEffectiveness >= UQ_4_12(2.0)) // If the player has at least a 2x type advantage
|
||||
{
|
||||
if (!hasSuperEffectiveMove // If the AI doesn't have a super effective move
|
||||
&& (gBattleMons[battler].hp >= gBattleMons[battler].maxHP / 2 // And the current mon has at least 1/2 their HP, or 1/4 HP and Regenerator
|
||||
|| (aiAbility == ABILITY_REGENERATOR
|
||||
&& gBattleMons[battler].hp >= gBattleMons[battler].maxHP / 4)))
|
||||
{
|
||||
{
|
||||
// Then check if they have an important status move, which is worth using even in a bad matchup
|
||||
if (hasStatusMove)
|
||||
return FALSE;
|
||||
|
@ -207,13 +207,13 @@ static bool32 HasBadOdds(u32 battler, bool32 emitResult)
|
|||
return FALSE;
|
||||
|
||||
// Switch mon out
|
||||
gBattleStruct->AI_monToSwitchIntoId[battler] = PARTY_SIZE;
|
||||
if (emitResult)
|
||||
gBattleStruct->AI_monToSwitchIntoId[battler] = PARTY_SIZE;
|
||||
if (emitResult)
|
||||
BtlController_EmitTwoReturnValues(battler, 1, B_ACTION_SWITCH, 0);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static bool32 ShouldSwitchIfAllBadMoves(u32 battler, bool32 emitResult)
|
||||
|
|
|
@ -2197,7 +2197,7 @@ bool32 IsAttackBoostMoveEffect(u32 effect)
|
|||
switch (effect)
|
||||
{
|
||||
case EFFECT_ATTACK_UP:
|
||||
case EFFECT_ATTACK_UP_2:
|
||||
case EFFECT_ATTACK_UP_2:
|
||||
case EFFECT_ATTACK_ACCURACY_UP:
|
||||
case EFFECT_ATTACK_SPATK_UP:
|
||||
case EFFECT_DRAGON_DANCE:
|
||||
|
@ -2217,34 +2217,34 @@ bool32 IsStatRaisingEffect(u32 effect)
|
|||
switch (effect)
|
||||
{
|
||||
case EFFECT_ATTACK_UP:
|
||||
case EFFECT_ATTACK_UP_2:
|
||||
case EFFECT_DEFENSE_UP:
|
||||
case EFFECT_DEFENSE_UP_2:
|
||||
case EFFECT_ATTACK_UP_2:
|
||||
case EFFECT_DEFENSE_UP:
|
||||
case EFFECT_DEFENSE_UP_2:
|
||||
case EFFECT_DEFENSE_UP_3:
|
||||
case EFFECT_SPEED_UP:
|
||||
case EFFECT_SPEED_UP_2:
|
||||
case EFFECT_SPECIAL_ATTACK_UP:
|
||||
case EFFECT_SPECIAL_ATTACK_UP_2:
|
||||
case EFFECT_SPEED_UP:
|
||||
case EFFECT_SPEED_UP_2:
|
||||
case EFFECT_SPECIAL_ATTACK_UP:
|
||||
case EFFECT_SPECIAL_ATTACK_UP_2:
|
||||
case EFFECT_SPECIAL_ATTACK_UP_3:
|
||||
case EFFECT_SPECIAL_DEFENSE_UP:
|
||||
case EFFECT_SPECIAL_DEFENSE_UP_2:
|
||||
case EFFECT_SPECIAL_DEFENSE_UP:
|
||||
case EFFECT_SPECIAL_DEFENSE_UP_2:
|
||||
case EFFECT_ACCURACY_UP:
|
||||
case EFFECT_ACCURACY_UP_2:
|
||||
case EFFECT_EVASION_UP:
|
||||
case EFFECT_EVASION_UP_2:
|
||||
case EFFECT_MINIMIZE:
|
||||
case EFFECT_DEFENSE_CURL:
|
||||
case EFFECT_CALM_MIND:
|
||||
case EFFECT_CALM_MIND:
|
||||
case EFFECT_COSMIC_POWER:
|
||||
case EFFECT_DRAGON_DANCE:
|
||||
case EFFECT_ACUPRESSURE:
|
||||
case EFFECT_SHELL_SMASH:
|
||||
case EFFECT_SHIFT_GEAR:
|
||||
case EFFECT_ATTACK_ACCURACY_UP:
|
||||
case EFFECT_ATTACK_SPATK_UP:
|
||||
case EFFECT_GROWTH:
|
||||
case EFFECT_COIL:
|
||||
case EFFECT_QUIVER_DANCE:
|
||||
case EFFECT_DRAGON_DANCE:
|
||||
case EFFECT_ACUPRESSURE:
|
||||
case EFFECT_SHELL_SMASH:
|
||||
case EFFECT_SHIFT_GEAR:
|
||||
case EFFECT_ATTACK_ACCURACY_UP:
|
||||
case EFFECT_ATTACK_SPATK_UP:
|
||||
case EFFECT_GROWTH:
|
||||
case EFFECT_COIL:
|
||||
case EFFECT_QUIVER_DANCE:
|
||||
case EFFECT_BULK_UP:
|
||||
case EFFECT_GEOMANCY:
|
||||
case EFFECT_STOCKPILE:
|
||||
|
|
|
@ -627,36 +627,36 @@ static void AnimOverheatFlame_Step(struct Sprite *sprite)
|
|||
|
||||
void AnimDracoMeteorRock(struct Sprite *sprite)
|
||||
{
|
||||
if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER)
|
||||
{
|
||||
sprite->data[0] = sprite->x - gBattleAnimArgs[0];
|
||||
sprite->data[2] = sprite->x - gBattleAnimArgs[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite->data[0] = sprite->x + gBattleAnimArgs[0];
|
||||
sprite->data[2] = sprite->x + gBattleAnimArgs[2];
|
||||
}
|
||||
if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER)
|
||||
{
|
||||
sprite->data[0] = sprite->x - gBattleAnimArgs[0];
|
||||
sprite->data[2] = sprite->x - gBattleAnimArgs[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite->data[0] = sprite->x + gBattleAnimArgs[0];
|
||||
sprite->data[2] = sprite->x + gBattleAnimArgs[2];
|
||||
}
|
||||
|
||||
sprite->data[1] = sprite->y + gBattleAnimArgs[1];
|
||||
sprite->data[3] = sprite->y + gBattleAnimArgs[3];
|
||||
sprite->data[4] = gBattleAnimArgs[4];
|
||||
sprite->data[1] = sprite->y + gBattleAnimArgs[1];
|
||||
sprite->data[3] = sprite->y + gBattleAnimArgs[3];
|
||||
sprite->data[4] = gBattleAnimArgs[4];
|
||||
|
||||
sprite->data[6] = gBattleAnimArgs[2];
|
||||
sprite->data[7] = gBattleAnimArgs[3];
|
||||
sprite->data[6] = gBattleAnimArgs[2];
|
||||
sprite->data[7] = gBattleAnimArgs[3];
|
||||
|
||||
sprite->x = sprite->data[0];
|
||||
sprite->y = sprite->data[1];
|
||||
sprite->callback = AnimDracoMeteorRock_Step;
|
||||
sprite->x = sprite->data[0];
|
||||
sprite->y = sprite->data[1];
|
||||
sprite->callback = AnimDracoMeteorRock_Step;
|
||||
}
|
||||
|
||||
static void AnimDracoMeteorRock_Step(struct Sprite *sprite)
|
||||
{
|
||||
sprite->x2 = ((sprite->data[2] - sprite->data[0]) * sprite->data[5]) / sprite->data[4];
|
||||
sprite->y2 = ((sprite->data[3] - sprite->data[1]) * sprite->data[5]) / sprite->data[4];
|
||||
sprite->x2 = ((sprite->data[2] - sprite->data[0]) * sprite->data[5]) / sprite->data[4];
|
||||
sprite->y2 = ((sprite->data[3] - sprite->data[1]) * sprite->data[5]) / sprite->data[4];
|
||||
|
||||
if (sprite->data[5] == sprite->data[4])
|
||||
DestroyAnimSprite(sprite);
|
||||
if (sprite->data[5] == sprite->data[4])
|
||||
DestroyAnimSprite(sprite);
|
||||
|
||||
sprite->data[5]++;
|
||||
sprite->data[5]++;
|
||||
}
|
||||
|
|
|
@ -2535,13 +2535,13 @@ const struct SpriteTemplate gTauntFingerSpriteTemplate =
|
|||
|
||||
const struct SpriteTemplate gPowerOrbs_Float =
|
||||
{
|
||||
.tileTag = ANIM_TAG_RED_ORB,
|
||||
.paletteTag = ANIM_TAG_RED_ORB,
|
||||
.oam = &gOamData_AffineOff_ObjNormal_16x16,
|
||||
.anims = gSporeParticleAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = AnimSporeParticle,
|
||||
.tileTag = ANIM_TAG_RED_ORB,
|
||||
.paletteTag = ANIM_TAG_RED_ORB,
|
||||
.oam = &gOamData_AffineOff_ObjNormal_16x16,
|
||||
.anims = gSporeParticleAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = AnimSporeParticle,
|
||||
};
|
||||
|
||||
const union AnimCmd gRockPolishStreak_AnimCmd[] =
|
||||
|
@ -7234,42 +7234,42 @@ static void AnimNightSlash(struct Sprite *sprite)
|
|||
|
||||
static const union AffineAnimCmd sCompressTargetHorizontallyAffineAnimCmds[] =
|
||||
{
|
||||
AFFINEANIMCMD_FRAME(64, 0, 0, 16), //Compress
|
||||
AFFINEANIMCMD_FRAME(0, 0, 0, 64),
|
||||
AFFINEANIMCMD_FRAME(-64, 0, 0, 16),
|
||||
AFFINEANIMCMD_END,
|
||||
AFFINEANIMCMD_FRAME(64, 0, 0, 16), //Compress
|
||||
AFFINEANIMCMD_FRAME(0, 0, 0, 64),
|
||||
AFFINEANIMCMD_FRAME(-64, 0, 0, 16),
|
||||
AFFINEANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd sCompressTargetHorizontallyAffineAnimCmdsFast[] =
|
||||
{
|
||||
AFFINEANIMCMD_FRAME(32, 0, 0, 16), //Compress
|
||||
AFFINEANIMCMD_FRAME(0, 0, 0, 32),
|
||||
AFFINEANIMCMD_FRAME(-32, 0, 0, 16),
|
||||
AFFINEANIMCMD_END,
|
||||
AFFINEANIMCMD_FRAME(32, 0, 0, 16), //Compress
|
||||
AFFINEANIMCMD_FRAME(0, 0, 0, 32),
|
||||
AFFINEANIMCMD_FRAME(-32, 0, 0, 16),
|
||||
AFFINEANIMCMD_END,
|
||||
};
|
||||
|
||||
static void AnimTask_CompressTargetStep(u8 taskId)
|
||||
{
|
||||
struct Task* task = &gTasks[taskId];
|
||||
struct Task* task = &gTasks[taskId];
|
||||
|
||||
if (!RunAffineAnimFromTaskData(task))
|
||||
DestroyAnimVisualTask(taskId);
|
||||
if (!RunAffineAnimFromTaskData(task))
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
||||
void AnimTask_CompressTargetHorizontally(u8 taskId)
|
||||
{
|
||||
struct Task* task = &gTasks[taskId];
|
||||
u8 spriteId = GetAnimBattlerSpriteId(ANIM_TARGET);
|
||||
PrepareAffineAnimInTaskData(task, spriteId, sCompressTargetHorizontallyAffineAnimCmds);
|
||||
task->func = AnimTask_CompressTargetStep;
|
||||
struct Task* task = &gTasks[taskId];
|
||||
u8 spriteId = GetAnimBattlerSpriteId(ANIM_TARGET);
|
||||
PrepareAffineAnimInTaskData(task, spriteId, sCompressTargetHorizontallyAffineAnimCmds);
|
||||
task->func = AnimTask_CompressTargetStep;
|
||||
}
|
||||
|
||||
void AnimTask_CompressTargetHorizontallyFast(u8 taskId)
|
||||
{
|
||||
struct Task* task = &gTasks[taskId];
|
||||
u8 spriteId = GetAnimBattlerSpriteId(ANIM_TARGET);
|
||||
PrepareAffineAnimInTaskData(task, spriteId, sCompressTargetHorizontallyAffineAnimCmdsFast);
|
||||
task->func = AnimTask_CompressTargetStep;
|
||||
struct Task* task = &gTasks[taskId];
|
||||
u8 spriteId = GetAnimBattlerSpriteId(ANIM_TARGET);
|
||||
PrepareAffineAnimInTaskData(task, spriteId, sCompressTargetHorizontallyAffineAnimCmdsFast);
|
||||
task->func = AnimTask_CompressTargetStep;
|
||||
}
|
||||
|
||||
void AnimTask_CreateSmallSteelBeamOrbs(u8 taskId)
|
||||
|
|
|
@ -525,17 +525,17 @@ const struct SpriteTemplate gFlashCannonGrayChargeTemplate =
|
|||
|
||||
static const union AffineAnimCmd sSpriteAffineAnim_JudgmentBall[] =
|
||||
{
|
||||
AFFINEANIMCMD_FRAME(16, 16, 0, 0),
|
||||
AFFINEANIMCMD_FRAME(8, 8, 0, 15), //Half size
|
||||
AFFINEANIMCMD_FRAME(0, 0, 0, 120), //Delay
|
||||
AFFINEANIMCMD_FRAME(24, 24, 0, 5), //Normal size
|
||||
AFFINEANIMCMD_FRAME(0, 0, 0, 10), //Delay
|
||||
AFFINEANIMCMD_FRAME(-16, -16, 0, 15), //Revert to 1 px
|
||||
AFFINEANIMCMD_END,
|
||||
AFFINEANIMCMD_FRAME(16, 16, 0, 0),
|
||||
AFFINEANIMCMD_FRAME(8, 8, 0, 15), //Half size
|
||||
AFFINEANIMCMD_FRAME(0, 0, 0, 120), //Delay
|
||||
AFFINEANIMCMD_FRAME(24, 24, 0, 5), //Normal size
|
||||
AFFINEANIMCMD_FRAME(0, 0, 0, 10), //Delay
|
||||
AFFINEANIMCMD_FRAME(-16, -16, 0, 15), //Revert to 1 px
|
||||
AFFINEANIMCMD_END,
|
||||
};
|
||||
static const union AffineAnimCmd* const sSpriteAffineAnimTable_JudgmentBall[] =
|
||||
{
|
||||
sSpriteAffineAnim_JudgmentBall,
|
||||
sSpriteAffineAnim_JudgmentBall,
|
||||
};
|
||||
const struct SpriteTemplate gJudgmentBlackChargeTemplate =
|
||||
{
|
||||
|
|
|
@ -403,24 +403,24 @@ const struct SpriteTemplate gFocusPunchFistSpriteTemplate =
|
|||
|
||||
const struct SpriteTemplate gPalmSpriteTemplate =
|
||||
{
|
||||
.tileTag = ANIM_TAG_PURPLE_HAND_OUTLINE,
|
||||
.paletteTag = ANIM_TAG_PURPLE_HAND_OUTLINE,
|
||||
.oam = &gOamData_AffineOff_ObjNormal_32x32,
|
||||
.anims = gAnims_HandsAndFeet,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = AnimBasicFistOrFoot,
|
||||
.tileTag = ANIM_TAG_PURPLE_HAND_OUTLINE,
|
||||
.paletteTag = ANIM_TAG_PURPLE_HAND_OUTLINE,
|
||||
.oam = &gOamData_AffineOff_ObjNormal_32x32,
|
||||
.anims = gAnims_HandsAndFeet,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = AnimBasicFistOrFoot,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gAuraSphereBlast =
|
||||
{
|
||||
.tileTag = ANIM_TAG_CIRCLE_OF_LIGHT,
|
||||
.paletteTag = ANIM_TAG_CIRCLE_OF_LIGHT,
|
||||
.oam = &gOamData_AffineOff_ObjNormal_64x64,
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = AnimSuperpowerFireball,
|
||||
.tileTag = ANIM_TAG_CIRCLE_OF_LIGHT,
|
||||
.paletteTag = ANIM_TAG_CIRCLE_OF_LIGHT,
|
||||
.oam = &gOamData_AffineOff_ObjNormal_64x64,
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = AnimSuperpowerFireball,
|
||||
};
|
||||
|
||||
const union AffineAnimCmd gForcePalmAffineAnimCmd_1[] =
|
||||
|
|
|
@ -530,13 +530,13 @@ const struct SpriteTemplate gSpacialRendBladesTemplate2 =
|
|||
// Sea of Fire
|
||||
const struct SpriteTemplate gTwisterEmberSpriteTemplate =
|
||||
{
|
||||
.tileTag = ANIM_TAG_SMALL_EMBER,
|
||||
.paletteTag = ANIM_TAG_SMALL_EMBER,
|
||||
.oam = &gOamData_AffineOff_ObjNormal_32x32,
|
||||
.anims = gAnims_BasicFire,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = AnimMoveTwisterParticle,
|
||||
.tileTag = ANIM_TAG_SMALL_EMBER,
|
||||
.paletteTag = ANIM_TAG_SMALL_EMBER,
|
||||
.oam = &gOamData_AffineOff_ObjNormal_32x32,
|
||||
.anims = gAnims_BasicFire,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = AnimMoveTwisterParticle,
|
||||
};
|
||||
|
||||
static void AnimLavaPlumeOrbitScatter(struct Sprite *sprite)
|
||||
|
|
|
@ -527,7 +527,7 @@ void AnimFlyBallAttack(struct Sprite *sprite)
|
|||
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2);
|
||||
sprite->data[3] = sprite->y;
|
||||
sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET);
|
||||
sprite->data[5] = gBattleAnimArgs[1]; // if sprite is to remain invisible
|
||||
sprite->data[5] = gBattleAnimArgs[1]; // if sprite is to remain invisible
|
||||
|
||||
InitAnimLinearTranslation(sprite);
|
||||
sprite->callback = AnimFlyBallAttack_Step;
|
||||
|
|
|
@ -730,13 +730,13 @@ static void AnimTask_DuckDownHop_Step1(u8 taskId)
|
|||
{
|
||||
u8 spriteId;
|
||||
|
||||
spriteId = gTasks[taskId].data[0];
|
||||
gTasks[taskId].data[12] += gTasks[taskId].data[5];
|
||||
gSprites[spriteId].y2 = (gTasks[taskId].data[12] >> 8);
|
||||
if (--gTasks[taskId].data[6] == 0)
|
||||
{
|
||||
spriteId = gTasks[taskId].data[0];
|
||||
gTasks[taskId].data[12] += gTasks[taskId].data[5];
|
||||
gSprites[spriteId].y2 = (gTasks[taskId].data[12] >> 8);
|
||||
if (--gTasks[taskId].data[6] == 0)
|
||||
{
|
||||
gTasks[taskId].func = AnimTask_DuckDownHop_Step2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void AnimTask_DuckDownHop_Step2(u8 taskId)
|
||||
|
@ -748,11 +748,11 @@ static void AnimTask_DuckDownHop_Step2(u8 taskId)
|
|||
}
|
||||
else
|
||||
{
|
||||
spriteId = gTasks[taskId].data[0];
|
||||
gTasks[taskId].data[11] += gTasks[taskId].data[1];
|
||||
gSprites[spriteId].x2 = gTasks[taskId].data[11] >> 8;
|
||||
gSprites[spriteId].y2 = Sin((u8)(gTasks[taskId].data[10] >> 8), gTasks[taskId].data[2]) + (gTasks[taskId].data[12] >> 8);
|
||||
gTasks[taskId].data[10] += gTasks[taskId].data[7];
|
||||
spriteId = gTasks[taskId].data[0];
|
||||
gTasks[taskId].data[11] += gTasks[taskId].data[1];
|
||||
gSprites[spriteId].x2 = gTasks[taskId].data[11] >> 8;
|
||||
gSprites[spriteId].y2 = Sin((u8)(gTasks[taskId].data[10] >> 8), gTasks[taskId].data[2]) + (gTasks[taskId].data[12] >> 8);
|
||||
gTasks[taskId].data[10] += gTasks[taskId].data[7];
|
||||
if (--gTasks[taskId].data[3] == 0)
|
||||
{
|
||||
DestroyAnimVisualTask(taskId);
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -830,7 +830,7 @@ void AnimTask_InvertScreenColor(u8 taskId)
|
|||
selectedPalettes |= (0x10000 << gBattleAnimTarget);
|
||||
if (gBattleAnimArgs[0] & 0x8 && IsBattlerAlive(BATTLE_PARTNER(gBattleAnimTarget)))
|
||||
selectedPalettes |= (0x10000 << BATTLE_PARTNER(gBattleAnimTarget));
|
||||
if (gBattleAnimArgs[0] & 0x10 && IsBattlerAlive(BATTLE_PARTNER(gBattleAnimAttacker)))
|
||||
if (gBattleAnimArgs[0] & 0x10 && IsBattlerAlive(BATTLE_PARTNER(gBattleAnimAttacker)))
|
||||
selectedPalettes |= (0x10000 << BATTLE_PARTNER(gBattleAnimAttacker));
|
||||
|
||||
InvertPlttBuffer(selectedPalettes);
|
||||
|
|
|
@ -182,24 +182,24 @@ const struct SpriteTemplate gWaterBubbleSpriteTemplate =
|
|||
|
||||
const struct SpriteTemplate gGreenPoisonDrip =
|
||||
{
|
||||
.tileTag = ANIM_TAG_GREEN_POISON_BUBBLE,
|
||||
.paletteTag = ANIM_TAG_GREEN_POISON_BUBBLE,
|
||||
.oam = &gOamData_AffineDouble_ObjNormal_16x16,
|
||||
.tileTag = ANIM_TAG_GREEN_POISON_BUBBLE,
|
||||
.paletteTag = ANIM_TAG_GREEN_POISON_BUBBLE,
|
||||
.oam = &gOamData_AffineDouble_ObjNormal_16x16,
|
||||
.anims = &gAnims_PoisonProjectile[1],
|
||||
.images = NULL,
|
||||
.affineAnims = gAffineAnims_Droplet,
|
||||
.callback = AnimAcidPoisonDroplet,
|
||||
.images = NULL,
|
||||
.affineAnims = gAffineAnims_Droplet,
|
||||
.callback = AnimAcidPoisonDroplet,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gGreenPoisonBubble =
|
||||
{
|
||||
.tileTag = ANIM_TAG_GREEN_POISON_BUBBLE,
|
||||
.paletteTag = ANIM_TAG_GREEN_POISON_BUBBLE,
|
||||
.oam = &gOamData_AffineDouble_ObjNormal_16x16,
|
||||
.anims = gAnims_PoisonProjectile,
|
||||
.images = NULL,
|
||||
.affineAnims = gAffineAnims_PoisonProjectile,
|
||||
.callback = AnimAcidPoisonBubble,
|
||||
.tileTag = ANIM_TAG_GREEN_POISON_BUBBLE,
|
||||
.paletteTag = ANIM_TAG_GREEN_POISON_BUBBLE,
|
||||
.oam = &gOamData_AffineDouble_ObjNormal_16x16,
|
||||
.anims = gAnims_PoisonProjectile,
|
||||
.images = NULL,
|
||||
.affineAnims = gAffineAnims_PoisonProjectile,
|
||||
.callback = AnimAcidPoisonBubble,
|
||||
};
|
||||
|
||||
const union AnimCmd gSuckerPunchAnimCmd[] =
|
||||
|
|
|
@ -314,18 +314,18 @@ const struct SpriteTemplate gStealthRockSpriteTemplate =
|
|||
|
||||
static const union AffineAnimCmd sSpriteAffineAnim_CrushGripHandEnemyAttack[] =
|
||||
{
|
||||
AFFINEANIMCMD_FRAME(0, 0, 96, 1), //180 degree turn
|
||||
AFFINEANIMCMD_END
|
||||
AFFINEANIMCMD_FRAME(0, 0, 96, 1), //180 degree turn
|
||||
AFFINEANIMCMD_END
|
||||
};
|
||||
static const union AffineAnimCmd sSpriteAffineAnim_DoNothing[] =
|
||||
{
|
||||
AFFINEANIMCMD_FRAME(0, 0, 0, 1), //Do nothing
|
||||
AFFINEANIMCMD_END
|
||||
AFFINEANIMCMD_FRAME(0, 0, 0, 1), //Do nothing
|
||||
AFFINEANIMCMD_END
|
||||
};
|
||||
static const union AffineAnimCmd* const sSpriteAffineAnimTable_CrushGripHand[] =
|
||||
{
|
||||
sSpriteAffineAnim_DoNothing,
|
||||
sSpriteAffineAnim_CrushGripHandEnemyAttack,
|
||||
sSpriteAffineAnim_DoNothing,
|
||||
sSpriteAffineAnim_CrushGripHandEnemyAttack,
|
||||
};
|
||||
const struct SpriteTemplate gCrushGripHandTemplate =
|
||||
{
|
||||
|
|
|
@ -398,28 +398,28 @@ void AnimTask_FrozenIceCubeAttacker(u8 taskId)
|
|||
void AnimTask_CentredFrozenIceCube(u8 taskId)
|
||||
{
|
||||
// same as AnimTask_FrozenIceCube but center position on target(s)
|
||||
s16 x, y;
|
||||
u8 spriteId;
|
||||
u8 battler1 = gBattleAnimTarget;
|
||||
u8 battler2 = BATTLE_PARTNER(battler1);
|
||||
s16 x, y;
|
||||
u8 spriteId;
|
||||
u8 battler1 = gBattleAnimTarget;
|
||||
u8 battler2 = BATTLE_PARTNER(battler1);
|
||||
|
||||
if (!IsDoubleBattle() || IsAlly(gBattleAnimAttacker, gBattleAnimTarget))
|
||||
{
|
||||
x = GetBattlerSpriteCoord(battler1, BATTLER_COORD_X_2);
|
||||
y = GetBattlerSpriteCoord(battler1, BATTLER_COORD_Y_PIC_OFFSET);
|
||||
}
|
||||
else
|
||||
{
|
||||
x = (GetBattlerSpriteCoord(battler1, BATTLER_COORD_X_2) + GetBattlerSpriteCoord(battler2, BATTLER_COORD_X_2)) / 2;
|
||||
y = (GetBattlerSpriteCoord(battler1, BATTLER_COORD_Y_PIC_OFFSET) + GetBattlerSpriteCoord(battler2, BATTLER_COORD_Y_PIC_OFFSET)) / 2;
|
||||
}
|
||||
if (!IsDoubleBattle() || IsAlly(gBattleAnimAttacker, gBattleAnimTarget))
|
||||
{
|
||||
x = GetBattlerSpriteCoord(battler1, BATTLER_COORD_X_2);
|
||||
y = GetBattlerSpriteCoord(battler1, BATTLER_COORD_Y_PIC_OFFSET);
|
||||
}
|
||||
else
|
||||
{
|
||||
x = (GetBattlerSpriteCoord(battler1, BATTLER_COORD_X_2) + GetBattlerSpriteCoord(battler2, BATTLER_COORD_X_2)) / 2;
|
||||
y = (GetBattlerSpriteCoord(battler1, BATTLER_COORD_Y_PIC_OFFSET) + GetBattlerSpriteCoord(battler2, BATTLER_COORD_Y_PIC_OFFSET)) / 2;
|
||||
}
|
||||
|
||||
x -= 32;
|
||||
y -= 36;
|
||||
x -= 32;
|
||||
y -= 36;
|
||||
|
||||
spriteId = CreateSprite(&sFrozenIceCubeSpriteTemplate, x, y, 4);
|
||||
if (GetSpriteTileStartByTag(ANIM_TAG_ICE_CUBE) == 0xFFFF)
|
||||
gSprites[spriteId].invisible = TRUE;
|
||||
spriteId = CreateSprite(&sFrozenIceCubeSpriteTemplate, x, y, 4);
|
||||
if (GetSpriteTileStartByTag(ANIM_TAG_ICE_CUBE) == 0xFFFF)
|
||||
gSprites[spriteId].invisible = TRUE;
|
||||
|
||||
SetSubspriteTables(&gSprites[spriteId], sFrozenIceCubeSubspriteTable);
|
||||
gTasks[taskId].data[15] = spriteId;
|
||||
|
|
|
@ -585,14 +585,14 @@ const struct SpriteTemplate gAquaTailHitSpriteTemplate =
|
|||
};
|
||||
|
||||
static const union AnimCmd sAnimCmdAnimatedSpark2[] = {
|
||||
ANIMCMD_FRAME((8 * 8) / (16 * 16) * 0, 8),
|
||||
ANIMCMD_FRAME((8 * 8) / (16 * 16) * 1, 8),
|
||||
ANIMCMD_FRAME((8 * 8) / (16 * 16) * 2, 8),
|
||||
ANIMCMD_JUMP(0)
|
||||
ANIMCMD_FRAME((8 * 8) / (16 * 16) * 0, 8),
|
||||
ANIMCMD_FRAME((8 * 8) / (16 * 16) * 1, 8),
|
||||
ANIMCMD_FRAME((8 * 8) / (16 * 16) * 2, 8),
|
||||
ANIMCMD_JUMP(0)
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnimCmdTable_AnimatedSpark2[] = {
|
||||
sAnimCmdAnimatedSpark2,
|
||||
sAnimCmdAnimatedSpark2,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gSparkBeamSpriteTemplate =
|
||||
|
|
|
@ -75,7 +75,7 @@ void SetUpBattleVarsAndBirchZigzagoon(void)
|
|||
gBattleControllerExecFlags = 0;
|
||||
ClearBattleAnimationVars();
|
||||
BattleAI_SetupItems();
|
||||
BattleAI_SetupFlags();
|
||||
BattleAI_SetupFlags();
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_FIRST_BATTLE)
|
||||
{
|
||||
|
@ -611,7 +611,7 @@ bool32 IsValidForBattle(struct Pokemon *mon)
|
|||
{
|
||||
u32 species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG);
|
||||
return (species != SPECIES_NONE
|
||||
&& species != SPECIES_EGG
|
||||
&& species != SPECIES_EGG
|
||||
&& GetMonData(mon, MON_DATA_HP) != 0
|
||||
&& GetMonData(mon, MON_DATA_IS_EGG) == FALSE);
|
||||
}
|
||||
|
|
|
@ -2954,7 +2954,7 @@ u8 DoBattlerEndTurnEffects(void)
|
|||
&& --gBattleStruct->dynamax.dynamaxTurns[battler] == 0)
|
||||
{
|
||||
gBattleScripting.battler = battler;
|
||||
UndoDynamax(battler);
|
||||
UndoDynamax(battler);
|
||||
BattleScriptExecute(BattleScript_DynamaxEnds);
|
||||
effect++;
|
||||
}
|
||||
|
|
|
@ -432,33 +432,33 @@ const struct SpriteTemplate gFieldEffectObjectTemplate_DeepSandFootprints = {
|
|||
};
|
||||
|
||||
static const struct SpriteFrameImage sPicTable_BugTracks[] = {
|
||||
overworld_frame(gFieldEffectObjectPic_BugTracks, 2, 2, 0),
|
||||
overworld_frame(gFieldEffectObjectPic_BugTracks, 2, 2, 1),
|
||||
overworld_frame(gFieldEffectObjectPic_BugTracks, 2, 2, 0),
|
||||
overworld_frame(gFieldEffectObjectPic_BugTracks, 2, 2, 1),
|
||||
};
|
||||
|
||||
static const struct SpriteFrameImage sPicTable_SpotTracks[] = {
|
||||
overworld_frame(gFieldEffectObjectPic_SpotTracks, 2, 2, 0),
|
||||
overworld_frame(gFieldEffectObjectPic_SpotTracks, 2, 2, 1),
|
||||
overworld_frame(gFieldEffectObjectPic_SpotTracks, 2, 2, 0),
|
||||
overworld_frame(gFieldEffectObjectPic_SpotTracks, 2, 2, 1),
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_BugTracks = {
|
||||
.tileTag = 0xFFFF,
|
||||
.paletteTag = FLDEFF_PAL_TAG_GENERAL_0,
|
||||
.oam = &gObjectEventBaseOam_16x16,
|
||||
.anims = sAnimTable_DeepSandFootprints,
|
||||
.images = sPicTable_BugTracks,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = UpdateFootprintsTireTracksFieldEffect,
|
||||
.tileTag = 0xFFFF,
|
||||
.paletteTag = FLDEFF_PAL_TAG_GENERAL_0,
|
||||
.oam = &gObjectEventBaseOam_16x16,
|
||||
.anims = sAnimTable_DeepSandFootprints,
|
||||
.images = sPicTable_BugTracks,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = UpdateFootprintsTireTracksFieldEffect,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_SpotTracks = {
|
||||
.tileTag = 0xFFFF,
|
||||
.paletteTag = FLDEFF_PAL_TAG_GENERAL_0,
|
||||
.oam = &gObjectEventBaseOam_16x16,
|
||||
.anims = sAnimTable_DeepSandFootprints,
|
||||
.images = sPicTable_SpotTracks,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = UpdateFootprintsTireTracksFieldEffect,
|
||||
.tileTag = 0xFFFF,
|
||||
.paletteTag = FLDEFF_PAL_TAG_GENERAL_0,
|
||||
.oam = &gObjectEventBaseOam_16x16,
|
||||
.anims = sAnimTable_DeepSandFootprints,
|
||||
.images = sPicTable_SpotTracks,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = UpdateFootprintsTireTracksFieldEffect,
|
||||
};
|
||||
|
||||
static const struct SpriteFrameImage sPicTable_BikeTireTracks[] = {
|
||||
|
@ -470,10 +470,10 @@ static const struct SpriteFrameImage sPicTable_BikeTireTracks[] = {
|
|||
|
||||
|
||||
static const struct SpriteFrameImage sPicTable_SlitherTracks[] = {
|
||||
overworld_frame(gFieldEffectObjectPic_SlitherTracks, 2, 2, 0),
|
||||
overworld_frame(gFieldEffectObjectPic_SlitherTracks, 2, 2, 1),
|
||||
overworld_frame(gFieldEffectObjectPic_SlitherTracks, 2, 2, 2),
|
||||
overworld_frame(gFieldEffectObjectPic_SlitherTracks, 2, 2, 3),
|
||||
overworld_frame(gFieldEffectObjectPic_SlitherTracks, 2, 2, 0),
|
||||
overworld_frame(gFieldEffectObjectPic_SlitherTracks, 2, 2, 1),
|
||||
overworld_frame(gFieldEffectObjectPic_SlitherTracks, 2, 2, 2),
|
||||
overworld_frame(gFieldEffectObjectPic_SlitherTracks, 2, 2, 3),
|
||||
};
|
||||
|
||||
static const union AnimCmd sBikeTireTracksAnim_South[] =
|
||||
|
@ -549,13 +549,13 @@ const struct SpriteTemplate gFieldEffectObjectTemplate_BikeTireTracks = {
|
|||
|
||||
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_SlitherTracks = {
|
||||
.tileTag = 0xFFFF,
|
||||
.paletteTag = FLDEFF_PAL_TAG_GENERAL_0,
|
||||
.oam = &gObjectEventBaseOam_16x16,
|
||||
.anims = sAnimTable_BikeTireTracks,
|
||||
.images = sPicTable_SlitherTracks,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = UpdateFootprintsTireTracksFieldEffect,
|
||||
.tileTag = 0xFFFF,
|
||||
.paletteTag = FLDEFF_PAL_TAG_GENERAL_0,
|
||||
.oam = &gObjectEventBaseOam_16x16,
|
||||
.anims = sAnimTable_BikeTireTracks,
|
||||
.images = sPicTable_SlitherTracks,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = UpdateFootprintsTireTracksFieldEffect,
|
||||
};
|
||||
|
||||
static const struct SpriteFrameImage sPicTable_JumpBigSplash[] = {
|
||||
|
|
|
@ -3620,7 +3620,7 @@ static const struct LevelUpMove sMoltresGalarianLevelUpLearnset[] = {
|
|||
LEVEL_UP_MOVE(60, MOVE_ENDURE),
|
||||
LEVEL_UP_MOVE(65, MOVE_MEMENTO),
|
||||
LEVEL_UP_MOVE(70, MOVE_SKY_ATTACK),
|
||||
LEVEL_UP_END
|
||||
LEVEL_UP_END
|
||||
};
|
||||
#endif //P_GALARIAN_FORMS
|
||||
#endif //P_FAMILY_MOLTRES
|
||||
|
|
|
@ -1604,7 +1604,7 @@ const u16 gPokedexOrder_Weight[] =
|
|||
NATIONAL_DEX_MORGREM,
|
||||
// 28.7 lbs / 13.0 kg
|
||||
NATIONAL_DEX_IVYSAUR,
|
||||
//NATIONAL_DEX_VOLTORB_HISUIAN,
|
||||
//NATIONAL_DEX_VOLTORB_HISUIAN,
|
||||
//NATIONAL_DEX_BANETTE_MEGA,
|
||||
NATIONAL_DEX_MIME_JR,
|
||||
NATIONAL_DEX_LAMPENT,
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -649,7 +649,7 @@ static const u8 sDebugText_Give_BattlePoints[] = _("Max Battle Points");
|
|||
static const u8 sDebugText_Give_DaycareEgg[] = _("Daycare Egg");
|
||||
// Sound Menu
|
||||
static const u8 sDebugText_Sound_SFX[] = _("SFX…{CLEAR_TO 110}{RIGHT_ARROW}");
|
||||
static const u8 sDebugText_Sound_SFX_ID[] = _("SFX ID: {STR_VAR_3} {START_BUTTON} Stop\n{STR_VAR_1} \n{STR_VAR_2}");
|
||||
static const u8 sDebugText_Sound_SFX_ID[] = _("SFX ID: {STR_VAR_3} {START_BUTTON} Stop\n{STR_VAR_1} \n{STR_VAR_2}");
|
||||
static const u8 sDebugText_Sound_Music[] = _("Music…{CLEAR_TO 110}{RIGHT_ARROW}");
|
||||
static const u8 sDebugText_Sound_Music_ID[] = _("Music ID: {STR_VAR_3} {START_BUTTON} Stop\n{STR_VAR_1} \n{STR_VAR_2}");
|
||||
// Berry Function Menu
|
||||
|
|
|
@ -9496,30 +9496,30 @@ static void DoTracksGroundEffect_BikeTireTracks(struct ObjectEvent *objEvent, st
|
|||
|
||||
static void DoTracksGroundEffect_SlitherTracks(struct ObjectEvent *objEvent, struct Sprite *sprite, u8 a)
|
||||
{
|
||||
// Specifies which bike track shape to show next.
|
||||
// For example, when the bike turns from up to right, it will show
|
||||
// a track that curves to the right.
|
||||
// Each 4-byte row corresponds to the initial direction of the bike, and
|
||||
// each byte in that row is for the next direction of the bike in the order
|
||||
// of down, up, left, right.
|
||||
static const u8 slitherTracks_Transitions[4][4] = {
|
||||
{1, 2, 7, 8},
|
||||
{1, 2, 6, 5},
|
||||
{5, 8, 3, 4},
|
||||
{6, 7, 3, 4},
|
||||
};
|
||||
// Specifies which bike track shape to show next.
|
||||
// For example, when the bike turns from up to right, it will show
|
||||
// a track that curves to the right.
|
||||
// Each 4-byte row corresponds to the initial direction of the bike, and
|
||||
// each byte in that row is for the next direction of the bike in the order
|
||||
// of down, up, left, right.
|
||||
static const u8 slitherTracks_Transitions[4][4] = {
|
||||
{1, 2, 7, 8},
|
||||
{1, 2, 6, 5},
|
||||
{5, 8, 3, 4},
|
||||
{6, 7, 3, 4},
|
||||
};
|
||||
|
||||
if (objEvent->currentCoords.x != objEvent->previousCoords.x || objEvent->currentCoords.y != objEvent->previousCoords.y)
|
||||
{
|
||||
gFieldEffectArguments[0] = objEvent->previousCoords.x;
|
||||
gFieldEffectArguments[1] = objEvent->previousCoords.y;
|
||||
gFieldEffectArguments[2] = 149;
|
||||
gFieldEffectArguments[3] = 2;
|
||||
gFieldEffectArguments[4] =
|
||||
slitherTracks_Transitions[objEvent->previousMovementDirection][objEvent->facingDirection - 5];
|
||||
if (objEvent->currentCoords.x != objEvent->previousCoords.x || objEvent->currentCoords.y != objEvent->previousCoords.y)
|
||||
{
|
||||
gFieldEffectArguments[0] = objEvent->previousCoords.x;
|
||||
gFieldEffectArguments[1] = objEvent->previousCoords.y;
|
||||
gFieldEffectArguments[2] = 149;
|
||||
gFieldEffectArguments[3] = 2;
|
||||
gFieldEffectArguments[4] =
|
||||
slitherTracks_Transitions[objEvent->previousMovementDirection][objEvent->facingDirection - 5];
|
||||
gFieldEffectArguments[5] = objEvent->previousMetatileBehavior;
|
||||
FieldEffectStart(FLDEFF_TRACKS_SLITHER);
|
||||
}
|
||||
FieldEffectStart(FLDEFF_TRACKS_SLITHER);
|
||||
}
|
||||
}
|
||||
|
||||
void GroundEffect_Ripple(struct ObjectEvent *objEvent, struct Sprite *sprite)
|
||||
|
|
|
@ -141,9 +141,9 @@ static s32 _putsEncoded(char *s, s32 len, void *buf)
|
|||
|
||||
static s32 mini_strlen(const char *s)
|
||||
{
|
||||
s32 len = 0;
|
||||
while (s[len] != '\0') len++;
|
||||
return len;
|
||||
s32 len = 0;
|
||||
while (s[len] != '\0') len++;
|
||||
return len;
|
||||
}
|
||||
|
||||
static s32 mini_itoa(s32 value, u32 radix, s32 uppercase, bool32 unsig, char *buffer)
|
||||
|
|
|
@ -3511,14 +3511,14 @@ static void SpriteCB_DexListStartMenuCursor(struct Sprite *sprite)
|
|||
//************************************
|
||||
|
||||
//Stat bars on main screen, code by DizzyEgg, idea by Jaizu
|
||||
#define PIXEL_COORDS_TO_OFFSET(x, y)( \
|
||||
/*Add tiles by X*/ \
|
||||
((y / 8) * 32 * 8) \
|
||||
/*Add tiles by X*/ \
|
||||
+ ((x / 8) * 32) \
|
||||
/*Add pixels by Y*/ \
|
||||
+ ((((y) - ((y / 8) * 8))) * 4) \
|
||||
/*Add pixels by X*/ \
|
||||
#define PIXEL_COORDS_TO_OFFSET(x, y)( \
|
||||
/*Add tiles by X*/ \
|
||||
((y / 8) * 32 * 8) \
|
||||
/*Add tiles by X*/ \
|
||||
+ ((x / 8) * 32) \
|
||||
/*Add pixels by Y*/ \
|
||||
+ ((((y) - ((y / 8) * 8))) * 4) \
|
||||
/*Add pixels by X*/ \
|
||||
+ ((((x) - ((x / 8) * 8)) / 2)))
|
||||
|
||||
static inline void WritePixel(u8 *dst, u32 x, u32 y, u32 value)
|
||||
|
|
Loading…
Reference in a new issue