mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
Introduce SPRITE_PIXEL_SCALE (#580)
This commit is contained in:
parent
69e1a012bd
commit
70c2c679a4
@ -81,6 +81,8 @@
|
||||
|
||||
#define ASCII_TO_U32(a, b, c, d) ((u32)((a << 24) | (b << 16) | (c << 8) | (d << 0)))
|
||||
|
||||
#define SPRITE_PIXEL_SCALE (5.0 / 7.0)
|
||||
|
||||
#ifdef PERMUTER
|
||||
#define SCRIPT(...) {}
|
||||
#endif
|
||||
|
14
src/182B30.c
14
src/182B30.c
@ -305,9 +305,9 @@ void func_80254C50(Actor* actor) {
|
||||
guRotateF(sp98, rotZ, 0.0f, 0.0f, 1.0f);
|
||||
guMtxCatF(sp18, sp58, sp218);
|
||||
guMtxCatF(sp218, sp98, spD8);
|
||||
guScaleF(sp118, actor->scale.x * (5.0 / 7.0) * actor->scalingFactor,
|
||||
actor->scale.y * (5.0 / 7.0) * actor->scalingFactor * partTable->verticalStretch,
|
||||
actor->scale.z * (5.0 / 7.0));
|
||||
guScaleF(sp118, actor->scale.x * SPRITE_PIXEL_SCALE * actor->scalingFactor,
|
||||
actor->scale.y * SPRITE_PIXEL_SCALE * actor->scalingFactor * partTable->verticalStretch,
|
||||
actor->scale.z * SPRITE_PIXEL_SCALE);
|
||||
guMtxCatF(sp118, sp158, sp258);
|
||||
guMtxCatF(sp258, spD8, sp218);
|
||||
guMtxCatF(sp218, sp198, sp258);
|
||||
@ -388,9 +388,9 @@ void func_802552EC(s32 arg0, Actor* actor) {
|
||||
guRotateF(sp98, actor->rotation.z, 0.0f, 0.0f, 1.0f);
|
||||
guMtxCatF(sp18, sp58, sp198);
|
||||
guMtxCatF(sp198, sp98, spD8);
|
||||
guScaleF(sp118, actor->scale.x * (5.0 / 7.0) * actor->scalingFactor,
|
||||
actor->scale.y * (5.0 / 7.0) * actor->scalingFactor,
|
||||
actor->scale.z * (5.0 / 7.0));
|
||||
guScaleF(sp118, actor->scale.x * SPRITE_PIXEL_SCALE * actor->scalingFactor,
|
||||
actor->scale.y * SPRITE_PIXEL_SCALE * actor->scalingFactor,
|
||||
actor->scale.z * SPRITE_PIXEL_SCALE);
|
||||
guMtxCatF(sp118, spD8, sp298);
|
||||
|
||||
numParts = actor->numParts;
|
||||
@ -417,7 +417,7 @@ void func_802552EC(s32 arg0, Actor* actor) {
|
||||
}
|
||||
|
||||
if (partTable->flags & ACTOR_PART_FLAG_100000) {
|
||||
guScaleF(sp2D8, actor->scale.x * (5.0 / 7.0), actor->scale.y * (5.0 / 7.0), actor->scale.z * (5.0 / 7.0));
|
||||
guScaleF(sp2D8, actor->scale.x * SPRITE_PIXEL_SCALE, actor->scale.y * SPRITE_PIXEL_SCALE, actor->scale.z * SPRITE_PIXEL_SCALE);
|
||||
}
|
||||
|
||||
j = decorationTable->unk_7D9;
|
||||
|
@ -792,7 +792,7 @@ void appendGfx_player(void) {
|
||||
s32 phi_a0;
|
||||
|
||||
if (playerStatus->actionState == ACTION_STATE_SLIDING) {
|
||||
guScaleF(spE0, (5.0f / 7.0f), (5.0f / 7.0f), (5.0f / 7.0f));
|
||||
guScaleF(spE0, SPRITE_PIXEL_SCALE, SPRITE_PIXEL_SCALE, SPRITE_PIXEL_SCALE);
|
||||
guRotateF(sp20, temp_f0, 0.0f, 1.0f, 0.0f);
|
||||
guMtxCatF(spE0, sp20, sp20);
|
||||
guRotateF(spA0, playerStatus->spriteFacingAngle, 0.0f, 1.0f, 0.0f);
|
||||
@ -812,7 +812,7 @@ void appendGfx_player(void) {
|
||||
guMtxCatF(sp20, spA0, sp20);
|
||||
guTranslateF(sp60, 0.0f, playerStatus->colliderHeight * 0.5f, 0.0f);
|
||||
guMtxCatF(sp20, sp60, sp20);
|
||||
guScaleF(spE0, (5.0f / 7.0f), (5.0f / 7.0f), (5.0f / 7.0f));
|
||||
guScaleF(spE0, SPRITE_PIXEL_SCALE, SPRITE_PIXEL_SCALE, SPRITE_PIXEL_SCALE);
|
||||
guMtxCatF(sp20, spE0, sp20);
|
||||
guTranslateF(sp60, playerStatus->position.x, playerStatus->position.y, playerStatus->position.z);
|
||||
guMtxCatF(sp20, sp60, sp20);
|
||||
|
Loading…
Reference in New Issue
Block a user