mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 22:33:43 -07:00
fixed building errors
This commit is contained in:
parent
73e989569d
commit
0113dc7fb4
9 changed files with 16 additions and 51 deletions
|
@ -1,15 +0,0 @@
|
|||
#include "menu.hpp"
|
||||
#include "hint_list.hpp"
|
||||
#include "item_list.hpp"
|
||||
#include "item_location.hpp"
|
||||
#include "location_access.hpp"
|
||||
|
||||
#define TICKS_PER_SEC 268123480.0
|
||||
|
||||
int GenerateRando() {
|
||||
HintTable_Init();
|
||||
ItemTable_Init();
|
||||
LocationTable_Init();
|
||||
GenerateRandomizer();
|
||||
return 0;
|
||||
}
|
|
@ -7,10 +7,9 @@
|
|||
|
||||
#define TICKS_PER_SEC 268123480.0
|
||||
|
||||
int RandoMain::GenerateRando() {
|
||||
void RandoMain::GenerateRando() {
|
||||
HintTable_Init();
|
||||
ItemTable_Init();
|
||||
LocationTable_Init();
|
||||
GenerateRandomizer();
|
||||
return 0;
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
namespace RandoMain {
|
||||
int GenerateRando();
|
||||
void GenerateRando();
|
||||
}
|
||||
|
|
|
@ -187,13 +187,13 @@
|
|||
<ClCompile Include="include\randomizer\item_pool.cpp" />
|
||||
<ClCompile Include="include\randomizer\location_access.cpp" />
|
||||
<ClCompile Include="include\randomizer\logic.cpp" />
|
||||
<ClCompile Include="include\randomizer\main.cpp" />
|
||||
<ClCompile Include="include\randomizer\menu.cpp" />
|
||||
<ClCompile Include="include\randomizer\music.cpp" />
|
||||
<ClCompile Include="include\randomizer\patch.cpp" />
|
||||
<ClCompile Include="include\randomizer\playthrough.cpp" />
|
||||
<ClCompile Include="include\randomizer\preset.cpp" />
|
||||
<ClCompile Include="include\randomizer\random.cpp" />
|
||||
<ClCompile Include="include\randomizer\rando_main.cpp" />
|
||||
<ClCompile Include="include\randomizer\settings.cpp" />
|
||||
<ClCompile Include="include\randomizer\setting_descriptions.cpp" />
|
||||
<ClCompile Include="include\randomizer\shops.cpp" />
|
||||
|
@ -935,6 +935,7 @@
|
|||
<ClInclude Include="include\randomizer\preset.hpp" />
|
||||
<ClInclude Include="include\randomizer\random.hpp" />
|
||||
<ClInclude Include="include\randomizer\randomizer.hpp" />
|
||||
<ClInclude Include="include\randomizer\rando_main.hpp" />
|
||||
<ClInclude Include="include\randomizer\settings.hpp" />
|
||||
<ClInclude Include="include\randomizer\setting_descriptions.hpp" />
|
||||
<ClInclude Include="include\randomizer\shops.hpp" />
|
||||
|
|
|
@ -719,7 +719,6 @@
|
|||
<ClCompile Include="include\randomizer\item_pool.cpp" />
|
||||
<ClCompile Include="include\randomizer\location_access.cpp" />
|
||||
<ClCompile Include="include\randomizer\logic.cpp" />
|
||||
<ClCompile Include="include\randomizer\main.cpp" />
|
||||
<ClCompile Include="include\randomizer\menu.cpp" />
|
||||
<ClCompile Include="include\randomizer\music.cpp" />
|
||||
<ClCompile Include="include\randomizer\patch.cpp" />
|
||||
|
@ -737,6 +736,7 @@
|
|||
<ClCompile Include="include\randomizer\utils.cpp" />
|
||||
<ClCompile Include="include\randomizer\cosmetics.cpp" />
|
||||
<ClCompile Include="include\randomizer\custom_messages.cpp" />
|
||||
<ClCompile Include="include\randomizer\rando_main.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="soh\frame_interpolation.h" />
|
||||
|
@ -1295,6 +1295,7 @@
|
|||
<ClInclude Include="include\randomizer\category.hpp" />
|
||||
<ClInclude Include="include\randomizer\cosmetics.hpp" />
|
||||
<ClInclude Include="include\randomizer\custom_messages.hpp" />
|
||||
<ClInclude Include="include\randomizer\rando_main.hpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Resource.rc" />
|
||||
|
|
|
@ -323,7 +323,7 @@ std::unordered_map<std::string, RandomizerCheck> SpoilerfileCheckNameToEnum = {
|
|||
{"ZD Shop Item 7", RC_ZD_SHOP_ITEM_7},
|
||||
{"ZD Shop Item 8", RC_ZD_SHOP_ITEM_8},
|
||||
{"ZF Great Fairy Reward", RC_ZF_GREAT_FAIRY_REWARD},
|
||||
{"ZF Iceberg Freestanding PoH", RC_ZF_ICEBERG_FREESTANDING_POH},
|
||||
{"ZF Iceberg Freestanding PoH", RC_ZF_ICEBERC_FREESTANDING_POH},
|
||||
{"ZF Bottom Freestanding PoH", RC_ZF_BOTTOM_FREESTANDING_POH},
|
||||
{"ZF GS Above the Log", RC_ZF_GS_ABOVE_THE_LOG},
|
||||
{"ZF GS Tree", RC_ZF_GS_TREE},
|
||||
|
@ -1133,7 +1133,7 @@ s16 Randomizer::GetItemModelFromId(s16 itemId) {
|
|||
void Randomizer::LoadItemLocations(const char* spoilerFileName) {
|
||||
if (strcmp(spoilerFileName, "") != 0) {
|
||||
// bandaid until new save stuff happens
|
||||
ParseItemLocations(spoilerFileName);
|
||||
ParseItemLocationsFile(spoilerFileName);
|
||||
|
||||
for (auto itemLocation : gSaveContext.itemLocations) {
|
||||
this->itemLocations[itemLocation.check] = itemLocation.get;
|
||||
|
@ -1167,7 +1167,7 @@ std::string sanitize(std::string stringValue) {
|
|||
return stringValue;
|
||||
}
|
||||
|
||||
void Randomizer::ParseItemLocations(const char* spoilerFileName) {
|
||||
void Randomizer::ParseItemLocationsFile(const char* spoilerFileName) {
|
||||
// todo pull this in from cvar or something
|
||||
std::ifstream spoilerFileStream(sanitize(spoilerFileName));
|
||||
if (!spoilerFileStream)
|
||||
|
@ -1221,20 +1221,6 @@ void Randomizer::ParseItemLocations(const char* spoilerFileName) {
|
|||
}
|
||||
}
|
||||
|
||||
void Randomizer::ParseItemLocations(SpoilerData spoilerData) {
|
||||
if (spoilerData.ItemLocationsCount > 0) {
|
||||
for (int i = 0; i < spoilerData.ItemLocationsCount; i++) {
|
||||
gSaveContext.itemLocations[i].check = SpoilerfileCheckNameToEnum[spoilerData.ItemLocations[i].LocationStr];
|
||||
gSaveContext.itemLocations[i].get = SpoilerfileGetNameToEnum[spoilerData.ItemLocations[i].ItemStr];
|
||||
}
|
||||
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
|
||||
CVar_SetS32("gRandomizer", 1);
|
||||
Game::SaveSettings();
|
||||
}
|
||||
}
|
||||
|
||||
GetItemID Randomizer::GetRandomizedItemId(GetItemID ogId, s16 actorId, s16 actorParams, s16 sceneNum) {
|
||||
GetItemID itemId = GetItemFromActor(actorId, actorParams, sceneNum, ogId);
|
||||
return itemId;
|
||||
|
@ -1432,10 +1418,6 @@ GetItemID Randomizer::GetItemFromGet(RandomizerGet randoGet, GetItemID ogItemId)
|
|||
return GI_NAYRUS_LOVE;
|
||||
case RG_DEKU_NUTS_10:
|
||||
return GI_NUTS_10;
|
||||
case RG_BOMBS_10:
|
||||
return GI_BOMBS_10;
|
||||
case RG_BOMBS_20:
|
||||
return GI_BOMBS_20;
|
||||
case RG_DEKU_SEEDS_30:
|
||||
return GI_SEEDS_30;
|
||||
case RG_BOTTLE_WITH_BIG_POE:
|
||||
|
@ -1544,7 +1526,7 @@ GetItemID Randomizer::GetRandomizedItemIdFromKnownCheck(RandomizerCheck randomiz
|
|||
|
||||
RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 actorParams) {
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
return UNKNOWN_CHECK;
|
||||
return RC_UNKNOWN_CHECK;
|
||||
}
|
||||
|
||||
switch(sceneNum) {
|
||||
|
|
|
@ -21,7 +21,8 @@ class Randomizer {
|
|||
~Randomizer();
|
||||
|
||||
s16 GetItemModelFromId(s16 itemId);
|
||||
void ParseItemLocations(SpoilerData spoilerData);
|
||||
void LoadItemLocations(const char* spoilerFileName);
|
||||
void ParseItemLocationsFile(const char* spoilerFileName);
|
||||
GetItemID GetRandomizedItemIdFromKnownCheck(RandomizerCheck randomizerCheck, GetItemID ogId);
|
||||
GetItemID GetRandomizedItemId(GetItemID ogId, s16 actorId, s16 actorParams, s16 sceneNum);
|
||||
};
|
||||
|
|
|
@ -1029,9 +1029,8 @@ extern "C" s16 GetItemModelFromId(s16 itemId) {
|
|||
return OTRGlobals::Instance->gRandomizer->GetItemModelFromId(itemId);
|
||||
}
|
||||
|
||||
extern "C" void ParseItemLocations(SpoilerData spoilerData)
|
||||
{
|
||||
OTRGlobals::Instance->gRandomizer->ParseItemLocations(spoilerData);
|
||||
extern "C" void ParseItemLocationsFile(const char* spoilerFileName) {
|
||||
OTRGlobals::Instance->gRandomizer->ParseItemLocationsFile(spoilerFileName);
|
||||
}
|
||||
|
||||
extern "C" s32 GetRandomizedItemId(GetItemID ogId, s16 actorId, s16 actorParams, s16 sceneNum) {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#ifdef __cplusplus
|
||||
#include "Enhancements/savestates.h"
|
||||
#include "Enhancements/randomizer.h"
|
||||
#include "spoiler_log.hpp"
|
||||
#include "randomizer/spoiler_log.hpp"
|
||||
|
||||
class OTRGlobals
|
||||
{
|
||||
|
@ -76,10 +76,7 @@ int AudioPlayer_GetDesiredBuffered(void);
|
|||
void AudioPlayer_Play(const uint8_t* buf, uint32_t len);
|
||||
void AudioMgr_CreateNextAudioBuffer(s16* samples, u32 num_samples);
|
||||
int Controller_ShouldRumble(size_t i);
|
||||
void LoadItemLocations(const char* spoilerFileName);
|
||||
void ParseItemLocations(const char* spoilerfilename);
|
||||
void ParseItemLocations(SpoilerData spoilerData);
|
||||
ItemID GetItemIdFromGetItem(GetItemID getItemId);
|
||||
void ParseItemLocationsFile(const char* spoilerfilename);
|
||||
s16 GetItemModelFromId(s16 itemId);
|
||||
s32 GetRandomizedItemId(GetItemID ogId, s16 actorId, s16 actorParams, s16 sceneNum);
|
||||
s32 GetRandomizedItemIdFromKnownCheck(RandomizerCheck randomizerCheck, GetItemID ogId);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue