Changes to light shade color (#444)

This commit is contained in:
Agent X 2023-07-10 15:40:45 -04:00 committed by GitHub
parent 2f949a3250
commit 5c5e7430cd
6 changed files with 37 additions and 37 deletions

View File

@ -708,14 +708,14 @@
--- @field public headAngle Vec3s
--- @field public headPos Vec3f
--- @field public heldObjLastPosition Vec3f
--- @field public lightB number
--- @field public lightG number
--- @field public lightR number
--- @field public lightB integer
--- @field public lightG integer
--- @field public lightR integer
--- @field public modelState integer
--- @field public punchState integer
--- @field public shadeB number
--- @field public shadeG number
--- @field public shadeR number
--- @field public shadeB integer
--- @field public shadeG integer
--- @field public shadeR integer
--- @field public torsoAngle Vec3s
--- @field public torsoPos Vec3f
--- @field public updateTorsoTime integer

View File

@ -1035,14 +1035,14 @@
| headAngle | [Vec3s](structs.md#Vec3s) | read-only |
| headPos | [Vec3f](structs.md#Vec3f) | read-only |
| heldObjLastPosition | [Vec3f](structs.md#Vec3f) | read-only |
| lightB | `number` | |
| lightG | `number` | |
| lightR | `number` | |
| lightB | `integer` | |
| lightG | `integer` | |
| lightR | `integer` | |
| modelState | `integer` | |
| punchState | `integer` | |
| shadeB | `number` | |
| shadeG | `number` | |
| shadeR | `number` | |
| shadeB | `integer` | |
| shadeG | `integer` | |
| shadeR | `integer` | |
| torsoAngle | [Vec3s](structs.md#Vec3s) | read-only |
| torsoPos | [Vec3f](structs.md#Vec3f) | read-only |
| updateTorsoTime | `integer` | read-only |

View File

@ -306,13 +306,13 @@ struct MarioBodyState
/*????*/ Vec3f handFootPos[4];
/*????*/ u32 updateTorsoTime;
/*????*/ Vec3f headPos;
//u8 padding[4];
/*????*/ f32 shadeR; // Shadow Red Value
/*????*/ f32 shadeG; // Shadow Green Value
/*????*/ f32 shadeB; // Shadow Blue Value
/*????*/ f32 lightR; // Shadow Red Value
/*????*/ f32 lightG; // Shadow Green Value
/*????*/ f32 lightB; // Shadow Blue Value
/*????*/ u8 shadeR; // Shadow Red Value
/*????*/ u8 shadeG; // Shadow Green Value
/*????*/ u8 shadeB; // Shadow Blue Value
/*????*/ u8 lightR; // Shadow Red Value
/*????*/ u8 lightG; // Shadow Green Value
/*????*/ u8 lightB; // Shadow Blue Value
// u8 padding[4];
};
struct OffsetSizePair

View File

@ -2291,13 +2291,13 @@ void init_single_mario(struct MarioState* m) {
update_mario_info_for_cam(m);
m->marioBodyState->punchState = 0;
m->marioBodyState->shadeR = 127.0f;
m->marioBodyState->shadeG = 127.0f;
m->marioBodyState->shadeB = 127.0f;
m->marioBodyState->shadeR = 127;
m->marioBodyState->shadeG = 127;
m->marioBodyState->shadeB = 127;
m->marioBodyState->lightR = 255.0f;
m->marioBodyState->lightG = 255.0f;
m->marioBodyState->lightB = 255.0f;
m->marioBodyState->lightR = 255;
m->marioBodyState->lightG = 255;
m->marioBodyState->lightB = 255;
m->marioObj->oPosX = m->pos[0];
m->marioObj->oPosY = m->pos[1];

View File

@ -755,13 +755,13 @@ static struct PlayerColor geo_mario_get_player_color(const struct PlayerPalette
for (s32 part = 0; part != PLAYER_PART_MAX; ++part) {
color.parts[part] = (Lights1) gdSPDefLights1(
// Shadow
palette->parts[part][0] * bodyState->shadeR/255.0f,
palette->parts[part][1] * bodyState->shadeG/255.0f,
palette->parts[part][2] * bodyState->shadeB/255.0f,
palette->parts[part][0] * bodyState->shadeR / 255.0f,
palette->parts[part][1] * bodyState->shadeG / 255.0f,
palette->parts[part][2] * bodyState->shadeB / 255.0f,
// Light
palette->parts[part][0] * bodyState->lightR/255.0f,
palette->parts[part][1] * bodyState->lightG/255.0f,
palette->parts[part][2] * bodyState->lightB/255.0f,
palette->parts[part][0] * bodyState->lightR / 255.0f,
palette->parts[part][1] * bodyState->lightG / 255.0f,
palette->parts[part][2] * bodyState->lightB / 255.0f,
0x28, 0x28, 0x28
);
}

View File

@ -820,14 +820,14 @@ static struct LuaObjectField sMarioBodyStateFields[LUA_MARIO_BODY_STATE_FIELD_CO
{ "headAngle", LVT_COBJECT, offsetof(struct MarioBodyState, headAngle), true, LOT_VEC3S },
{ "headPos", LVT_COBJECT, offsetof(struct MarioBodyState, headPos), true, LOT_VEC3F },
{ "heldObjLastPosition", LVT_COBJECT, offsetof(struct MarioBodyState, heldObjLastPosition), true, LOT_VEC3F },
{ "lightB", LVT_F32, offsetof(struct MarioBodyState, lightB), false, LOT_NONE },
{ "lightG", LVT_F32, offsetof(struct MarioBodyState, lightG), false, LOT_NONE },
{ "lightR", LVT_F32, offsetof(struct MarioBodyState, lightR), false, LOT_NONE },
{ "lightB", LVT_U8, offsetof(struct MarioBodyState, lightB), false, LOT_NONE },
{ "lightG", LVT_U8, offsetof(struct MarioBodyState, lightG), false, LOT_NONE },
{ "lightR", LVT_U8, offsetof(struct MarioBodyState, lightR), false, LOT_NONE },
{ "modelState", LVT_S16, offsetof(struct MarioBodyState, modelState), false, LOT_NONE },
{ "punchState", LVT_U8, offsetof(struct MarioBodyState, punchState), false, LOT_NONE },
{ "shadeB", LVT_F32, offsetof(struct MarioBodyState, shadeB), false, LOT_NONE },
{ "shadeG", LVT_F32, offsetof(struct MarioBodyState, shadeG), false, LOT_NONE },
{ "shadeR", LVT_F32, offsetof(struct MarioBodyState, shadeR), false, LOT_NONE },
{ "shadeB", LVT_U8, offsetof(struct MarioBodyState, shadeB), false, LOT_NONE },
{ "shadeG", LVT_U8, offsetof(struct MarioBodyState, shadeG), false, LOT_NONE },
{ "shadeR", LVT_U8, offsetof(struct MarioBodyState, shadeR), false, LOT_NONE },
{ "torsoAngle", LVT_COBJECT, offsetof(struct MarioBodyState, torsoAngle), true, LOT_VEC3S },
{ "torsoPos", LVT_COBJECT, offsetof(struct MarioBodyState, torsoPos), true, LOT_VEC3F },
{ "updateTorsoTime", LVT_U32, offsetof(struct MarioBodyState, updateTorsoTime), true, LOT_NONE },