mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 06:13:45 -07:00
Merge branch 'develop' into n64colors
This commit is contained in:
commit
e0476d28ac
19 changed files with 349 additions and 100 deletions
22
BUILDING.md
Normal file
22
BUILDING.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Building Ship of Harkinian
|
||||
|
||||
1. Install [Python](https://www.python.org/ftp/python/3.10.2/python-3.10.2-amd64.exe)
|
||||
2. Install [Visual Studio 2022 Community Edition](https://visualstudio.microsoft.com/vs/community/)
|
||||
2b. In the Visual Studio Installer, install `MSVC v142 - VS 2019 C++`.
|
||||
4. Clone the Ship of Harkinian repository.
|
||||
5. Place one or more [compatible](#compatible-roms) roms in the `OTRExporter` directory with namings of your choice.
|
||||
6. Run `OTRExporter/OTRExporter.sln`.
|
||||
7. Switch the solution to `Release x64`.
|
||||
8. Build the solution.
|
||||
9. Launching `OTRExporter/extract_assets.py` will generate an `oot.otr` archive file in `OTRExporter/oot.otr`.
|
||||
10. Run `soh/soh.sln`
|
||||
11. Switch the solution to `Release x86`.
|
||||
12. Build the solution.
|
||||
13. Copy the `OTRExporter/oot.otr` archive file to `soh/Release`.
|
||||
14. Launch `soh.exe`.
|
||||
|
||||
## Compatible Roms
|
||||
```
|
||||
OOT_PAL_GC checksum 0x09465AC3
|
||||
OOT_PAL_GC_DBG1 checksum 0x871E1C92 (debug non-master quest)
|
||||
```
|
20
README.md
20
README.md
|
@ -51,26 +51,8 @@ Official Discord: https://discord.com/invite/BtBmd55HVH
|
|||
|
||||
## Building The Ship of Harkinian
|
||||
|
||||
1. Install [Python](https://www.python.org/ftp/python/3.10.2/python-3.10.2-amd64.exe)
|
||||
2. Install [Visual Studio 2022 Community Edition](https://visualstudio.microsoft.com/vs/community/)
|
||||
2b. In the Visual Studio Installer, install `MSVC v142 - VS 2019 C++`.
|
||||
4. Clone the Ship of Harkinian repository.
|
||||
5. Place one or more [compatible](#compatible-roms) roms in the `OTRExporter` directory with namings of your choice.
|
||||
6. Run `OTRExporter/OTRExporter.sln`.
|
||||
7. Switch the solution to `Release x64`.
|
||||
8. Build the solution.
|
||||
9. Launching `OTRExporter/extract_assets.py` will generate an `oot.otr` archive file in `OTRExporter/oot.otr`.
|
||||
10. Run `soh/soh.sln`
|
||||
11. Switch the solution to `Release x86`.
|
||||
12. Build the solution.
|
||||
13. Copy the `OTRExporter/oot.otr` archive file to `soh/Release`.
|
||||
14. Launch `soh.exe`.
|
||||
Refer to the [building instructions](https://github.com/HarbourMasters/Shipwright/BUILDING.md) to compile SoH.
|
||||
|
||||
## Compatible Roms
|
||||
```
|
||||
OOT_PAL_GC checksum 0x09465AC3
|
||||
OOT_PAL_GC_DBG1 checksum 0x871E1C92 (debug non-master quest)
|
||||
```
|
||||
## Troubleshooting The Exporter
|
||||
- Affirm that you have an `/assets` folder filled with XMLs in the same directory as OTRGui.exe
|
||||
- Affirm that `zapd.exe` exists in the `/assets/extractor` folder
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include "spdlog/spdlog.h"
|
||||
#include "GlobalCtx2.h"
|
||||
#include "Window.h"
|
||||
#include "GameSettings.h"
|
||||
|
||||
namespace Ship {
|
||||
ConfigFile::ConfigFile(std::shared_ptr<GlobalCtx2> Context, const std::string& Path) : Context(Context), Path(Path), File(Path.c_str()) {
|
||||
|
@ -149,6 +150,8 @@ namespace Ship {
|
|||
(*this)["KEYBOARD CONTROLLER BINDING 4"][STR(BTN_STICKDOWN)] = std::to_string(0x01F);
|
||||
(*this)["KEYBOARD CONTROLLER BINDING 4"][STR(BTN_STICKUP)] = std::to_string(0x011);
|
||||
|
||||
(*this)["ENHANCEMENT SETTINGS"]["TEXT_SPEED"] = "1";
|
||||
|
||||
(*this)["SDL CONTROLLER 1"]["GUID"] = "";
|
||||
(*this)["SDL CONTROLLER 2"]["GUID"] = "";
|
||||
(*this)["SDL CONTROLLER 3"]["GUID"] = "";
|
||||
|
|
|
@ -76,6 +76,9 @@ namespace Game {
|
|||
Settings.enhancements.gc_colors = stob(Conf[EnhancementSection]["gc_colors"]);
|
||||
CVar_SetS32("gGameCubeColors", Settings.enhancements.gc_colors);
|
||||
|
||||
Settings.enhancements.newdrops = stob(Conf[EnhancementSection]["newdrops"]);
|
||||
CVar_SetS32("gNewDrops", Settings.enhancements.newdrops);
|
||||
|
||||
// Audio
|
||||
Settings.audio.master = Ship::stof(Conf[AudioSection]["master"]);
|
||||
CVar_SetFloat("gGameMasterVolume", Settings.audio.master);
|
||||
|
@ -181,6 +184,7 @@ namespace Game {
|
|||
Conf[EnhancementSection]["animated_pause_menu"] = std::to_string(Settings.enhancements.animated_pause_menu);
|
||||
Conf[EnhancementSection]["dynamic_wallet_icon"] = std::to_string(Settings.enhancements.dynamic_wallet_icon);
|
||||
Conf[EnhancementSection]["minimal_ui"] = std::to_string(Settings.enhancements.minimal_ui);
|
||||
Conf[EnhancementSection]["newdrops"] = std::to_string(Settings.enhancements.newdrops);
|
||||
Conf[EnhancementSection]["visualagony"] = std::to_string(Settings.enhancements.visualagony);
|
||||
Conf[EnhancementSection]["mm_bunny_hood"] = std::to_string(Settings.enhancements.mm_bunny_hood);
|
||||
Conf[EnhancementSection]["gc_colors"] = std::to_string(Settings.enhancements.gc_colors);
|
||||
|
|
|
@ -26,6 +26,7 @@ struct SoHConfigType {
|
|||
bool animated_pause_menu = false;
|
||||
bool dynamic_wallet_icon = false;
|
||||
bool minimal_ui = false;
|
||||
bool newdrops = false;
|
||||
bool visualagony = false;
|
||||
bool mm_bunny_hood = false;
|
||||
bool gc_colors = false;
|
||||
|
|
|
@ -395,8 +395,8 @@ namespace SohImGui {
|
|||
ImGui::Text("Gameplay");
|
||||
ImGui::Separator();
|
||||
|
||||
ImGui::Text("Text Speed", Game::Settings.enhancements.text_speed);
|
||||
if (ImGui::SliderInt("##TEXTSPEED", &Game::Settings.enhancements.text_speed, 1, 5)) {
|
||||
ImGui::Text("Text Speed: %dx", Game::Settings.enhancements.text_speed);
|
||||
if (ImGui::SliderInt("##TEXTSPEED", &Game::Settings.enhancements.text_speed, 1, 5, "")) {
|
||||
CVar_SetS32("gTextSpeed", Game::Settings.enhancements.text_speed);
|
||||
needs_save = true;
|
||||
}
|
||||
|
@ -416,6 +416,11 @@ namespace SohImGui {
|
|||
needs_save = true;
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox("Visual Stone of Agony", &Game::Settings.enhancements.visualagony)) {
|
||||
CVar_SetS32("gVisualAgony", Game::Settings.enhancements.visualagony);
|
||||
needs_save = true;
|
||||
}
|
||||
|
||||
ImGui::Text("Graphics");
|
||||
ImGui::Separator();
|
||||
|
||||
|
@ -437,6 +442,11 @@ 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;
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox("Dynamic Wallet Icon", &Game::Settings.enhancements.dynamic_wallet_icon)) {
|
||||
CVar_SetS32(const_cast<char*>("gDynamicWalletIcon"), Game::Settings.enhancements.dynamic_wallet_icon);
|
||||
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
const char gBuildVersion[] = "DECKARD ALFA (1.0.0)";
|
||||
const char gBuildTeam[] = "github.com/harbourmasters";
|
||||
#ifdef __TIMESTAMP__
|
||||
const char gBuildDate[] = __TIMESTAMP__;
|
||||
#else
|
||||
const char gBuildDate[] = __DATE__ " " __TIME__;
|
||||
#endif
|
||||
const char gBuildMakeOption[] = "";
|
|
@ -129,6 +129,7 @@ extern GraphicsContext* __gfxCtx;
|
|||
#define WORK_DISP __gfxCtx->work.p
|
||||
#define POLY_OPA_DISP __gfxCtx->polyOpa.p
|
||||
#define POLY_XLU_DISP __gfxCtx->polyXlu.p
|
||||
#define TITLE_CARD_DISP __gfxCtx->titlecard.p
|
||||
#define POLY_KAL_DISP __gfxCtx->polyKal.p
|
||||
#define OVERLAY_DISP __gfxCtx->overlay.p
|
||||
|
||||
|
|
|
@ -83,6 +83,7 @@ typedef struct {
|
|||
/* 0x00000 */ u16 headMagic; // GFXPOOL_HEAD_MAGIC
|
||||
/* 0x00008 */ Gfx polyOpaBuffer[0x2FC0];
|
||||
/* 0x0BF08 */ Gfx polyXluBuffer[0x1000];
|
||||
/* 0xXXXXX */ Gfx titlecardBuffer[0x1000];
|
||||
/* 0x0BF08 */ Gfx polyKalBuffer[0x1000];
|
||||
/* 0x0FF08 */ Gfx overlayBuffer[0x800];
|
||||
/* 0x11F08 */ Gfx workBuffer[0x100];
|
||||
|
@ -130,6 +131,7 @@ typedef struct OSScTask {
|
|||
typedef struct GraphicsContext {
|
||||
/* 0x0000 */ Gfx* polyOpaBuffer; // Pointer to "Zelda 0"
|
||||
/* 0x0004 */ Gfx* polyXluBuffer; // Pointer to "Zelda 1"
|
||||
/* 0xXXX */ Gfx* titlecardBuffer; // Pointer to "Paris"
|
||||
/* 0xXXX */ Gfx* polyKalBuffer; // Pointer to "Rome"
|
||||
/* 0x0008 */ char unk_008[0x08]; // Unused, could this be pointers to "Zelda 2" / "Zelda 3"
|
||||
/* 0x0010 */ Gfx* overlayBuffer; // Pointer to "Zelda 4"
|
||||
|
@ -149,6 +151,7 @@ typedef struct GraphicsContext {
|
|||
/* 0x02A8 */ TwoHeadGfxArena overlay; // "Zelda 4"
|
||||
/* 0x02B8 */ TwoHeadGfxArena polyOpa; // "Zelda 0"
|
||||
/* 0x02C8 */ TwoHeadGfxArena polyXlu; // "Zelda 1"
|
||||
/* 0x0XXX */ TwoHeadGfxArena titlecard; // When in Paris...
|
||||
/* 0x0XXX */ TwoHeadGfxArena polyKal; // When in Rome...
|
||||
/* 0x02D8 */ u32 gfxPoolIdx;
|
||||
/* 0x02DC */ u16* curFrameBuffer;
|
||||
|
|
|
@ -112,9 +112,6 @@
|
|||
<GenerateMapFile>true</GenerateMapFile>
|
||||
<MapExports>true</MapExports>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>copy /b $(ProjectDir)src\boot\build.c +,,</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
|
|
|
@ -25,7 +25,9 @@ void BootCommands_Init()
|
|||
CVar_RegisterS32("gDebugEnabled", 0);
|
||||
CVar_RegisterS32("gPauseLiveLink", 0);
|
||||
CVar_RegisterS32("gMinimalUI", 0);
|
||||
CVar_RegisterS32("gNewDrops", 0);
|
||||
CVar_RegisterS32("gVisualAgony", 0);
|
||||
|
||||
}
|
||||
|
||||
//void BootCommands_ParseBootArgs(char* str)
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
const char gBuildVersion[] = "DECKARD ALFA (1.0.0)";
|
||||
const char gBuildTeam[] = "github.com/harbourmasters";
|
||||
#ifdef __TIMESTAMP__
|
||||
const char gBuildDate[] = __TIMESTAMP__;
|
||||
#else
|
||||
const char gBuildDate[] = __DATE__ " " __TIME__;
|
||||
#endif
|
||||
const char gBuildMakeOption[] = "";
|
||||
|
|
|
@ -95,12 +95,14 @@ void Graph_InitTHGA(GraphicsContext* gfxCtx) {
|
|||
pool->tailMagic = GFXPOOL_TAIL_MAGIC;
|
||||
THGA_Ct(&gfxCtx->polyOpa, pool->polyOpaBuffer, sizeof(pool->polyOpaBuffer));
|
||||
THGA_Ct(&gfxCtx->polyXlu, pool->polyXluBuffer, sizeof(pool->polyXluBuffer));
|
||||
THGA_Ct(&gfxCtx->titlecard, pool->titlecardBuffer, sizeof(pool->titlecardBuffer));
|
||||
THGA_Ct(&gfxCtx->polyKal, pool->polyKalBuffer, sizeof(pool->polyKalBuffer));
|
||||
THGA_Ct(&gfxCtx->overlay, pool->overlayBuffer, sizeof(pool->overlayBuffer));
|
||||
THGA_Ct(&gfxCtx->work, pool->workBuffer, sizeof(pool->workBuffer));
|
||||
|
||||
gfxCtx->polyOpaBuffer = pool->polyOpaBuffer;
|
||||
gfxCtx->polyXluBuffer = pool->polyXluBuffer;
|
||||
gfxCtx->titlecardBuffer = pool->titlecardBuffer;
|
||||
gfxCtx->polyKalBuffer = pool->polyKalBuffer;
|
||||
gfxCtx->overlayBuffer = pool->overlayBuffer;
|
||||
gfxCtx->workBuffer = pool->workBuffer;
|
||||
|
@ -274,6 +276,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
|
|||
gDPNoOpString(WORK_DISP++, "WORK_DISP 開始", 0);
|
||||
gDPNoOpString(POLY_OPA_DISP++, "POLY_OPA_DISP 開始", 0);
|
||||
gDPNoOpString(POLY_XLU_DISP++, "POLY_XLU_DISP 開始", 0);
|
||||
gDPNoOpString(TITLE_CARD_DISP++, "TITLE_CARD_DISP 開始", 0);//unsure if needed
|
||||
gDPNoOpString(OVERLAY_DISP++, "OVERLAY_DISP 開始", 0);
|
||||
|
||||
CLOSE_DISPS(gfxCtx, "../graph.c", 975);
|
||||
|
@ -286,6 +289,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
|
|||
gDPNoOpString(WORK_DISP++, "WORK_DISP 終了", 0);
|
||||
gDPNoOpString(POLY_OPA_DISP++, "POLY_OPA_DISP 終了", 0);
|
||||
gDPNoOpString(POLY_XLU_DISP++, "POLY_XLU_DISP 終了", 0);
|
||||
gDPNoOpString(TITLE_CARD_DISP++, "TITLE_CARD_DISP 終了", 0);
|
||||
gDPNoOpString(OVERLAY_DISP++, "OVERLAY_DISP 終了", 0);
|
||||
|
||||
CLOSE_DISPS(gfxCtx, "../graph.c", 996);
|
||||
|
@ -294,6 +298,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
|
|||
|
||||
gSPBranchList(WORK_DISP++, gfxCtx->polyOpaBuffer);
|
||||
gSPBranchList(POLY_OPA_DISP++, gfxCtx->polyXluBuffer);
|
||||
gSPBranchList(POLY_XLU_DISP++, gfxCtx->titlecardBuffer);
|
||||
gSPBranchList(POLY_XLU_DISP++, gfxCtx->polyKalBuffer);
|
||||
gSPBranchList(POLY_KAL_DISP++, gfxCtx->overlayBuffer);
|
||||
gDPPipeSync(OVERLAY_DISP++);
|
||||
|
|
|
@ -992,29 +992,30 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) {
|
|||
height = (width * height > 0x1000) ? 0x1000 / width : height;
|
||||
titleSecondY = titleY + (height * 4);
|
||||
|
||||
OVERLAY_DISP = func_80093808(OVERLAY_DISP);
|
||||
//TITLE_CARD_DISP Goes over POLY_XLU_DISP but under POLY_KAL_DISP
|
||||
TITLE_CARD_DISP = func_80093808(TITLE_CARD_DISP);
|
||||
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->intensity,
|
||||
gDPSetPrimColor(TITLE_CARD_DISP++, 0, 0, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->intensity,
|
||||
(u8)titleCtx->alpha);
|
||||
|
||||
gDPLoadTextureBlock(OVERLAY_DISP++, (uintptr_t)titleCtx->texture + textureLanguageOffset, G_IM_FMT_IA,
|
||||
gDPLoadTextureBlock(TITLE_CARD_DISP++, (uintptr_t)titleCtx->texture + textureLanguageOffset, G_IM_FMT_IA,
|
||||
G_IM_SIZ_8b,
|
||||
width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
|
||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
||||
gSPTextureRectangle(OVERLAY_DISP++, titleX, titleY, ((doubleWidth * 2) + titleX) - 4, titleY + (height * 4) - 1,
|
||||
gSPTextureRectangle(TITLE_CARD_DISP++, titleX, titleY, ((doubleWidth * 2) + titleX) - 4, titleY + (height * 4) - 1,
|
||||
G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
|
||||
|
||||
height = titleCtx->height - height;
|
||||
|
||||
// If texture is bigger than 0x1000, display the rest
|
||||
if (height > 0) {
|
||||
gDPLoadTextureBlock(OVERLAY_DISP++, (uintptr_t)titleCtx->texture + textureLanguageOffset + 0x1000,
|
||||
gDPLoadTextureBlock(TITLE_CARD_DISP++, (uintptr_t)titleCtx->texture + textureLanguageOffset + 0x1000,
|
||||
G_IM_FMT_IA,
|
||||
G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
||||
gSPTextureRectangle(OVERLAY_DISP++, titleX, titleSecondY, ((doubleWidth * 2) + titleX) - 4,
|
||||
gSPTextureRectangle(TITLE_CARD_DISP++, titleX, titleSecondY, ((doubleWidth * 2) + titleX) - 4,
|
||||
titleSecondY + (height * 4) - 1, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
|
||||
#define FLAGS 0
|
||||
|
||||
//Used to force variable to be used in different function, feel free to correct me if you have a better way
|
||||
static s16 DroppedItemRot = 0;
|
||||
|
||||
void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnItem00_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
@ -355,11 +358,34 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
switch (this->actor.params) {
|
||||
case ITEM00_RUPEE_GREEN:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.3f);
|
||||
this->scale = 0.3f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.3f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
break;
|
||||
}
|
||||
case ITEM00_RUPEE_BLUE:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.3f);
|
||||
this->scale = 0.3f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.3f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
}
|
||||
case ITEM00_RUPEE_RED:
|
||||
Actor_SetScale(&this->actor, 0.015f);
|
||||
this->scale = 0.015f;
|
||||
yOffset = 750.0f;
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.3f);
|
||||
this->scale = 0.3f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.3f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
} else {
|
||||
Actor_SetScale(&this->actor, 0.015f);
|
||||
this->scale = 0.015f;
|
||||
yOffset = 750.0f;
|
||||
}
|
||||
break;
|
||||
case ITEM00_SMALL_KEY:
|
||||
this->unk_158 = 0;
|
||||
|
@ -374,10 +400,18 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->scale = 0.02f;
|
||||
break;
|
||||
case ITEM00_HEART:
|
||||
this->actor.home.rot.z = Rand_CenteredFloat(65535.0f);
|
||||
yOffset = 430.0f;
|
||||
Actor_SetScale(&this->actor, 0.02f);
|
||||
this->scale = 0.02f;
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
this->actor.home.rot.z = Rand_CenteredFloat(65535.0f);
|
||||
yOffset = 25.0f;
|
||||
Actor_SetScale(&this->actor, 0.3f);
|
||||
this->scale = 0.3f;
|
||||
shadowScale = 0.5f;
|
||||
} else {
|
||||
this->actor.home.rot.z = Rand_CenteredFloat(65535.0f);
|
||||
yOffset = 430.0f;
|
||||
Actor_SetScale(&this->actor, 0.02f);
|
||||
this->scale = 0.02f;
|
||||
}
|
||||
break;
|
||||
case ITEM00_HEART_CONTAINER:
|
||||
yOffset = 430.0f;
|
||||
|
@ -386,42 +420,154 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->scale = 0.02f;
|
||||
break;
|
||||
case ITEM00_ARROWS_SINGLE:
|
||||
yOffset = 400.0f;
|
||||
Actor_SetScale(&this->actor, 0.02f);
|
||||
this->scale = 0.02f;
|
||||
break;
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.5f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
} else {
|
||||
yOffset = 400.0f;
|
||||
Actor_SetScale(&this->actor, 0.02f);
|
||||
this->scale = 0.02f;
|
||||
}
|
||||
break;
|
||||
case ITEM00_ARROWS_SMALL:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.5f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
break;
|
||||
}
|
||||
case ITEM00_ARROWS_MEDIUM:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.5f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
break;
|
||||
}
|
||||
case ITEM00_ARROWS_LARGE:
|
||||
Actor_SetScale(&this->actor, 0.035f);
|
||||
this->scale = 0.035f;
|
||||
yOffset = 250.0f;
|
||||
break;
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.5f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
} else {
|
||||
Actor_SetScale(&this->actor, 0.035f);
|
||||
this->scale = 0.035f;
|
||||
yOffset = 250.0f;
|
||||
}
|
||||
break;
|
||||
case ITEM00_BOMBS_A:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.5f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
break;
|
||||
}
|
||||
case ITEM00_BOMBS_B:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.5f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
break;
|
||||
}
|
||||
case ITEM00_NUTS:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.5f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
break;
|
||||
}
|
||||
case ITEM00_STICK:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.5f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
break;
|
||||
}
|
||||
case ITEM00_MAGIC_SMALL:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.5f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
break;
|
||||
}
|
||||
case ITEM00_SEEDS:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.5f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
break;
|
||||
}
|
||||
case ITEM00_BOMBS_SPECIAL:
|
||||
Actor_SetScale(&this->actor, 0.03f);
|
||||
this->scale = 0.03f;
|
||||
yOffset = 320.0f;
|
||||
break;
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.5f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
} else {
|
||||
Actor_SetScale(&this->actor, 0.03f);
|
||||
this->scale = 0.03f;
|
||||
yOffset = 320.0f;
|
||||
}
|
||||
break;
|
||||
case ITEM00_MAGIC_LARGE:
|
||||
Actor_SetScale(&this->actor, 0.045 - 1e-10);
|
||||
this->scale = 0.045 - 1e-10;
|
||||
yOffset = 320.0f;
|
||||
break;
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.5f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
} else {
|
||||
Actor_SetScale(&this->actor, 0.045 - 1e-10);
|
||||
this->scale = 0.045 - 1e-10;
|
||||
yOffset = 320.0f;
|
||||
}
|
||||
break;
|
||||
case ITEM00_RUPEE_ORANGE:
|
||||
Actor_SetScale(&this->actor, 0.045 - 1e-10);
|
||||
this->scale = 0.045 - 1e-10;
|
||||
yOffset = 750.0f;
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.45f);
|
||||
this->scale = 0.45f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.3f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
} else {
|
||||
Actor_SetScale(&this->actor, 0.045 - 1e-10);
|
||||
this->scale = 0.045 - 1e-10;
|
||||
yOffset = 750.0f;
|
||||
}
|
||||
break;
|
||||
case ITEM00_RUPEE_PURPLE:
|
||||
Actor_SetScale(&this->actor, 0.03f);
|
||||
this->scale = 0.03f;
|
||||
yOffset = 750.0f;
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.4f);
|
||||
this->scale = 0.4f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.3f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
} else {
|
||||
Actor_SetScale(&this->actor, 0.03f);
|
||||
this->scale = 0.03f;
|
||||
yOffset = 750.0f;
|
||||
}
|
||||
break;
|
||||
case ITEM00_FLEXIBLE:
|
||||
yOffset = 500.0f;
|
||||
|
@ -558,6 +704,19 @@ void EnItem00_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_8001DFC8(EnItem00* this, GlobalContext* globalCtx) {
|
||||
|
||||
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) ||
|
||||
(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) ||
|
||||
(this->actor.params == ITEM00_MAGIC_LARGE) || (this->actor.params == ITEM00_HEART) || (this->actor.params == ITEM00_BOMBS_SPECIAL)) {
|
||||
this->actor.shape.rot.y = DroppedItemRot;
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
@ -731,6 +890,10 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
EnItem00* this = (EnItem00*)thisx;
|
||||
s32 pad;
|
||||
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) { //Update 3D Model rotation on frame update :)
|
||||
DroppedItemRot += 100;
|
||||
}
|
||||
|
||||
if (this->unk_15A > 0) {
|
||||
this->unk_15A--;
|
||||
}
|
||||
|
@ -938,11 +1101,31 @@ void EnItem00_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (!(this->unk_156 & this->unk_158)) {
|
||||
switch (this->actor.params) {
|
||||
case ITEM00_RUPEE_GREEN:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_RUPEE_GREEN);
|
||||
break;
|
||||
}
|
||||
case ITEM00_RUPEE_BLUE:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_RUPEE_BLUE);
|
||||
break;
|
||||
}
|
||||
case ITEM00_RUPEE_RED:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_RUPEE_RED);
|
||||
break;
|
||||
}
|
||||
case ITEM00_RUPEE_ORANGE:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_RUPEE_GOLD);
|
||||
break;
|
||||
}
|
||||
case ITEM00_RUPEE_PURPLE:
|
||||
EnItem00_DrawRupee(this, globalCtx);
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_RUPEE_PURPLE);
|
||||
} else {
|
||||
EnItem00_DrawRupee(this, globalCtx);
|
||||
}
|
||||
break;
|
||||
case ITEM00_HEART_PIECE:
|
||||
EnItem00_DrawHeartPiece(this, globalCtx);
|
||||
|
@ -951,34 +1134,85 @@ void EnItem00_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
EnItem00_DrawHeartContainer(this, globalCtx);
|
||||
break;
|
||||
case ITEM00_HEART:
|
||||
if (this->unk_15A < 0) {
|
||||
if (this->unk_15A == -1) {
|
||||
s8 bankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_GI_HEART);
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_HEART);
|
||||
mtxScale = 16.0f;
|
||||
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
|
||||
break;
|
||||
} 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;
|
||||
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;
|
||||
}
|
||||
}
|
||||
case ITEM00_BOMBS_A:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_BOMB);
|
||||
break;
|
||||
}
|
||||
case ITEM00_BOMBS_B:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_BOMB);
|
||||
break;
|
||||
}
|
||||
case ITEM00_BOMBS_SPECIAL:
|
||||
case ITEM00_ARROWS_SINGLE:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_ARROWS_SMALL);
|
||||
break;
|
||||
}
|
||||
case ITEM00_ARROWS_SMALL:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_ARROWS_SMALL);
|
||||
break;
|
||||
}
|
||||
case ITEM00_ARROWS_MEDIUM:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_ARROWS_MEDIUM);
|
||||
break;
|
||||
}
|
||||
case ITEM00_ARROWS_LARGE:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_ARROWS_LARGE);
|
||||
break;
|
||||
}
|
||||
case ITEM00_NUTS:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_NUTS);
|
||||
break;
|
||||
}
|
||||
case ITEM00_STICK:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_STICK);
|
||||
break;
|
||||
}
|
||||
case ITEM00_MAGIC_LARGE:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_MAGIC_LARGE);
|
||||
break;
|
||||
}
|
||||
case ITEM00_MAGIC_SMALL:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_MAGIC_SMALL);
|
||||
break;
|
||||
}
|
||||
case ITEM00_SEEDS:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_SEEDS);
|
||||
break;
|
||||
}
|
||||
case ITEM00_SMALL_KEY:
|
||||
EnItem00_DrawCollectible(this, globalCtx);
|
||||
break;
|
||||
|
|
|
@ -664,6 +664,7 @@ void Minimap_Draw(GlobalContext* globalCtx) {
|
|||
if (CHECK_DUNGEON_ITEM(DUNGEON_MAP, mapIndex)) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 100, 255, 255, interfaceCtx->minimapAlpha);
|
||||
|
||||
gSPInvalidateTexCache(OVERLAY_DISP++, interfaceCtx->mapSegment);
|
||||
gDPLoadTextureBlock_4b(OVERLAY_DISP++, interfaceCtx->mapSegment, G_IM_FMT_I, 96, 85, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
|
||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
|
|
@ -1180,7 +1180,7 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) {
|
|||
}
|
||||
}
|
||||
if (msgCtx->textDelayTimer == 0) {
|
||||
msgCtx->textDrawPos = i + CVar_GetS32("gTextSpeed", 1);
|
||||
msgCtx->textDrawPos = i + 1;
|
||||
msgCtx->textDelayTimer = msgCtx->textDelay;
|
||||
} else {
|
||||
msgCtx->textDelayTimer--;
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "objects/object_link_child/object_link_child.h"
|
||||
#include "textures/icon_item_24_static/icon_item_24_static.h"
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 itemId;
|
||||
|
@ -10265,7 +10266,7 @@ void func_80848C74(GlobalContext* globalCtx, Player* this) {
|
|||
}
|
||||
}
|
||||
|
||||
void func_80848EF8(Player* this) {
|
||||
void func_80848EF8(Player* this, GlobalContext* globalCtx) {
|
||||
if (CHECK_QUEST_ITEM(QUEST_STONE_OF_AGONY)) {
|
||||
f32 temp = 200000.0f - (this->unk_6A4 * 5.0f);
|
||||
|
||||
|
@ -10584,7 +10585,7 @@ void Player_UpdateCommon(Player* this, GlobalContext* globalCtx, Input* input) {
|
|||
else {
|
||||
this->fallStartHeight = this->actor.world.pos.y;
|
||||
}
|
||||
func_80848EF8(this);
|
||||
func_80848EF8(this, globalCtx);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3271,15 +3271,9 @@ void KaleidoScope_Update(GlobalContext* globalCtx)
|
|||
if (gSaveContext.language == LANGUAGE_ENG) {
|
||||
memcpy(pauseCtx->nameSegment + 0x400, ResourceMgr_LoadTexByName(mapNameTextures[36 + gSaveContext.worldMapArea]), 0xA00);
|
||||
} else if (gSaveContext.language == LANGUAGE_GER) {
|
||||
DmaMgr_SendRequest1(pauseCtx->nameSegment + 0x400,
|
||||
(uintptr_t)_map_name_staticSegmentRomStart +
|
||||
(((void)0, gSaveContext.worldMapArea) * 0xA00) + 0x16C00,
|
||||
0xA00, "../z_kaleido_scope_PAL.c", 3780);
|
||||
memcpy(pauseCtx->nameSegment + 0x400, ResourceMgr_LoadTexByName(mapNameTextures[59 + gSaveContext.worldMapArea]), 0xA00);
|
||||
} else {
|
||||
DmaMgr_SendRequest1(pauseCtx->nameSegment + 0x400,
|
||||
(uintptr_t)_map_name_staticSegmentRomStart +
|
||||
(((void)0, gSaveContext.worldMapArea) * 0xA00) + 0x24800,
|
||||
0xA00, "../z_kaleido_scope_PAL.c", 3784);
|
||||
memcpy(pauseCtx->nameSegment + 0x400, ResourceMgr_LoadTexByName(mapNameTextures[81 + gSaveContext.worldMapArea]), 0xA00);
|
||||
}
|
||||
}
|
||||
// OTRTODO - player on pause
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue