From 452bee26489e8855f55fc5126a19151a4b876b39 Mon Sep 17 00:00:00 2001 From: Baoulettes Date: Fri, 8 Apr 2022 03:43:12 +0200 Subject: [PATCH] Clean Const that was present nor not. --- libultraship/libultraship/GameSettings.cpp | 48 ++-- libultraship/libultraship/SohImGuiImpl.cpp | 35 ++- soh/src/code/z_en_item00.c | 249 +-------------------- 3 files changed, 45 insertions(+), 287 deletions(-) diff --git a/libultraship/libultraship/GameSettings.cpp b/libultraship/libultraship/GameSettings.cpp index 294574d2c..6b07ac355 100644 --- a/libultraship/libultraship/GameSettings.cpp +++ b/libultraship/libultraship/GameSettings.cpp @@ -50,80 +50,76 @@ namespace Game { // Enhancements Settings.enhancements.fast_text = stob(Conf[EnhancementSection]["fast_text"]); - CVar_SetS32(const_cast("gFastText"), Settings.enhancements.fast_text); + CVar_SetS32("gFastText", Settings.enhancements.fast_text); Settings.enhancements.disable_lod = stob(Conf[EnhancementSection]["disable_lod"]); - CVar_SetS32(const_cast("gDisableLOD"), Settings.enhancements.disable_lod); + CVar_SetS32("gDisableLOD", Settings.enhancements.disable_lod); Settings.enhancements.animated_pause_menu = stob(Conf[EnhancementSection]["animated_pause_menu"]); - CVar_SetS32(const_cast("gPauseLiveLink"), Settings.enhancements.animated_pause_menu); + CVar_SetS32("gPauseLiveLink", Settings.enhancements.animated_pause_menu); Settings.enhancements.minimal_ui = stob(Conf[EnhancementSection]["minimal_ui"]); CVar_SetS32(const_cast("gMinimalUI"), Settings.enhancements.minimal_ui); Settings.enhancements.newdrops = stob(Conf[EnhancementSection]["newdrops"]); -<<<<<<< Updated upstream - CVar_SetS32(const_cast("gNewDrops"), Settings.enhancements.newdrops); -======= CVar_SetS32("gNewDrops", Settings.enhancements.newdrops); ->>>>>>> Stashed changes - + // Audio Settings.audio.master = Ship::stof(Conf[AudioSection]["master"]); - CVar_SetFloat(const_cast("gGameMasterVolume"), Settings.audio.master); + CVar_SetFloat("gGameMasterVolume", Settings.audio.master); Settings.audio.music_main = Ship::stof(Conf[AudioSection]["music_main"]); - CVar_SetFloat(const_cast("gMainMusicVolume"), Settings.audio.music_main); + CVar_SetFloat("gMainMusicVolume", Settings.audio.music_main); Settings.audio.music_sub = Ship::stof(Conf[AudioSection]["music_sub"]); - CVar_SetFloat(const_cast("gSubMusicVolume"), Settings.audio.music_sub); + CVar_SetFloat("gSubMusicVolume", Settings.audio.music_sub); Settings.audio.sfx = Ship::stof(Conf[AudioSection]["sfx"]); - CVar_SetFloat(const_cast("gSFXMusicVolume"), Settings.audio.sfx); + CVar_SetFloat("gSFXMusicVolume", Settings.audio.sfx); Settings.audio.fanfare = Ship::stof(Conf[AudioSection]["fanfare"]); - CVar_SetFloat(const_cast("gFanfareVolume"), Settings.audio.fanfare); + CVar_SetFloat("gFanfareVolume", Settings.audio.fanfare); // Controllers Settings.controller.gyro_sensitivity = Ship::stof(Conf[ControllerSection]["gyro_sensitivity"]); - CVar_SetFloat(const_cast("gGyroSensitivity"), Settings.controller.gyro_sensitivity); + CVar_SetFloat("gGyroSensitivity", Settings.controller.gyro_sensitivity); Settings.controller.rumble_strength = Ship::stof(Conf[ControllerSection]["rumble_strength"]); - CVar_SetFloat(const_cast("gRumbleStrength"), Settings.controller.rumble_strength); + CVar_SetFloat("gRumbleStrength", Settings.controller.rumble_strength); Settings.controller.input_scale = Ship::stof(Conf[ControllerSection]["input_scale"]); - CVar_SetFloat(const_cast("gInputScale"), Settings.controller.input_scale); + CVar_SetFloat("gInputScale", Settings.controller.input_scale); Settings.controller.input_enabled = stob(Conf[ControllerSection]["input_enabled"]); - CVar_SetS32(const_cast("gInputEnabled"), Settings.controller.input_enabled); + CVar_SetS32("gInputEnabled", Settings.controller.input_enabled); // Cheats Settings.cheats.debug_mode = stob(Conf[CheatSection]["debug_mode"]); - CVar_SetS32(const_cast("gDebugEnabled"), Settings.cheats.debug_mode); + CVar_SetS32("gDebugEnabled", Settings.cheats.debug_mode); Settings.cheats.infinite_money = stob(Conf[CheatSection]["infinite_money"]); - CVar_SetS32(const_cast("gInfiniteMoney"), Settings.cheats.infinite_money); + CVar_SetS32("gInfiniteMoney", Settings.cheats.infinite_money); Settings.cheats.infinite_health = stob(Conf[CheatSection]["infinite_health"]); - CVar_SetS32(const_cast("gInfiniteHealth"), Settings.cheats.infinite_health); + CVar_SetS32("gInfiniteHealth", Settings.cheats.infinite_health); Settings.cheats.infinite_ammo = stob(Conf[CheatSection]["infinite_ammo"]); - CVar_SetS32(const_cast("gInfiniteAmmo"), Settings.cheats.infinite_ammo); + CVar_SetS32("gInfiniteAmmo", Settings.cheats.infinite_ammo); Settings.cheats.infinite_magic = stob(Conf[CheatSection]["infinite_magic"]); - CVar_SetS32(const_cast("gInfiniteMagic"), Settings.cheats.infinite_magic); + CVar_SetS32("gInfiniteMagic", Settings.cheats.infinite_magic); Settings.cheats.no_clip = stob(Conf[CheatSection]["no_clip"]); - CVar_SetS32(const_cast("gNoClip"), Settings.cheats.no_clip); + CVar_SetS32("gNoClip", Settings.cheats.no_clip); Settings.cheats.climb_everything = stob(Conf[CheatSection]["climb_everything"]); - CVar_SetS32(const_cast("gClimbEverything"), Settings.cheats.climb_everything); + CVar_SetS32("gClimbEverything", Settings.cheats.climb_everything); Settings.cheats.moon_jump_on_l = stob(Conf[CheatSection]["moon_jump_on_l"]); - CVar_SetS32(const_cast("gMoonJumpOnL"), Settings.cheats.moon_jump_on_l); + CVar_SetS32("gMoonJumpOnL", Settings.cheats.moon_jump_on_l); Settings.cheats.super_tunic = stob(Conf[CheatSection]["super_tunic"]); - CVar_SetS32(const_cast("gSuperTunic"), Settings.cheats.super_tunic); + CVar_SetS32("gSuperTunic", Settings.cheats.super_tunic); UpdateAudio(); } diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 29c760ad5..8765cc07a 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -225,7 +225,7 @@ namespace SohImGui { ImGui::Text(name, static_cast(100 * *(value))); if (ImGui::SliderFloat((std::string("##") + key).c_str(), value, 0.0f, 1.0f, "")) { const float volume = floorf(*(value) * 100) / 100; - CVar_SetFloat(const_cast(key), volume); + CVar_SetFloat(key, volume); needs_save = true; Game::SetSeqPlayerVolume(playerId, volume); } @@ -289,7 +289,7 @@ namespace SohImGui { const float volume = Game::Settings.audio.master; ImGui::Text("Master Volume: %d %%", static_cast(100 * volume)); if (ImGui::SliderFloat("##Master_Vol", &Game::Settings.audio.master, 0.0f, 1.0f, "")) { - CVar_SetFloat(const_cast("gGameMasterVolume"), volume); + CVar_SetFloat("gGameMasterVolume", volume); needs_save = true; } @@ -337,7 +337,7 @@ namespace SohImGui { ImGui::Separator(); if (ImGui::Checkbox("Fast Text", &Game::Settings.enhancements.fast_text)) { - CVar_SetS32(const_cast("gFastText"), Game::Settings.enhancements.fast_text); + CVar_SetS32("gFastText", Game::Settings.enhancements.fast_text); needs_save = true; } @@ -346,11 +346,6 @@ namespace SohImGui { needs_save = true; } - if (ImGui::Checkbox("Enable 3D Dropped items", &Game::Settings.enhancements.newdrops)) { - CVar_SetS32("gNewDrops", Game::Settings.enhancements.newdrops); - needs_save = true; - } - ImGui::Text("Graphics"); ImGui::Separator(); @@ -359,17 +354,17 @@ namespace SohImGui { } if (ImGui::Checkbox("Animated Link in Pause Menu", &Game::Settings.enhancements.animated_pause_menu)) { - CVar_SetS32(const_cast("gPauseLiveLink"), Game::Settings.enhancements.animated_pause_menu); + CVar_SetS32("gPauseLiveLink", Game::Settings.enhancements.animated_pause_menu); needs_save = true; } if (ImGui::Checkbox("Disable LOD", &Game::Settings.enhancements.disable_lod)) { - CVar_SetS32(const_cast("gDisableLOD"), Game::Settings.enhancements.disable_lod); + CVar_SetS32("gDisableLOD", Game::Settings.enhancements.disable_lod); needs_save = true; } if (ImGui::Checkbox("Enable 3D Dropped items", &Game::Settings.enhancements.newdrops)) { - CVar_SetS32(const_cast("gNewDrops"), Game::Settings.enhancements.newdrops); + CVar_SetS32("gNewDrops", Game::Settings.enhancements.newdrops); needs_save = true; } @@ -384,7 +379,7 @@ namespace SohImGui { ImGui::Separator(); if (ImGui::Checkbox("Debug Mode", &Game::Settings.cheats.debug_mode)) { - CVar_SetS32(const_cast("gDebugEnabled"), Game::Settings.cheats.debug_mode); + CVar_SetS32("gDebugEnabled", Game::Settings.cheats.debug_mode); needs_save = true; } @@ -393,42 +388,42 @@ namespace SohImGui { if (ImGui::BeginMenu("Cheats")) { if (ImGui::Checkbox("Infinite Money", &Game::Settings.cheats.infinite_money)) { - CVar_SetS32(const_cast("gInfiniteMoney"), Game::Settings.cheats.infinite_money); + CVar_SetS32("gInfiniteMoney", Game::Settings.cheats.infinite_money); needs_save = true; } if (ImGui::Checkbox("Infinite Health", &Game::Settings.cheats.infinite_health)) { - CVar_SetS32(const_cast("gInfiniteHealth"), Game::Settings.cheats.infinite_health); + CVar_SetS32("gInfiniteHealth", Game::Settings.cheats.infinite_health); needs_save = true; } if (ImGui::Checkbox("Infinite Ammo", &Game::Settings.cheats.infinite_ammo)) { - CVar_SetS32(const_cast("gInfiniteAmmo"), Game::Settings.cheats.infinite_ammo); + CVar_SetS32("gInfiniteAmmo", Game::Settings.cheats.infinite_ammo); needs_save = true; } if (ImGui::Checkbox("Infinite Magic", &Game::Settings.cheats.infinite_magic)) { - CVar_SetS32(const_cast("gInfiniteMagic"), Game::Settings.cheats.infinite_magic); + CVar_SetS32("gInfiniteMagic", Game::Settings.cheats.infinite_magic); needs_save = true; } if (ImGui::Checkbox("No Clip", &Game::Settings.cheats.no_clip)) { - CVar_SetS32(const_cast("gNoClip"), Game::Settings.cheats.no_clip); + CVar_SetS32("gNoClip", Game::Settings.cheats.no_clip); needs_save = true; } if (ImGui::Checkbox("Climb Everything", &Game::Settings.cheats.climb_everything)) { - CVar_SetS32(const_cast("gClimbEverything"), Game::Settings.cheats.climb_everything); + CVar_SetS32("gClimbEverything", Game::Settings.cheats.climb_everything); needs_save = true; } if (ImGui::Checkbox("Moon Jump on L", &Game::Settings.cheats.moon_jump_on_l)) { - CVar_SetS32(const_cast("gMoonJumpOnL"), Game::Settings.cheats.moon_jump_on_l); + CVar_SetS32("gMoonJumpOnL", Game::Settings.cheats.moon_jump_on_l); needs_save = true; } if (ImGui::Checkbox("Super Tunic", &Game::Settings.cheats.super_tunic)) { - CVar_SetS32(const_cast("gSuperTunic"), Game::Settings.cheats.super_tunic); + CVar_SetS32("gSuperTunic", Game::Settings.cheats.super_tunic); needs_save = true; } diff --git a/soh/src/code/z_en_item00.c b/soh/src/code/z_en_item00.c index a30e18a57..d0179a5e1 100644 --- a/soh/src/code/z_en_item00.c +++ b/soh/src/code/z_en_item00.c @@ -364,17 +364,8 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) { yOffset = 50.0f; shadowScale = 0.3f; this->actor.world.rot.x = 0x4000; -<<<<<<< Updated upstream - } else { - Actor_SetScale(&this->actor, 0.015f); - this->scale = 0.015f; - yOffset = 750.0f; - } - break; -======= break; } ->>>>>>> Stashed changes case ITEM00_RUPEE_BLUE: if (CVar_GetS32("gNewDrops", 0) !=0) { Actor_SetScale(&this->actor, 0.3f); @@ -382,16 +373,7 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) { yOffset = 50.0f; shadowScale = 0.3f; this->actor.world.rot.x = 0x4000; -<<<<<<< Updated upstream - } else { - Actor_SetScale(&this->actor, 0.015f); - this->scale = 0.015f; - yOffset = 750.0f; } - break; -======= - } ->>>>>>> Stashed changes case ITEM00_RUPEE_RED: if (CVar_GetS32("gNewDrops", 0) !=0) { Actor_SetScale(&this->actor, 0.3f); @@ -419,19 +401,6 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) { break; case ITEM00_HEART: if (CVar_GetS32("gNewDrops", 0) !=0) { -<<<<<<< Updated upstream - Actor_SetScale(&this->actor, 0.15f); - this->scale = 0.15f; - yOffset = 50.0f; - shadowScale = 0.3f; - this->actor.world.rot.x = 0x4000; - } else { - this->actor.home.rot.z = Rand_CenteredFloat(65535.0f); - yOffset = 430.0f; - Actor_SetScale(&this->actor, 0.02f); - this->scale = 0.02f; -======= - //Guessed value for custom drop I is as close as possible this->actor.home.rot.z = Rand_CenteredFloat(65535.0f); yOffset = 25.0f; Actor_SetScale(&this->actor, 0.3f); @@ -442,7 +411,6 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) { yOffset = 430.0f; Actor_SetScale(&this->actor, 0.02f); this->scale = 0.02f; ->>>>>>> Stashed changes } break; case ITEM00_HEART_CONTAINER: @@ -459,15 +427,9 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) { shadowScale = 0.5f; this->actor.world.rot.x = 0x4000; } else { -<<<<<<< Updated upstream - yOffset = 400.0f; - Actor_SetScale(&this->actor, 0.02f); - this->scale = 0.02f; -======= yOffset = 400.0f; Actor_SetScale(&this->actor, 0.02f); this->scale = 0.02f; ->>>>>>> Stashed changes } break; case ITEM00_ARROWS_SMALL: @@ -477,17 +439,8 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) { yOffset = 50.0f; shadowScale = 0.5f; this->actor.world.rot.x = 0x4000; -<<<<<<< Updated upstream - } else { - yOffset = 400.0f; - Actor_SetScale(&this->actor, 0.02f); - this->scale = 0.02f; - } - break; -======= break; } ->>>>>>> Stashed changes case ITEM00_ARROWS_MEDIUM: if (CVar_GetS32("gNewDrops", 0) !=0) { Actor_SetScale(&this->actor, 0.2f); @@ -495,17 +448,8 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) { yOffset = 50.0f; shadowScale = 0.5f; this->actor.world.rot.x = 0x4000; -<<<<<<< Updated upstream - } else { - yOffset = 400.0f; - Actor_SetScale(&this->actor, 0.02f); - this->scale = 0.02f; - } - break; -======= break; } ->>>>>>> Stashed changes case ITEM00_ARROWS_LARGE: if (CVar_GetS32("gNewDrops", 0) !=0) { Actor_SetScale(&this->actor, 0.2f); @@ -514,15 +458,9 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) { shadowScale = 0.5f; this->actor.world.rot.x = 0x4000; } else { -<<<<<<< Updated upstream - yOffset = 400.0f; - Actor_SetScale(&this->actor, 0.02f); - this->scale = 0.02f; -======= Actor_SetScale(&this->actor, 0.035f); this->scale = 0.035f; yOffset = 250.0f; ->>>>>>> Stashed changes } break; case ITEM00_BOMBS_A: @@ -531,19 +469,9 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) { this->scale = 0.2f; yOffset = 50.0f; shadowScale = 0.5f; -<<<<<<< Updated upstream - this->actor.world.rot.x = 0x4000; - } else { - yOffset = 400.0f; - Actor_SetScale(&this->actor, 0.02f); - this->scale = 0.02f; - } - break; -======= this->actor.world.rot.x = 0x4000; break; } ->>>>>>> Stashed changes case ITEM00_BOMBS_B: if (CVar_GetS32("gNewDrops", 0) !=0) { Actor_SetScale(&this->actor, 0.2f); @@ -551,18 +479,8 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) { yOffset = 50.0f; shadowScale = 0.5f; this->actor.world.rot.x = 0x4000; -<<<<<<< Updated upstream - - } else { - yOffset = 400.0f; - Actor_SetScale(&this->actor, 0.02f); - this->scale = 0.02f; - } - break; -======= break; } ->>>>>>> Stashed changes case ITEM00_NUTS: if (CVar_GetS32("gNewDrops", 0) !=0) { Actor_SetScale(&this->actor, 0.2f); @@ -570,20 +488,10 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) { yOffset = 50.0f; shadowScale = 0.5f; this->actor.world.rot.x = 0x4000; -<<<<<<< Updated upstream - } else { - yOffset = 400.0f; - Actor_SetScale(&this->actor, 0.02f); - this->scale = 0.02f; - } - break; -======= break; } ->>>>>>> Stashed changes case ITEM00_STICK: if (CVar_GetS32("gNewDrops", 0) !=0) { - //This edit the model over head to show in 3D when you collect it, the dropped model remain the same! Actor_SetScale(&this->actor, 0.2f); this->scale = 0.2f; yOffset = 50.0f; @@ -598,17 +506,8 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) { yOffset = 50.0f; shadowScale = 0.5f; this->actor.world.rot.x = 0x4000; -<<<<<<< Updated upstream - } else { - yOffset = 400.0f; - Actor_SetScale(&this->actor, 0.02f); - this->scale = 0.02f; - } - break; -======= break; } ->>>>>>> Stashed changes case ITEM00_SEEDS: if (CVar_GetS32("gNewDrops", 0) !=0) { Actor_SetScale(&this->actor, 0.2f); @@ -616,36 +515,19 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) { yOffset = 50.0f; shadowScale = 0.5f; this->actor.world.rot.x = 0x4000; -<<<<<<< Updated upstream - } else { - yOffset = 400.0f; - Actor_SetScale(&this->actor, 0.02f); - this->scale = 0.02f; - } - break; -======= break; } ->>>>>>> Stashed changes case ITEM00_BOMBS_SPECIAL: if (CVar_GetS32("gNewDrops", 0) !=0) { Actor_SetScale(&this->actor, 0.2f); this->scale = 0.2f; yOffset = 50.0f; shadowScale = 0.5f; -<<<<<<< Updated upstream - this->actor.world.rot.x = 0x4000; - } else { - Actor_SetScale(&this->actor, 0.03f); - this->scale = 0.03f; - yOffset = 320.0f; -======= this->actor.world.rot.x = 0x4000; } else { Actor_SetScale(&this->actor, 0.03f); this->scale = 0.03f; yOffset = 320.0f; ->>>>>>> Stashed changes } break; case ITEM00_MAGIC_LARGE: @@ -656,39 +538,28 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) { shadowScale = 0.5f; this->actor.world.rot.x = 0x4000; } else { -<<<<<<< Updated upstream - yOffset = 400.0f; - Actor_SetScale(&this->actor, 0.02f); - this->scale = 0.02f; -======= Actor_SetScale(&this->actor, 0.045 - 1e-10); this->scale = 0.045 - 1e-10; yOffset = 320.0f; ->>>>>>> Stashed changes } break; case ITEM00_RUPEE_ORANGE: if (CVar_GetS32("gNewDrops", 0) !=0) { - Actor_SetScale(&this->actor, 0.3f); - this->scale = 0.3f; + Actor_SetScale(&this->actor, 0.45f); + this->scale = 0.45f; yOffset = 50.0f; shadowScale = 0.3f; this->actor.world.rot.x = 0x4000; } else { -<<<<<<< Updated upstream - Actor_SetScale(&this->actor, 0.03f); - this->scale = 0.03f; -======= Actor_SetScale(&this->actor, 0.045 - 1e-10); this->scale = 0.045 - 1e-10; ->>>>>>> Stashed changes yOffset = 750.0f; } break; case ITEM00_RUPEE_PURPLE: if (CVar_GetS32("gNewDrops", 0) !=0) { - Actor_SetScale(&this->actor, 0.3f); - this->scale = 0.3f; + Actor_SetScale(&this->actor, 0.4f); + this->scale = 0.4f; yOffset = 50.0f; shadowScale = 0.3f; this->actor.world.rot.x = 0x4000; @@ -833,32 +704,19 @@ void EnItem00_Destroy(Actor* thisx, GlobalContext* globalCtx) { } void func_8001DFC8(EnItem00* this, GlobalContext* globalCtx) { -<<<<<<< Updated upstream - if (CVar_GetS32("gNewDrops", 0) !=0) { //set the rotation system on selected model only :) - if ((this->actor.params == ITEM00_ARROWS_SINGLE) || (this->actor.params == ITEM00_ARROWS_SMALL) || -======= if (CVar_GetS32("gNewDrops", 0) !=0) { //set the rotation system on selected model only :) if ((this->actor.params == ITEM_RUPEE_GOLD) || (this->actor.params == ITEM_RUPEE_PURPLE) || (this->actor.params == ITEM00_ARROWS_SINGLE) || (this->actor.params == ITEM00_ARROWS_SMALL) || ->>>>>>> Stashed changes (this->actor.params == ITEM00_ARROWS_MEDIUM) || (this->actor.params == ITEM00_ARROWS_LARGE) || (this->actor.params == ITEM00_BOMBS_A) || (this->actor.params == ITEM00_BOMBS_B) || (this->actor.params == ITEM00_NUTS) || (this->actor.params == ITEM00_STICK) || (this->actor.params == ITEM00_MAGIC_SMALL) || (this->actor.params == ITEM00_SEEDS) || -<<<<<<< Updated upstream - (this->actor.params == ITEM00_BOMBS_SPECIAL) || (this->actor.params == ITEM00_MAGIC_LARGE) || - (this->actor.params == ITEM00_HEART)) { - this->actor.shape.rot.y = DroppedItemRot; - } - } - -======= (this->actor.params == ITEM00_MAGIC_LARGE) || (this->actor.params == ITEM00_HEART) || (this->actor.params == ITEM00_BOMBS_SPECIAL)) { this->actor.shape.rot.y = DroppedItemRot; } } ->>>>>>> Stashed changes + if ((this->actor.params <= ITEM00_RUPEE_RED) || ((this->actor.params == ITEM00_HEART) && (this->unk_15A < 0)) || (this->actor.params == ITEM00_HEART_PIECE)) { this->actor.shape.rot.y += 960; @@ -1239,57 +1097,35 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) { void EnItem00_Draw(Actor* thisx, GlobalContext* globalCtx) { EnItem00* this = (EnItem00*)thisx; f32 mtxScale; - + if (!(this->unk_156 & this->unk_158)) { switch (this->actor.params) { case ITEM00_RUPEE_GREEN: if (CVar_GetS32("gNewDrops", 0) !=0) { -<<<<<<< Updated upstream - GetItem_Draw(globalCtx, GID_RUPEE_GREEN); - break; -======= GetItem_Draw(globalCtx, GID_RUPEE_GREEN); break; ->>>>>>> Stashed changes - } + } case ITEM00_RUPEE_BLUE: if (CVar_GetS32("gNewDrops", 0) !=0) { GetItem_Draw(globalCtx, GID_RUPEE_BLUE); -<<<<<<< Updated upstream - break; -======= break; ->>>>>>> Stashed changes } case ITEM00_RUPEE_RED: if (CVar_GetS32("gNewDrops", 0) !=0) { GetItem_Draw(globalCtx, GID_RUPEE_RED); -<<<<<<< Updated upstream - break; -======= break; ->>>>>>> Stashed changes } case ITEM00_RUPEE_ORANGE: if (CVar_GetS32("gNewDrops", 0) !=0) { GetItem_Draw(globalCtx, GID_RUPEE_GOLD); -<<<<<<< Updated upstream - break; -======= break; ->>>>>>> Stashed changes } case ITEM00_RUPEE_PURPLE: if (CVar_GetS32("gNewDrops", 0) !=0) { GetItem_Draw(globalCtx, GID_RUPEE_PURPLE); } else { -<<<<<<< Updated upstream - EnItem00_DrawRupee(this, globalCtx); - } -======= EnItem00_DrawRupee(this, globalCtx); } ->>>>>>> Stashed changes break; case ITEM00_HEART_PIECE: EnItem00_DrawHeartPiece(this, globalCtx); @@ -1300,27 +1136,6 @@ void EnItem00_Draw(Actor* thisx, GlobalContext* globalCtx) { case ITEM00_HEART: if (CVar_GetS32("gNewDrops", 0) !=0) { GetItem_Draw(globalCtx, GID_HEART); -<<<<<<< Updated upstream - } else { - if (this->unk_15A < 0) { - if (this->unk_15A == -1) { - s8 bankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_GI_HEART); - - if (Object_IsLoaded(&globalCtx->objectCtx, bankIndex)) { - this->actor.objBankIndex = bankIndex; - Actor_SetObjectDependency(globalCtx, &this->actor); - this->unk_15A = -2; - } - } else { - mtxScale = 16.0f; - Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY); - GetItem_Draw(globalCtx, GID_HEART); - } - break; - } - } - break; -======= mtxScale = 16.0f; Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY); break; @@ -1342,23 +1157,10 @@ void EnItem00_Draw(Actor* thisx, GlobalContext* globalCtx) { break; } } ->>>>>>> Stashed changes case ITEM00_BOMBS_A: if (CVar_GetS32("gNewDrops", 0) !=0) { GetItem_Draw(globalCtx, GID_BOMB); break; -<<<<<<< Updated upstream - } - case ITEM00_BOMBS_B: - if (CVar_GetS32("gNewDrops", 0) !=0) { - GetItem_Draw(globalCtx, GID_BOMB); - break; - } - case ITEM00_BOMBS_SPECIAL: - if (CVar_GetS32("gNewDrops", 0) !=0) { - GetItem_Draw(globalCtx, GID_BOMB); - break; -======= } case ITEM00_BOMBS_B: if (CVar_GetS32("gNewDrops", 0) !=0) { @@ -1366,11 +1168,6 @@ void EnItem00_Draw(Actor* thisx, GlobalContext* globalCtx) { break; } case ITEM00_BOMBS_SPECIAL: - if (CVar_GetS32("gNewDrops", 0) !=0) { - GetItem_Draw(globalCtx, GID_BOMB); - break; ->>>>>>> Stashed changes - } case ITEM00_ARROWS_SINGLE: if (CVar_GetS32("gNewDrops", 0) !=0) { GetItem_Draw(globalCtx, GID_ARROWS_SMALL); @@ -1380,38 +1177,22 @@ void EnItem00_Draw(Actor* thisx, GlobalContext* globalCtx) { if (CVar_GetS32("gNewDrops", 0) !=0) { GetItem_Draw(globalCtx, GID_ARROWS_SMALL); break; -<<<<<<< Updated upstream - } - case ITEM00_ARROWS_MEDIUM: - if (CVar_GetS32("gNewDrops", 0) !=0) { - GetItem_Draw(globalCtx, GID_ARROWS_MEDIUM); - break; -======= - } + } case ITEM00_ARROWS_MEDIUM: if (CVar_GetS32("gNewDrops", 0) !=0) { GetItem_Draw(globalCtx, GID_ARROWS_MEDIUM); break; ->>>>>>> Stashed changes } case ITEM00_ARROWS_LARGE: if (CVar_GetS32("gNewDrops", 0) !=0) { GetItem_Draw(globalCtx, GID_ARROWS_LARGE); -<<<<<<< Updated upstream - break; -======= break; ->>>>>>> Stashed changes } case ITEM00_NUTS: if (CVar_GetS32("gNewDrops", 0) !=0) { GetItem_Draw(globalCtx, GID_NUTS); break; -<<<<<<< Updated upstream - } -======= } ->>>>>>> Stashed changes case ITEM00_STICK: if (CVar_GetS32("gNewDrops", 0) !=0) { GetItem_Draw(globalCtx, GID_STICK); @@ -1420,24 +1201,11 @@ void EnItem00_Draw(Actor* thisx, GlobalContext* globalCtx) { case ITEM00_MAGIC_LARGE: if (CVar_GetS32("gNewDrops", 0) !=0) { GetItem_Draw(globalCtx, GID_MAGIC_LARGE); -<<<<<<< Updated upstream - break; -======= break; ->>>>>>> Stashed changes } case ITEM00_MAGIC_SMALL: if (CVar_GetS32("gNewDrops", 0) !=0) { GetItem_Draw(globalCtx, GID_MAGIC_SMALL); -<<<<<<< Updated upstream - break; - } - case ITEM00_SEEDS: - if (CVar_GetS32("gNewDrops", 0) !=0) { - GetItem_Draw(globalCtx, GID_SEEDS); - break; - } -======= break; } case ITEM00_SEEDS: @@ -1445,7 +1213,6 @@ void EnItem00_Draw(Actor* thisx, GlobalContext* globalCtx) { GetItem_Draw(globalCtx, GID_SEEDS); break; } ->>>>>>> Stashed changes case ITEM00_SMALL_KEY: EnItem00_DrawCollectible(this, globalCtx); break;