Clean Const that was present nor not.

This commit is contained in:
Baoulettes 2022-04-08 03:43:12 +02:00 committed by GitHub
commit 452bee2648
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 45 additions and 287 deletions

View file

@ -50,80 +50,76 @@ namespace Game {
// Enhancements // Enhancements
Settings.enhancements.fast_text = stob(Conf[EnhancementSection]["fast_text"]); Settings.enhancements.fast_text = stob(Conf[EnhancementSection]["fast_text"]);
CVar_SetS32(const_cast<char*>("gFastText"), Settings.enhancements.fast_text); CVar_SetS32("gFastText", Settings.enhancements.fast_text);
Settings.enhancements.disable_lod = stob(Conf[EnhancementSection]["disable_lod"]); Settings.enhancements.disable_lod = stob(Conf[EnhancementSection]["disable_lod"]);
CVar_SetS32(const_cast<char*>("gDisableLOD"), Settings.enhancements.disable_lod); CVar_SetS32("gDisableLOD", Settings.enhancements.disable_lod);
Settings.enhancements.animated_pause_menu = stob(Conf[EnhancementSection]["animated_pause_menu"]); Settings.enhancements.animated_pause_menu = stob(Conf[EnhancementSection]["animated_pause_menu"]);
CVar_SetS32(const_cast<char*>("gPauseLiveLink"), Settings.enhancements.animated_pause_menu); CVar_SetS32("gPauseLiveLink", Settings.enhancements.animated_pause_menu);
Settings.enhancements.minimal_ui = stob(Conf[EnhancementSection]["minimal_ui"]); Settings.enhancements.minimal_ui = stob(Conf[EnhancementSection]["minimal_ui"]);
CVar_SetS32(const_cast<char*>("gMinimalUI"), Settings.enhancements.minimal_ui); CVar_SetS32(const_cast<char*>("gMinimalUI"), Settings.enhancements.minimal_ui);
Settings.enhancements.newdrops = stob(Conf[EnhancementSection]["newdrops"]); Settings.enhancements.newdrops = stob(Conf[EnhancementSection]["newdrops"]);
<<<<<<< Updated upstream
CVar_SetS32(const_cast<char*>("gNewDrops"), Settings.enhancements.newdrops);
=======
CVar_SetS32("gNewDrops", Settings.enhancements.newdrops); CVar_SetS32("gNewDrops", Settings.enhancements.newdrops);
>>>>>>> Stashed changes
// Audio // Audio
Settings.audio.master = Ship::stof(Conf[AudioSection]["master"]); Settings.audio.master = Ship::stof(Conf[AudioSection]["master"]);
CVar_SetFloat(const_cast<char*>("gGameMasterVolume"), Settings.audio.master); CVar_SetFloat("gGameMasterVolume", Settings.audio.master);
Settings.audio.music_main = Ship::stof(Conf[AudioSection]["music_main"]); Settings.audio.music_main = Ship::stof(Conf[AudioSection]["music_main"]);
CVar_SetFloat(const_cast<char*>("gMainMusicVolume"), Settings.audio.music_main); CVar_SetFloat("gMainMusicVolume", Settings.audio.music_main);
Settings.audio.music_sub = Ship::stof(Conf[AudioSection]["music_sub"]); Settings.audio.music_sub = Ship::stof(Conf[AudioSection]["music_sub"]);
CVar_SetFloat(const_cast<char*>("gSubMusicVolume"), Settings.audio.music_sub); CVar_SetFloat("gSubMusicVolume", Settings.audio.music_sub);
Settings.audio.sfx = Ship::stof(Conf[AudioSection]["sfx"]); Settings.audio.sfx = Ship::stof(Conf[AudioSection]["sfx"]);
CVar_SetFloat(const_cast<char*>("gSFXMusicVolume"), Settings.audio.sfx); CVar_SetFloat("gSFXMusicVolume", Settings.audio.sfx);
Settings.audio.fanfare = Ship::stof(Conf[AudioSection]["fanfare"]); Settings.audio.fanfare = Ship::stof(Conf[AudioSection]["fanfare"]);
CVar_SetFloat(const_cast<char*>("gFanfareVolume"), Settings.audio.fanfare); CVar_SetFloat("gFanfareVolume", Settings.audio.fanfare);
// Controllers // Controllers
Settings.controller.gyro_sensitivity = Ship::stof(Conf[ControllerSection]["gyro_sensitivity"]); Settings.controller.gyro_sensitivity = Ship::stof(Conf[ControllerSection]["gyro_sensitivity"]);
CVar_SetFloat(const_cast<char*>("gGyroSensitivity"), Settings.controller.gyro_sensitivity); CVar_SetFloat("gGyroSensitivity", Settings.controller.gyro_sensitivity);
Settings.controller.rumble_strength = Ship::stof(Conf[ControllerSection]["rumble_strength"]); Settings.controller.rumble_strength = Ship::stof(Conf[ControllerSection]["rumble_strength"]);
CVar_SetFloat(const_cast<char*>("gRumbleStrength"), Settings.controller.rumble_strength); CVar_SetFloat("gRumbleStrength", Settings.controller.rumble_strength);
Settings.controller.input_scale = Ship::stof(Conf[ControllerSection]["input_scale"]); Settings.controller.input_scale = Ship::stof(Conf[ControllerSection]["input_scale"]);
CVar_SetFloat(const_cast<char*>("gInputScale"), Settings.controller.input_scale); CVar_SetFloat("gInputScale", Settings.controller.input_scale);
Settings.controller.input_enabled = stob(Conf[ControllerSection]["input_enabled"]); Settings.controller.input_enabled = stob(Conf[ControllerSection]["input_enabled"]);
CVar_SetS32(const_cast<char*>("gInputEnabled"), Settings.controller.input_enabled); CVar_SetS32("gInputEnabled", Settings.controller.input_enabled);
// Cheats // Cheats
Settings.cheats.debug_mode = stob(Conf[CheatSection]["debug_mode"]); Settings.cheats.debug_mode = stob(Conf[CheatSection]["debug_mode"]);
CVar_SetS32(const_cast<char*>("gDebugEnabled"), Settings.cheats.debug_mode); CVar_SetS32("gDebugEnabled", Settings.cheats.debug_mode);
Settings.cheats.infinite_money = stob(Conf[CheatSection]["infinite_money"]); Settings.cheats.infinite_money = stob(Conf[CheatSection]["infinite_money"]);
CVar_SetS32(const_cast<char*>("gInfiniteMoney"), Settings.cheats.infinite_money); CVar_SetS32("gInfiniteMoney", Settings.cheats.infinite_money);
Settings.cheats.infinite_health = stob(Conf[CheatSection]["infinite_health"]); Settings.cheats.infinite_health = stob(Conf[CheatSection]["infinite_health"]);
CVar_SetS32(const_cast<char*>("gInfiniteHealth"), Settings.cheats.infinite_health); CVar_SetS32("gInfiniteHealth", Settings.cheats.infinite_health);
Settings.cheats.infinite_ammo = stob(Conf[CheatSection]["infinite_ammo"]); Settings.cheats.infinite_ammo = stob(Conf[CheatSection]["infinite_ammo"]);
CVar_SetS32(const_cast<char*>("gInfiniteAmmo"), Settings.cheats.infinite_ammo); CVar_SetS32("gInfiniteAmmo", Settings.cheats.infinite_ammo);
Settings.cheats.infinite_magic = stob(Conf[CheatSection]["infinite_magic"]); Settings.cheats.infinite_magic = stob(Conf[CheatSection]["infinite_magic"]);
CVar_SetS32(const_cast<char*>("gInfiniteMagic"), Settings.cheats.infinite_magic); CVar_SetS32("gInfiniteMagic", Settings.cheats.infinite_magic);
Settings.cheats.no_clip = stob(Conf[CheatSection]["no_clip"]); Settings.cheats.no_clip = stob(Conf[CheatSection]["no_clip"]);
CVar_SetS32(const_cast<char*>("gNoClip"), Settings.cheats.no_clip); CVar_SetS32("gNoClip", Settings.cheats.no_clip);
Settings.cheats.climb_everything = stob(Conf[CheatSection]["climb_everything"]); Settings.cheats.climb_everything = stob(Conf[CheatSection]["climb_everything"]);
CVar_SetS32(const_cast<char*>("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"]); Settings.cheats.moon_jump_on_l = stob(Conf[CheatSection]["moon_jump_on_l"]);
CVar_SetS32(const_cast<char*>("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"]); Settings.cheats.super_tunic = stob(Conf[CheatSection]["super_tunic"]);
CVar_SetS32(const_cast<char*>("gSuperTunic"), Settings.cheats.super_tunic); CVar_SetS32("gSuperTunic", Settings.cheats.super_tunic);
UpdateAudio(); UpdateAudio();
} }

View file

@ -225,7 +225,7 @@ namespace SohImGui {
ImGui::Text(name, static_cast<int>(100 * *(value))); ImGui::Text(name, static_cast<int>(100 * *(value)));
if (ImGui::SliderFloat((std::string("##") + key).c_str(), value, 0.0f, 1.0f, "")) { if (ImGui::SliderFloat((std::string("##") + key).c_str(), value, 0.0f, 1.0f, "")) {
const float volume = floorf(*(value) * 100) / 100; const float volume = floorf(*(value) * 100) / 100;
CVar_SetFloat(const_cast<char*>(key), volume); CVar_SetFloat(key, volume);
needs_save = true; needs_save = true;
Game::SetSeqPlayerVolume(playerId, volume); Game::SetSeqPlayerVolume(playerId, volume);
} }
@ -289,7 +289,7 @@ namespace SohImGui {
const float volume = Game::Settings.audio.master; const float volume = Game::Settings.audio.master;
ImGui::Text("Master Volume: %d %%", static_cast<int>(100 * volume)); ImGui::Text("Master Volume: %d %%", static_cast<int>(100 * volume));
if (ImGui::SliderFloat("##Master_Vol", &Game::Settings.audio.master, 0.0f, 1.0f, "")) { if (ImGui::SliderFloat("##Master_Vol", &Game::Settings.audio.master, 0.0f, 1.0f, "")) {
CVar_SetFloat(const_cast<char*>("gGameMasterVolume"), volume); CVar_SetFloat("gGameMasterVolume", volume);
needs_save = true; needs_save = true;
} }
@ -337,7 +337,7 @@ namespace SohImGui {
ImGui::Separator(); ImGui::Separator();
if (ImGui::Checkbox("Fast Text", &Game::Settings.enhancements.fast_text)) { if (ImGui::Checkbox("Fast Text", &Game::Settings.enhancements.fast_text)) {
CVar_SetS32(const_cast<char*>("gFastText"), Game::Settings.enhancements.fast_text); CVar_SetS32("gFastText", Game::Settings.enhancements.fast_text);
needs_save = true; needs_save = true;
} }
@ -346,11 +346,6 @@ namespace SohImGui {
needs_save = true; 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::Text("Graphics");
ImGui::Separator(); ImGui::Separator();
@ -359,17 +354,17 @@ namespace SohImGui {
} }
if (ImGui::Checkbox("Animated Link in Pause Menu", &Game::Settings.enhancements.animated_pause_menu)) { if (ImGui::Checkbox("Animated Link in Pause Menu", &Game::Settings.enhancements.animated_pause_menu)) {
CVar_SetS32(const_cast<char*>("gPauseLiveLink"), Game::Settings.enhancements.animated_pause_menu); CVar_SetS32("gPauseLiveLink", Game::Settings.enhancements.animated_pause_menu);
needs_save = true; needs_save = true;
} }
if (ImGui::Checkbox("Disable LOD", &Game::Settings.enhancements.disable_lod)) { if (ImGui::Checkbox("Disable LOD", &Game::Settings.enhancements.disable_lod)) {
CVar_SetS32(const_cast<char*>("gDisableLOD"), Game::Settings.enhancements.disable_lod); CVar_SetS32("gDisableLOD", Game::Settings.enhancements.disable_lod);
needs_save = true; needs_save = true;
} }
if (ImGui::Checkbox("Enable 3D Dropped items", &Game::Settings.enhancements.newdrops)) { if (ImGui::Checkbox("Enable 3D Dropped items", &Game::Settings.enhancements.newdrops)) {
CVar_SetS32(const_cast<char*>("gNewDrops"), Game::Settings.enhancements.newdrops); CVar_SetS32("gNewDrops", Game::Settings.enhancements.newdrops);
needs_save = true; needs_save = true;
} }
@ -384,7 +379,7 @@ namespace SohImGui {
ImGui::Separator(); ImGui::Separator();
if (ImGui::Checkbox("Debug Mode", &Game::Settings.cheats.debug_mode)) { if (ImGui::Checkbox("Debug Mode", &Game::Settings.cheats.debug_mode)) {
CVar_SetS32(const_cast<char*>("gDebugEnabled"), Game::Settings.cheats.debug_mode); CVar_SetS32("gDebugEnabled", Game::Settings.cheats.debug_mode);
needs_save = true; needs_save = true;
} }
@ -393,42 +388,42 @@ namespace SohImGui {
if (ImGui::BeginMenu("Cheats")) { if (ImGui::BeginMenu("Cheats")) {
if (ImGui::Checkbox("Infinite Money", &Game::Settings.cheats.infinite_money)) { if (ImGui::Checkbox("Infinite Money", &Game::Settings.cheats.infinite_money)) {
CVar_SetS32(const_cast<char*>("gInfiniteMoney"), Game::Settings.cheats.infinite_money); CVar_SetS32("gInfiniteMoney", Game::Settings.cheats.infinite_money);
needs_save = true; needs_save = true;
} }
if (ImGui::Checkbox("Infinite Health", &Game::Settings.cheats.infinite_health)) { if (ImGui::Checkbox("Infinite Health", &Game::Settings.cheats.infinite_health)) {
CVar_SetS32(const_cast<char*>("gInfiniteHealth"), Game::Settings.cheats.infinite_health); CVar_SetS32("gInfiniteHealth", Game::Settings.cheats.infinite_health);
needs_save = true; needs_save = true;
} }
if (ImGui::Checkbox("Infinite Ammo", &Game::Settings.cheats.infinite_ammo)) { if (ImGui::Checkbox("Infinite Ammo", &Game::Settings.cheats.infinite_ammo)) {
CVar_SetS32(const_cast<char*>("gInfiniteAmmo"), Game::Settings.cheats.infinite_ammo); CVar_SetS32("gInfiniteAmmo", Game::Settings.cheats.infinite_ammo);
needs_save = true; needs_save = true;
} }
if (ImGui::Checkbox("Infinite Magic", &Game::Settings.cheats.infinite_magic)) { if (ImGui::Checkbox("Infinite Magic", &Game::Settings.cheats.infinite_magic)) {
CVar_SetS32(const_cast<char*>("gInfiniteMagic"), Game::Settings.cheats.infinite_magic); CVar_SetS32("gInfiniteMagic", Game::Settings.cheats.infinite_magic);
needs_save = true; needs_save = true;
} }
if (ImGui::Checkbox("No Clip", &Game::Settings.cheats.no_clip)) { if (ImGui::Checkbox("No Clip", &Game::Settings.cheats.no_clip)) {
CVar_SetS32(const_cast<char*>("gNoClip"), Game::Settings.cheats.no_clip); CVar_SetS32("gNoClip", Game::Settings.cheats.no_clip);
needs_save = true; needs_save = true;
} }
if (ImGui::Checkbox("Climb Everything", &Game::Settings.cheats.climb_everything)) { if (ImGui::Checkbox("Climb Everything", &Game::Settings.cheats.climb_everything)) {
CVar_SetS32(const_cast<char*>("gClimbEverything"), Game::Settings.cheats.climb_everything); CVar_SetS32("gClimbEverything", Game::Settings.cheats.climb_everything);
needs_save = true; needs_save = true;
} }
if (ImGui::Checkbox("Moon Jump on L", &Game::Settings.cheats.moon_jump_on_l)) { if (ImGui::Checkbox("Moon Jump on L", &Game::Settings.cheats.moon_jump_on_l)) {
CVar_SetS32(const_cast<char*>("gMoonJumpOnL"), Game::Settings.cheats.moon_jump_on_l); CVar_SetS32("gMoonJumpOnL", Game::Settings.cheats.moon_jump_on_l);
needs_save = true; needs_save = true;
} }
if (ImGui::Checkbox("Super Tunic", &Game::Settings.cheats.super_tunic)) { if (ImGui::Checkbox("Super Tunic", &Game::Settings.cheats.super_tunic)) {
CVar_SetS32(const_cast<char*>("gSuperTunic"), Game::Settings.cheats.super_tunic); CVar_SetS32("gSuperTunic", Game::Settings.cheats.super_tunic);
needs_save = true; needs_save = true;
} }

View file

@ -364,17 +364,8 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
yOffset = 50.0f; yOffset = 50.0f;
shadowScale = 0.3f; shadowScale = 0.3f;
this->actor.world.rot.x = 0x4000; this->actor.world.rot.x = 0x4000;
<<<<<<< Updated upstream
} else {
Actor_SetScale(&this->actor, 0.015f);
this->scale = 0.015f;
yOffset = 750.0f;
}
break;
=======
break; break;
} }
>>>>>>> Stashed changes
case ITEM00_RUPEE_BLUE: case ITEM00_RUPEE_BLUE:
if (CVar_GetS32("gNewDrops", 0) !=0) { if (CVar_GetS32("gNewDrops", 0) !=0) {
Actor_SetScale(&this->actor, 0.3f); Actor_SetScale(&this->actor, 0.3f);
@ -382,16 +373,7 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
yOffset = 50.0f; yOffset = 50.0f;
shadowScale = 0.3f; shadowScale = 0.3f;
this->actor.world.rot.x = 0x4000; 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: case ITEM00_RUPEE_RED:
if (CVar_GetS32("gNewDrops", 0) !=0) { if (CVar_GetS32("gNewDrops", 0) !=0) {
Actor_SetScale(&this->actor, 0.3f); Actor_SetScale(&this->actor, 0.3f);
@ -419,19 +401,6 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
break; break;
case ITEM00_HEART: case ITEM00_HEART:
if (CVar_GetS32("gNewDrops", 0) !=0) { 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); this->actor.home.rot.z = Rand_CenteredFloat(65535.0f);
yOffset = 25.0f; yOffset = 25.0f;
Actor_SetScale(&this->actor, 0.3f); Actor_SetScale(&this->actor, 0.3f);
@ -442,7 +411,6 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
yOffset = 430.0f; yOffset = 430.0f;
Actor_SetScale(&this->actor, 0.02f); Actor_SetScale(&this->actor, 0.02f);
this->scale = 0.02f; this->scale = 0.02f;
>>>>>>> Stashed changes
} }
break; break;
case ITEM00_HEART_CONTAINER: case ITEM00_HEART_CONTAINER:
@ -459,15 +427,9 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
shadowScale = 0.5f; shadowScale = 0.5f;
this->actor.world.rot.x = 0x4000; this->actor.world.rot.x = 0x4000;
} else { } else {
<<<<<<< Updated upstream
yOffset = 400.0f;
Actor_SetScale(&this->actor, 0.02f);
this->scale = 0.02f;
=======
yOffset = 400.0f; yOffset = 400.0f;
Actor_SetScale(&this->actor, 0.02f); Actor_SetScale(&this->actor, 0.02f);
this->scale = 0.02f; this->scale = 0.02f;
>>>>>>> Stashed changes
} }
break; break;
case ITEM00_ARROWS_SMALL: case ITEM00_ARROWS_SMALL:
@ -477,17 +439,8 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
yOffset = 50.0f; yOffset = 50.0f;
shadowScale = 0.5f; shadowScale = 0.5f;
this->actor.world.rot.x = 0x4000; this->actor.world.rot.x = 0x4000;
<<<<<<< Updated upstream
} else {
yOffset = 400.0f;
Actor_SetScale(&this->actor, 0.02f);
this->scale = 0.02f;
}
break;
=======
break; break;
} }
>>>>>>> Stashed changes
case ITEM00_ARROWS_MEDIUM: case ITEM00_ARROWS_MEDIUM:
if (CVar_GetS32("gNewDrops", 0) !=0) { if (CVar_GetS32("gNewDrops", 0) !=0) {
Actor_SetScale(&this->actor, 0.2f); Actor_SetScale(&this->actor, 0.2f);
@ -495,17 +448,8 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
yOffset = 50.0f; yOffset = 50.0f;
shadowScale = 0.5f; shadowScale = 0.5f;
this->actor.world.rot.x = 0x4000; this->actor.world.rot.x = 0x4000;
<<<<<<< Updated upstream
} else {
yOffset = 400.0f;
Actor_SetScale(&this->actor, 0.02f);
this->scale = 0.02f;
}
break;
=======
break; break;
} }
>>>>>>> Stashed changes
case ITEM00_ARROWS_LARGE: case ITEM00_ARROWS_LARGE:
if (CVar_GetS32("gNewDrops", 0) !=0) { if (CVar_GetS32("gNewDrops", 0) !=0) {
Actor_SetScale(&this->actor, 0.2f); Actor_SetScale(&this->actor, 0.2f);
@ -514,15 +458,9 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
shadowScale = 0.5f; shadowScale = 0.5f;
this->actor.world.rot.x = 0x4000; this->actor.world.rot.x = 0x4000;
} else { } else {
<<<<<<< Updated upstream
yOffset = 400.0f;
Actor_SetScale(&this->actor, 0.02f);
this->scale = 0.02f;
=======
Actor_SetScale(&this->actor, 0.035f); Actor_SetScale(&this->actor, 0.035f);
this->scale = 0.035f; this->scale = 0.035f;
yOffset = 250.0f; yOffset = 250.0f;
>>>>>>> Stashed changes
} }
break; break;
case ITEM00_BOMBS_A: case ITEM00_BOMBS_A:
@ -531,19 +469,9 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
this->scale = 0.2f; this->scale = 0.2f;
yOffset = 50.0f; yOffset = 50.0f;
shadowScale = 0.5f; 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; this->actor.world.rot.x = 0x4000;
break; break;
} }
>>>>>>> Stashed changes
case ITEM00_BOMBS_B: case ITEM00_BOMBS_B:
if (CVar_GetS32("gNewDrops", 0) !=0) { if (CVar_GetS32("gNewDrops", 0) !=0) {
Actor_SetScale(&this->actor, 0.2f); Actor_SetScale(&this->actor, 0.2f);
@ -551,18 +479,8 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
yOffset = 50.0f; yOffset = 50.0f;
shadowScale = 0.5f; shadowScale = 0.5f;
this->actor.world.rot.x = 0x4000; this->actor.world.rot.x = 0x4000;
<<<<<<< Updated upstream
} else {
yOffset = 400.0f;
Actor_SetScale(&this->actor, 0.02f);
this->scale = 0.02f;
}
break;
=======
break; break;
} }
>>>>>>> Stashed changes
case ITEM00_NUTS: case ITEM00_NUTS:
if (CVar_GetS32("gNewDrops", 0) !=0) { if (CVar_GetS32("gNewDrops", 0) !=0) {
Actor_SetScale(&this->actor, 0.2f); Actor_SetScale(&this->actor, 0.2f);
@ -570,20 +488,10 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
yOffset = 50.0f; yOffset = 50.0f;
shadowScale = 0.5f; shadowScale = 0.5f;
this->actor.world.rot.x = 0x4000; this->actor.world.rot.x = 0x4000;
<<<<<<< Updated upstream
} else {
yOffset = 400.0f;
Actor_SetScale(&this->actor, 0.02f);
this->scale = 0.02f;
}
break;
=======
break; break;
} }
>>>>>>> Stashed changes
case ITEM00_STICK: case ITEM00_STICK:
if (CVar_GetS32("gNewDrops", 0) !=0) { 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); Actor_SetScale(&this->actor, 0.2f);
this->scale = 0.2f; this->scale = 0.2f;
yOffset = 50.0f; yOffset = 50.0f;
@ -598,17 +506,8 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
yOffset = 50.0f; yOffset = 50.0f;
shadowScale = 0.5f; shadowScale = 0.5f;
this->actor.world.rot.x = 0x4000; this->actor.world.rot.x = 0x4000;
<<<<<<< Updated upstream
} else {
yOffset = 400.0f;
Actor_SetScale(&this->actor, 0.02f);
this->scale = 0.02f;
}
break;
=======
break; break;
} }
>>>>>>> Stashed changes
case ITEM00_SEEDS: case ITEM00_SEEDS:
if (CVar_GetS32("gNewDrops", 0) !=0) { if (CVar_GetS32("gNewDrops", 0) !=0) {
Actor_SetScale(&this->actor, 0.2f); Actor_SetScale(&this->actor, 0.2f);
@ -616,36 +515,19 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
yOffset = 50.0f; yOffset = 50.0f;
shadowScale = 0.5f; shadowScale = 0.5f;
this->actor.world.rot.x = 0x4000; this->actor.world.rot.x = 0x4000;
<<<<<<< Updated upstream
} else {
yOffset = 400.0f;
Actor_SetScale(&this->actor, 0.02f);
this->scale = 0.02f;
}
break;
=======
break; break;
} }
>>>>>>> Stashed changes
case ITEM00_BOMBS_SPECIAL: case ITEM00_BOMBS_SPECIAL:
if (CVar_GetS32("gNewDrops", 0) !=0) { if (CVar_GetS32("gNewDrops", 0) !=0) {
Actor_SetScale(&this->actor, 0.2f); Actor_SetScale(&this->actor, 0.2f);
this->scale = 0.2f; this->scale = 0.2f;
yOffset = 50.0f; yOffset = 50.0f;
shadowScale = 0.5f; 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; this->actor.world.rot.x = 0x4000;
} else { } else {
Actor_SetScale(&this->actor, 0.03f); Actor_SetScale(&this->actor, 0.03f);
this->scale = 0.03f; this->scale = 0.03f;
yOffset = 320.0f; yOffset = 320.0f;
>>>>>>> Stashed changes
} }
break; break;
case ITEM00_MAGIC_LARGE: case ITEM00_MAGIC_LARGE:
@ -656,39 +538,28 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
shadowScale = 0.5f; shadowScale = 0.5f;
this->actor.world.rot.x = 0x4000; this->actor.world.rot.x = 0x4000;
} else { } else {
<<<<<<< Updated upstream
yOffset = 400.0f;
Actor_SetScale(&this->actor, 0.02f);
this->scale = 0.02f;
=======
Actor_SetScale(&this->actor, 0.045 - 1e-10); Actor_SetScale(&this->actor, 0.045 - 1e-10);
this->scale = 0.045 - 1e-10; this->scale = 0.045 - 1e-10;
yOffset = 320.0f; yOffset = 320.0f;
>>>>>>> Stashed changes
} }
break; break;
case ITEM00_RUPEE_ORANGE: case ITEM00_RUPEE_ORANGE:
if (CVar_GetS32("gNewDrops", 0) !=0) { if (CVar_GetS32("gNewDrops", 0) !=0) {
Actor_SetScale(&this->actor, 0.3f); Actor_SetScale(&this->actor, 0.45f);
this->scale = 0.3f; this->scale = 0.45f;
yOffset = 50.0f; yOffset = 50.0f;
shadowScale = 0.3f; shadowScale = 0.3f;
this->actor.world.rot.x = 0x4000; this->actor.world.rot.x = 0x4000;
} else { } else {
<<<<<<< Updated upstream
Actor_SetScale(&this->actor, 0.03f);
this->scale = 0.03f;
=======
Actor_SetScale(&this->actor, 0.045 - 1e-10); Actor_SetScale(&this->actor, 0.045 - 1e-10);
this->scale = 0.045 - 1e-10; this->scale = 0.045 - 1e-10;
>>>>>>> Stashed changes
yOffset = 750.0f; yOffset = 750.0f;
} }
break; break;
case ITEM00_RUPEE_PURPLE: case ITEM00_RUPEE_PURPLE:
if (CVar_GetS32("gNewDrops", 0) !=0) { if (CVar_GetS32("gNewDrops", 0) !=0) {
Actor_SetScale(&this->actor, 0.3f); Actor_SetScale(&this->actor, 0.4f);
this->scale = 0.3f; this->scale = 0.4f;
yOffset = 50.0f; yOffset = 50.0f;
shadowScale = 0.3f; shadowScale = 0.3f;
this->actor.world.rot.x = 0x4000; this->actor.world.rot.x = 0x4000;
@ -833,32 +704,19 @@ void EnItem00_Destroy(Actor* thisx, GlobalContext* globalCtx) {
} }
void func_8001DFC8(EnItem00* this, 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 (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) || 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) || (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_ARROWS_MEDIUM) || (this->actor.params == ITEM00_ARROWS_LARGE) ||
(this->actor.params == ITEM00_BOMBS_A) || (this->actor.params == ITEM00_BOMBS_B) || (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_NUTS) || (this->actor.params == ITEM00_STICK) ||
(this->actor.params == ITEM00_MAGIC_SMALL) || (this->actor.params == ITEM00_SEEDS) || (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.params == ITEM00_MAGIC_LARGE) || (this->actor.params == ITEM00_HEART) || (this->actor.params == ITEM00_BOMBS_SPECIAL)) {
this->actor.shape.rot.y = DroppedItemRot; this->actor.shape.rot.y = DroppedItemRot;
} }
} }
>>>>>>> Stashed changes
if ((this->actor.params <= ITEM00_RUPEE_RED) || ((this->actor.params == ITEM00_HEART) && (this->unk_15A < 0)) || if ((this->actor.params <= ITEM00_RUPEE_RED) || ((this->actor.params == ITEM00_HEART) && (this->unk_15A < 0)) ||
(this->actor.params == ITEM00_HEART_PIECE)) { (this->actor.params == ITEM00_HEART_PIECE)) {
this->actor.shape.rot.y += 960; this->actor.shape.rot.y += 960;
@ -1244,52 +1102,30 @@ void EnItem00_Draw(Actor* thisx, GlobalContext* globalCtx) {
switch (this->actor.params) { switch (this->actor.params) {
case ITEM00_RUPEE_GREEN: case ITEM00_RUPEE_GREEN:
if (CVar_GetS32("gNewDrops", 0) !=0) { if (CVar_GetS32("gNewDrops", 0) !=0) {
<<<<<<< Updated upstream
GetItem_Draw(globalCtx, GID_RUPEE_GREEN);
break;
=======
GetItem_Draw(globalCtx, GID_RUPEE_GREEN); GetItem_Draw(globalCtx, GID_RUPEE_GREEN);
break; break;
>>>>>>> Stashed changes
} }
case ITEM00_RUPEE_BLUE: case ITEM00_RUPEE_BLUE:
if (CVar_GetS32("gNewDrops", 0) !=0) { if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_RUPEE_BLUE); GetItem_Draw(globalCtx, GID_RUPEE_BLUE);
<<<<<<< Updated upstream
break;
=======
break; break;
>>>>>>> Stashed changes
} }
case ITEM00_RUPEE_RED: case ITEM00_RUPEE_RED:
if (CVar_GetS32("gNewDrops", 0) !=0) { if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_RUPEE_RED); GetItem_Draw(globalCtx, GID_RUPEE_RED);
<<<<<<< Updated upstream
break;
=======
break; break;
>>>>>>> Stashed changes
} }
case ITEM00_RUPEE_ORANGE: case ITEM00_RUPEE_ORANGE:
if (CVar_GetS32("gNewDrops", 0) !=0) { if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_RUPEE_GOLD); GetItem_Draw(globalCtx, GID_RUPEE_GOLD);
<<<<<<< Updated upstream
break;
=======
break; break;
>>>>>>> Stashed changes
} }
case ITEM00_RUPEE_PURPLE: case ITEM00_RUPEE_PURPLE:
if (CVar_GetS32("gNewDrops", 0) !=0) { if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_RUPEE_PURPLE); GetItem_Draw(globalCtx, GID_RUPEE_PURPLE);
} else { } else {
<<<<<<< Updated upstream
EnItem00_DrawRupee(this, globalCtx);
}
=======
EnItem00_DrawRupee(this, globalCtx); EnItem00_DrawRupee(this, globalCtx);
} }
>>>>>>> Stashed changes
break; break;
case ITEM00_HEART_PIECE: case ITEM00_HEART_PIECE:
EnItem00_DrawHeartPiece(this, globalCtx); EnItem00_DrawHeartPiece(this, globalCtx);
@ -1300,27 +1136,6 @@ void EnItem00_Draw(Actor* thisx, GlobalContext* globalCtx) {
case ITEM00_HEART: case ITEM00_HEART:
if (CVar_GetS32("gNewDrops", 0) !=0) { if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_HEART); 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; mtxScale = 16.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY); Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
break; break;
@ -1342,23 +1157,10 @@ void EnItem00_Draw(Actor* thisx, GlobalContext* globalCtx) {
break; break;
} }
} }
>>>>>>> Stashed changes
case ITEM00_BOMBS_A: case ITEM00_BOMBS_A:
if (CVar_GetS32("gNewDrops", 0) !=0) { if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_BOMB); GetItem_Draw(globalCtx, GID_BOMB);
break; 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: case ITEM00_BOMBS_B:
if (CVar_GetS32("gNewDrops", 0) !=0) { if (CVar_GetS32("gNewDrops", 0) !=0) {
@ -1366,11 +1168,6 @@ void EnItem00_Draw(Actor* thisx, GlobalContext* globalCtx) {
break; break;
} }
case ITEM00_BOMBS_SPECIAL: case ITEM00_BOMBS_SPECIAL:
if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_BOMB);
break;
>>>>>>> Stashed changes
}
case ITEM00_ARROWS_SINGLE: case ITEM00_ARROWS_SINGLE:
if (CVar_GetS32("gNewDrops", 0) !=0) { if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_ARROWS_SMALL); GetItem_Draw(globalCtx, GID_ARROWS_SMALL);
@ -1380,38 +1177,22 @@ void EnItem00_Draw(Actor* thisx, GlobalContext* globalCtx) {
if (CVar_GetS32("gNewDrops", 0) !=0) { if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_ARROWS_SMALL); GetItem_Draw(globalCtx, GID_ARROWS_SMALL);
break; break;
<<<<<<< Updated upstream
} }
case ITEM00_ARROWS_MEDIUM:
if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_ARROWS_MEDIUM);
break;
=======
}
case ITEM00_ARROWS_MEDIUM: case ITEM00_ARROWS_MEDIUM:
if (CVar_GetS32("gNewDrops", 0) !=0) { if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_ARROWS_MEDIUM); GetItem_Draw(globalCtx, GID_ARROWS_MEDIUM);
break; break;
>>>>>>> Stashed changes
} }
case ITEM00_ARROWS_LARGE: case ITEM00_ARROWS_LARGE:
if (CVar_GetS32("gNewDrops", 0) !=0) { if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_ARROWS_LARGE); GetItem_Draw(globalCtx, GID_ARROWS_LARGE);
<<<<<<< Updated upstream
break;
=======
break; break;
>>>>>>> Stashed changes
} }
case ITEM00_NUTS: case ITEM00_NUTS:
if (CVar_GetS32("gNewDrops", 0) !=0) { if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_NUTS); GetItem_Draw(globalCtx, GID_NUTS);
break; break;
<<<<<<< Updated upstream
}
=======
} }
>>>>>>> Stashed changes
case ITEM00_STICK: case ITEM00_STICK:
if (CVar_GetS32("gNewDrops", 0) !=0) { if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_STICK); GetItem_Draw(globalCtx, GID_STICK);
@ -1420,24 +1201,11 @@ void EnItem00_Draw(Actor* thisx, GlobalContext* globalCtx) {
case ITEM00_MAGIC_LARGE: case ITEM00_MAGIC_LARGE:
if (CVar_GetS32("gNewDrops", 0) !=0) { if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_MAGIC_LARGE); GetItem_Draw(globalCtx, GID_MAGIC_LARGE);
<<<<<<< Updated upstream
break;
=======
break; break;
>>>>>>> Stashed changes
} }
case ITEM00_MAGIC_SMALL: case ITEM00_MAGIC_SMALL:
if (CVar_GetS32("gNewDrops", 0) !=0) { if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_MAGIC_SMALL); 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; break;
} }
case ITEM00_SEEDS: case ITEM00_SEEDS:
@ -1445,7 +1213,6 @@ void EnItem00_Draw(Actor* thisx, GlobalContext* globalCtx) {
GetItem_Draw(globalCtx, GID_SEEDS); GetItem_Draw(globalCtx, GID_SEEDS);
break; break;
} }
>>>>>>> Stashed changes
case ITEM00_SMALL_KEY: case ITEM00_SMALL_KEY:
EnItem00_DrawCollectible(this, globalCtx); EnItem00_DrawCollectible(this, globalCtx);
break; break;