Path: blob/master/SonicMania/Objects/SSZ/MonarchPlans.c
338 views
// ---------------------------------------------------------------------1// RSDK Project: Sonic Mania2// Object Description: MonarchPlans Object3// Object Author: Christian Whitehead/Simon Thomley/Hunter Bridges4// Decompiled by: Rubberduckycooly & RMGRich5// ---------------------------------------------------------------------67#include "Game.h"89#if MANIA_USE_PLUS10ObjectMonarchPlans *MonarchPlans;1112void MonarchPlans_Update(void)13{14RSDK_THIS(MonarchPlans);1516self->rotationY = (self->rotationY + 4) & 0x3FF;1718RSDK.MatrixScaleXYZ(&self->matWorldTemp, self->scale.x, -self->scale.x, self->scale.x);19RSDK.MatrixTranslateXYZ(&self->matWorldTemp, self->position.x, self->position.y, 0, 0);20RSDK.MatrixRotateXYZ(&self->matWorld, 0, self->rotationY, self->rotationZ);21RSDK.MatrixMultiply(&self->matWorld, &self->matWorld, &self->matWorldTemp);2223RSDK.MatrixRotateX(&self->matNormalTemp, 0x1E0);24RSDK.MatrixRotateXYZ(&self->matNormal, 0, self->rotationY, self->rotationZ);25RSDK.MatrixMultiply(&self->matNormal, &self->matNormal, &self->matNormalTemp);26}2728void MonarchPlans_LateUpdate(void) {}2930void MonarchPlans_StaticUpdate(void) {}3132void MonarchPlans_Draw(void)33{34RSDK_THIS(MonarchPlans);3536RSDK.Prepare3DScene(MonarchPlans->sceneIndex);3738RSDK.AddModelTo3DScene(MonarchPlans->meshIndex, MonarchPlans->sceneIndex, S3D_WIREFRAME, &self->matWorld, &self->matNormal, 0x609090);3940RSDK.Draw3DScene(MonarchPlans->sceneIndex);41}4243void MonarchPlans_Create(void *data)44{45RSDK_THIS(MonarchPlans);4647if (!SceneInfo->inEditor) {48self->active = ACTIVE_BOUNDS;49self->inkEffect = INK_BLEND;50self->visible = true;51self->updateRange.x = 0x900000;52self->updateRange.y = 0x900000;53self->scale.x = 0xA0;54self->scale.y = 0xA0;55self->drawGroup = Zone->objectDrawGroup[0];56}57}5859void MonarchPlans_StageLoad(void)60{61// ???62// what the...?63// don't even have the slightest of clues as to what this was64// why is it in Data/Sprites/Global/ ???65MonarchPlans->aniFrames = RSDK.LoadSpriteAnimation("Global/MonarchPlans.bin", SCOPE_STAGE);6667MonarchPlans->meshIndex = RSDK.LoadMesh("SSZ/MonarchPlans.bin", SCOPE_STAGE);68MonarchPlans->sceneIndex = RSDK.Create3DScene("View:MonarchPlans", 0x2000, SCOPE_STAGE);6970// ???71MonarchPlans->hitbox.left = -24;72MonarchPlans->hitbox.top = -24;73MonarchPlans->hitbox.right = 24;74MonarchPlans->hitbox.bottom = 24;7576RSDK.SetDiffuseColor(MonarchPlans->sceneIndex, 0xA0, 0xA0, 0xA0);77RSDK.SetDiffuseIntensity(MonarchPlans->sceneIndex, 8, 8, 8);78RSDK.SetSpecularIntensity(MonarchPlans->sceneIndex, 14, 14, 14);79}8081#if GAME_INCLUDE_EDITOR82void MonarchPlans_EditorDraw(void) {}8384void MonarchPlans_EditorLoad(void) {}85#endif8687void MonarchPlans_Serialize(void) {}88#endif899091