mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-12 21:47:03 +03:00
Rename newinv2 to gui
This commit is contained in:
parent
f3dbfd0294
commit
2623607b70
24 changed files with 197 additions and 197 deletions
|
@ -40,7 +40,7 @@
|
||||||
#include "Renderer11.h"
|
#include "Renderer11.h"
|
||||||
#include "camera.h"
|
#include "camera.h"
|
||||||
#include "items.h"
|
#include "items.h"
|
||||||
#include "newinv2.h"
|
#include "gui.h"
|
||||||
|
|
||||||
#include "Objects/Generic/Object/rope.h"
|
#include "Objects/Generic/Object/rope.h"
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include "effects/hair.h"
|
#include "effects/hair.h"
|
||||||
#include "items.h"
|
#include "items.h"
|
||||||
#include "flipeffect.h"
|
#include "flipeffect.h"
|
||||||
#include "newinv2.h"
|
#include "gui.h"
|
||||||
#include "control/lot.h"
|
#include "control/lot.h"
|
||||||
#include "health.h"
|
#include "health.h"
|
||||||
#include "savegame.h"
|
#include "savegame.h"
|
||||||
|
@ -138,48 +138,48 @@ GAME_STATUS ControlPhase(int numFrames, int demoMode)
|
||||||
|
|
||||||
if (CurrentLevel != 0 && !g_Renderer.isFading())
|
if (CurrentLevel != 0 && !g_Renderer.isFading())
|
||||||
{
|
{
|
||||||
if (TrInput & IN_SAVE && LaraItem->hitPoints > 0 && g_Inventory.GetInventoryMode() != InventoryMode::Save)
|
if (TrInput & IN_SAVE && LaraItem->hitPoints > 0 && g_Gui.GetInventoryMode() != InventoryMode::Save)
|
||||||
{
|
{
|
||||||
StopAllSounds();
|
StopAllSounds();
|
||||||
|
|
||||||
g_Inventory.SetInventoryMode(InventoryMode::Save);
|
g_Gui.SetInventoryMode(InventoryMode::Save);
|
||||||
|
|
||||||
if (g_Inventory.CallInventory(0))
|
if (g_Gui.CallInventory(false))
|
||||||
return GAME_STATUS::GAME_STATUS_LOAD_GAME;
|
return GAME_STATUS::GAME_STATUS_LOAD_GAME;
|
||||||
}
|
}
|
||||||
else if (TrInput & IN_LOAD && g_Inventory.GetInventoryMode() != InventoryMode::Load)
|
else if (TrInput & IN_LOAD && g_Gui.GetInventoryMode() != InventoryMode::Load)
|
||||||
{
|
{
|
||||||
StopAllSounds();
|
StopAllSounds();
|
||||||
|
|
||||||
g_Inventory.SetInventoryMode(InventoryMode::Load);
|
g_Gui.SetInventoryMode(InventoryMode::Load);
|
||||||
|
|
||||||
if (g_Inventory.CallInventory(0))
|
if (g_Gui.CallInventory(false))
|
||||||
return GAME_STATUS::GAME_STATUS_LOAD_GAME;
|
return GAME_STATUS::GAME_STATUS_LOAD_GAME;
|
||||||
}
|
}
|
||||||
else if (TrInput & IN_PAUSE && g_Inventory.GetInventoryMode() != InventoryMode::Pause && LaraItem->hitPoints > 0)
|
else if (TrInput & IN_PAUSE && g_Gui.GetInventoryMode() != InventoryMode::Pause && LaraItem->hitPoints > 0)
|
||||||
{
|
{
|
||||||
StopAllSounds();
|
StopAllSounds();
|
||||||
g_Renderer.DumpGameScene();
|
g_Renderer.DumpGameScene();
|
||||||
g_Inventory.SetInventoryMode(InventoryMode::Pause);
|
g_Gui.SetInventoryMode(InventoryMode::Pause);
|
||||||
g_Inventory.SetMenuToDisplay(Menu::Pause);
|
g_Gui.SetMenuToDisplay(Menu::Pause);
|
||||||
g_Inventory.SetSelectedOption(0);
|
g_Gui.SetSelectedOption(0);
|
||||||
}
|
}
|
||||||
else if ((DbInput & IN_DESELECT || g_Inventory.GetEnterInventory() != NO_ITEM) && LaraItem->hitPoints > 0)
|
else if ((DbInput & IN_DESELECT || g_Gui.GetEnterInventory() != NO_ITEM) && LaraItem->hitPoints > 0)
|
||||||
{
|
{
|
||||||
// Stop all sounds
|
// Stop all sounds
|
||||||
StopAllSounds();
|
StopAllSounds();
|
||||||
|
|
||||||
if (g_Inventory.CallInventory(1))
|
if (g_Gui.CallInventory(true))
|
||||||
return GAME_STATUS::GAME_STATUS_LOAD_GAME;
|
return GAME_STATUS::GAME_STATUS_LOAD_GAME;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
while (g_Inventory.GetInventoryMode() == InventoryMode::Pause)
|
while (g_Gui.GetInventoryMode() == InventoryMode::Pause)
|
||||||
{
|
{
|
||||||
g_Inventory.DrawInventory();
|
g_Gui.DrawInventory();
|
||||||
g_Renderer.SyncRenderer();
|
g_Renderer.SyncRenderer();
|
||||||
|
|
||||||
if (g_Inventory.DoPauseMenu() == InventoryResult::ExitToTitle)
|
if (g_Gui.DoPauseMenu() == InventoryResult::ExitToTitle)
|
||||||
return GAME_STATUS::GAME_STATUS_EXIT_TO_TITLE;
|
return GAME_STATUS::GAME_STATUS_EXIT_TO_TITLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -334,10 +334,10 @@ GAME_STATUS ControlPhase(int numFrames, int demoMode)
|
||||||
|
|
||||||
g_Renderer.updateLaraAnimations(true);
|
g_Renderer.updateLaraAnimations(true);
|
||||||
|
|
||||||
if (g_Inventory.GetInventoryItemChosen() != NO_ITEM)
|
if (g_Gui.GetInventoryItemChosen() != NO_ITEM)
|
||||||
{
|
{
|
||||||
SayNo();
|
SayNo();
|
||||||
g_Inventory.SetInventoryItemChosen(NO_ITEM);
|
g_Gui.SetInventoryItemChosen(NO_ITEM);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update Lara's ponytails
|
// Update Lara's ponytails
|
||||||
|
@ -501,8 +501,8 @@ GAME_STATUS DoTitle(int index)
|
||||||
PlaySoundTrack(83);
|
PlaySoundTrack(83);
|
||||||
|
|
||||||
// Initialize menu
|
// Initialize menu
|
||||||
g_Inventory.SetMenuToDisplay(Menu::Title);
|
g_Gui.SetMenuToDisplay(Menu::Title);
|
||||||
g_Inventory.SetSelectedOption(0);
|
g_Gui.SetSelectedOption(0);
|
||||||
|
|
||||||
// Initialise ponytails
|
// Initialise ponytails
|
||||||
InitialiseHair();
|
InitialiseHair();
|
||||||
|
@ -524,7 +524,7 @@ GAME_STATUS DoTitle(int index)
|
||||||
S_UpdateInput();
|
S_UpdateInput();
|
||||||
SetDebounce = false;
|
SetDebounce = false;
|
||||||
|
|
||||||
status = g_Inventory.TitleOptions();
|
status = g_Gui.TitleOptions();
|
||||||
|
|
||||||
if (status != InventoryResult::None)
|
if (status != InventoryResult::None)
|
||||||
break;
|
break;
|
||||||
|
@ -537,7 +537,7 @@ GAME_STATUS DoTitle(int index)
|
||||||
inventoryResult = status;
|
inventoryResult = status;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
inventoryResult = g_Inventory.TitleOptions();
|
inventoryResult = g_Gui.TitleOptions();
|
||||||
|
|
||||||
StopSoundTracks();
|
StopSoundTracks();
|
||||||
|
|
||||||
|
@ -629,8 +629,8 @@ GAME_STATUS DoLevel(int index, std::string ambient, bool loadFromSavegame)
|
||||||
Statistics.Level.Timer = 0;
|
Statistics.Level.Timer = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_Inventory.SetInventoryItemChosen(NO_ITEM);
|
g_Gui.SetInventoryItemChosen(NO_ITEM);
|
||||||
g_Inventory.SetEnterInventory(NO_ITEM);
|
g_Gui.SetEnterInventory(NO_ITEM);
|
||||||
|
|
||||||
// Initialise flyby cameras
|
// Initialise flyby cameras
|
||||||
InitSpotCamSequences();
|
InitSpotCamSequences();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "framework.h"
|
#include "framework.h"
|
||||||
#include "newinv2.h"
|
#include "gui.h"
|
||||||
#include "animation.h"
|
#include "animation.h"
|
||||||
#include "control/control.h"
|
#include "control/control.h"
|
||||||
#include "lara_fire.h"
|
#include "lara_fire.h"
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
#include "items.h"
|
#include "items.h"
|
||||||
|
|
||||||
using namespace TEN::Renderer;
|
using namespace TEN::Renderer;
|
||||||
InventoryClass g_Inventory;
|
GuiController g_Gui;
|
||||||
|
|
||||||
const char* optmessages[] =
|
const char* optmessages[] =
|
||||||
{
|
{
|
||||||
|
@ -394,77 +394,77 @@ InventoryObject inventry_objects_list[INVENTORY_TABLE_SIZE] =
|
||||||
{ID_EXAMINE8_COMBO2, 14, 0.5f, 0, 0, 0, OPT_USE | OPT_COMBINABLE, STRING_LOAD_GAME, NO_MESH_BITS, INV_ROT_Y},
|
{ID_EXAMINE8_COMBO2, 14, 0.5f, 0, 0, 0, OPT_USE | OPT_COMBINABLE, STRING_LOAD_GAME, NO_MESH_BITS, INV_ROT_Y},
|
||||||
};
|
};
|
||||||
|
|
||||||
TitleSettings InventoryClass::GetCurrentSettings()
|
TitleSettings GuiController::GetCurrentSettings()
|
||||||
{
|
{
|
||||||
return CurrentSettings;
|
return CurrentSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
InventoryRing* InventoryClass::GetRings(char num)
|
InventoryRing* GuiController::GetRings(char num)
|
||||||
{
|
{
|
||||||
return rings[num];
|
return rings[num];
|
||||||
}
|
}
|
||||||
|
|
||||||
short InventoryClass::GetSelectedOption()
|
short GuiController::GetSelectedOption()
|
||||||
{
|
{
|
||||||
return selected_option;
|
return selected_option;
|
||||||
}
|
}
|
||||||
|
|
||||||
Menu InventoryClass::GetMenuToDisplay()
|
Menu GuiController::GetMenuToDisplay()
|
||||||
{
|
{
|
||||||
return menu_to_display;
|
return menu_to_display;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::SetSelectedOption(short menu)
|
void GuiController::SetSelectedOption(short menu)
|
||||||
{
|
{
|
||||||
selected_option = menu;
|
selected_option = menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::SetMenuToDisplay(Menu menu)
|
void GuiController::SetMenuToDisplay(Menu menu)
|
||||||
{
|
{
|
||||||
menu_to_display = menu;
|
menu_to_display = menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
InventoryMode InventoryClass::GetInventoryMode()
|
InventoryMode GuiController::GetInventoryMode()
|
||||||
{
|
{
|
||||||
return invMode;
|
return invMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::SetInventoryMode(InventoryMode mode)
|
void GuiController::SetInventoryMode(InventoryMode mode)
|
||||||
{
|
{
|
||||||
invMode = mode;
|
invMode = mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::SetInventoryItemChosen(int num)
|
void GuiController::SetInventoryItemChosen(int num)
|
||||||
{
|
{
|
||||||
inventoryItemChosen = num;
|
inventoryItemChosen = num;
|
||||||
}
|
}
|
||||||
|
|
||||||
int InventoryClass::GetInventoryItemChosen()
|
int GuiController::GetInventoryItemChosen()
|
||||||
{
|
{
|
||||||
return inventoryItemChosen;
|
return inventoryItemChosen;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::SetEnterInventory(int num)
|
void GuiController::SetEnterInventory(int num)
|
||||||
{
|
{
|
||||||
enterInventory = num;
|
enterInventory = num;
|
||||||
}
|
}
|
||||||
|
|
||||||
int InventoryClass::GetEnterInventory()
|
int GuiController::GetEnterInventory()
|
||||||
{
|
{
|
||||||
return enterInventory;
|
return enterInventory;
|
||||||
}
|
}
|
||||||
|
|
||||||
int InventoryClass::GetLastInventoryItem()
|
int GuiController::GetLastInventoryItem()
|
||||||
{
|
{
|
||||||
return lastInvItem;
|
return lastInvItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::DrawInventory()
|
void GuiController::DrawInventory()
|
||||||
{
|
{
|
||||||
g_Renderer.renderInventory();
|
g_Renderer.renderInventory();
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::ClearInputVariables(bool flag)
|
void GuiController::ClearInputVariables(bool flag)
|
||||||
{
|
{
|
||||||
goUp = goDown = goRight = goLeft = goSelect = goDeselect = 0;
|
goUp = goDown = goRight = goLeft = goSelect = goDeselect = 0;
|
||||||
if (flag)
|
if (flag)
|
||||||
|
@ -476,7 +476,7 @@ void InventoryClass::ClearInputVariables(bool flag)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::DoDebouncedInput()
|
void GuiController::DoDebouncedInput()
|
||||||
{
|
{
|
||||||
ClearInputVariables(1);
|
ClearInputVariables(1);
|
||||||
|
|
||||||
|
@ -580,7 +580,7 @@ void InventoryClass::DoDebouncedInput()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
InventoryResult InventoryClass::TitleOptions()
|
InventoryResult GuiController::TitleOptions()
|
||||||
{
|
{
|
||||||
auto ret = InventoryResult::None;
|
auto ret = InventoryResult::None;
|
||||||
static short selected_option_bak;
|
static short selected_option_bak;
|
||||||
|
@ -738,7 +738,7 @@ InventoryResult InventoryClass::TitleOptions()
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::FillDisplayOptions()
|
void GuiController::FillDisplayOptions()
|
||||||
{
|
{
|
||||||
// Copy configuration to a temporary object
|
// Copy configuration to a temporary object
|
||||||
memcpy(&CurrentSettings.conf, &g_Configuration, sizeof(GameConfiguration));
|
memcpy(&CurrentSettings.conf, &g_Configuration, sizeof(GameConfiguration));
|
||||||
|
@ -759,7 +759,7 @@ void InventoryClass::FillDisplayOptions()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::HandleDisplaySettingsInput(bool pause)
|
void GuiController::HandleDisplaySettingsInput(bool pause)
|
||||||
{
|
{
|
||||||
vector<RendererVideoAdapter>* adapters = g_Renderer.getAdapters();
|
vector<RendererVideoAdapter>* adapters = g_Renderer.getAdapters();
|
||||||
RendererVideoAdapter* adapter = &(*adapters)[CurrentSettings.conf.Adapter];
|
RendererVideoAdapter* adapter = &(*adapters)[CurrentSettings.conf.Adapter];
|
||||||
|
@ -892,7 +892,7 @@ void InventoryClass::HandleDisplaySettingsInput(bool pause)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::HandleControlSettingsInput(bool pause)
|
void GuiController::HandleControlSettingsInput(bool pause)
|
||||||
{
|
{
|
||||||
CurrentSettings.waitingForkey = 0;
|
CurrentSettings.waitingForkey = 0;
|
||||||
|
|
||||||
|
@ -1028,12 +1028,12 @@ void InventoryClass::HandleControlSettingsInput(bool pause)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::FillSound()
|
void GuiController::FillSound()
|
||||||
{
|
{
|
||||||
memcpy(&CurrentSettings.conf, &g_Configuration, sizeof(GameConfiguration));
|
memcpy(&CurrentSettings.conf, &g_Configuration, sizeof(GameConfiguration));
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::HandleSoundSettingsInput(bool pause)
|
void GuiController::HandleSoundSettingsInput(bool pause)
|
||||||
{
|
{
|
||||||
SetDebounce = true;
|
SetDebounce = true;
|
||||||
S_UpdateInput();
|
S_UpdateInput();
|
||||||
|
@ -1184,7 +1184,7 @@ void InventoryClass::HandleSoundSettingsInput(bool pause)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
InventoryResult InventoryClass::DoPauseMenu()
|
InventoryResult GuiController::DoPauseMenu()
|
||||||
{
|
{
|
||||||
//basically mini title
|
//basically mini title
|
||||||
|
|
||||||
|
@ -1313,7 +1313,7 @@ InventoryResult InventoryClass::DoPauseMenu()
|
||||||
|
|
||||||
/*inventory*/
|
/*inventory*/
|
||||||
|
|
||||||
bool InventoryClass::DoObjectsCombine(int obj1, int obj2)
|
bool GuiController::DoObjectsCombine(int obj1, int obj2)
|
||||||
{
|
{
|
||||||
for (int n = 0; n < max_combines; n++)
|
for (int n = 0; n < max_combines; n++)
|
||||||
{
|
{
|
||||||
|
@ -1329,7 +1329,7 @@ bool InventoryClass::DoObjectsCombine(int obj1, int obj2)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InventoryClass::IsItemCurrentlyCombinable(short obj)
|
bool GuiController::IsItemCurrentlyCombinable(short obj)
|
||||||
{
|
{
|
||||||
if (obj < INV_OBJECT_SMOL_WATERSKIN || obj > INV_OBJECT_BIG_WATERSKIN5L)//trash
|
if (obj < INV_OBJECT_SMOL_WATERSKIN || obj > INV_OBJECT_BIG_WATERSKIN5L)//trash
|
||||||
{
|
{
|
||||||
|
@ -1364,7 +1364,7 @@ bool InventoryClass::IsItemCurrentlyCombinable(short obj)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InventoryClass::IsItemInInventory(short obj)
|
bool GuiController::IsItemInInventory(short obj)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < INVENTORY_TABLE_SIZE; i++)
|
for (int i = 0; i < INVENTORY_TABLE_SIZE; i++)
|
||||||
if (rings[(int)RingTypes::Inventory]->current_object_list[i].invitem == obj)
|
if (rings[(int)RingTypes::Inventory]->current_object_list[i].invitem == obj)
|
||||||
|
@ -1373,7 +1373,7 @@ bool InventoryClass::IsItemInInventory(short obj)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::CombineObjects(short obj1, short obj2)
|
void GuiController::CombineObjects(short obj1, short obj2)
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
|
@ -1394,7 +1394,7 @@ void InventoryClass::CombineObjects(short obj1, short obj2)
|
||||||
HandleObjectChangeover((int)RingTypes::Inventory);
|
HandleObjectChangeover((int)RingTypes::Inventory);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::SeparateObject(short obj)
|
void GuiController::SeparateObject(short obj)
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
|
@ -1407,21 +1407,21 @@ void InventoryClass::SeparateObject(short obj)
|
||||||
SetupObjectListStartPosition(combine_table[n].item1);
|
SetupObjectListStartPosition(combine_table[n].item1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::SetupObjectListStartPosition(short newobj)
|
void GuiController::SetupObjectListStartPosition(short newobj)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < INVENTORY_TABLE_SIZE; i++)
|
for (int i = 0; i < INVENTORY_TABLE_SIZE; i++)
|
||||||
if (rings[(int)RingTypes::Inventory]->current_object_list[i].invitem == newobj)
|
if (rings[(int)RingTypes::Inventory]->current_object_list[i].invitem == newobj)
|
||||||
rings[(int)RingTypes::Inventory]->curobjinlist = i;
|
rings[(int)RingTypes::Inventory]->curobjinlist = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::HandleObjectChangeover(int ringnum)
|
void GuiController::HandleObjectChangeover(int ringnum)
|
||||||
{
|
{
|
||||||
current_selected_option = 0;
|
current_selected_option = 0;
|
||||||
menu_active = 1;
|
menu_active = 1;
|
||||||
SetupAmmoSelector();
|
SetupAmmoSelector();
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::SetupAmmoSelector()
|
void GuiController::SetupAmmoSelector()
|
||||||
{
|
{
|
||||||
int num;
|
int num;
|
||||||
unsigned __int64 opts;
|
unsigned __int64 opts;
|
||||||
|
@ -1549,7 +1549,7 @@ void InventoryClass::SetupAmmoSelector()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::InsertObjectIntoList(int num)
|
void GuiController::InsertObjectIntoList(int num)
|
||||||
{
|
{
|
||||||
rings[(int)RingTypes::Inventory]->current_object_list[rings[(int)RingTypes::Inventory]->numobjectsinlist].invitem = num;
|
rings[(int)RingTypes::Inventory]->current_object_list[rings[(int)RingTypes::Inventory]->numobjectsinlist].invitem = num;
|
||||||
rings[(int)RingTypes::Inventory]->current_object_list[rings[(int)RingTypes::Inventory]->numobjectsinlist].xrot = 0;
|
rings[(int)RingTypes::Inventory]->current_object_list[rings[(int)RingTypes::Inventory]->numobjectsinlist].xrot = 0;
|
||||||
|
@ -1559,7 +1559,7 @@ void InventoryClass::InsertObjectIntoList(int num)
|
||||||
rings[(int)RingTypes::Inventory]->numobjectsinlist++;
|
rings[(int)RingTypes::Inventory]->numobjectsinlist++;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::InsertObjectIntoList_v2(int num)
|
void GuiController::InsertObjectIntoList_v2(int num)
|
||||||
{
|
{
|
||||||
unsigned __int64 opts = inventry_objects_list[num].opts;
|
unsigned __int64 opts = inventry_objects_list[num].opts;
|
||||||
|
|
||||||
|
@ -1576,7 +1576,7 @@ void InventoryClass::InsertObjectIntoList_v2(int num)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::ConstructObjectList()
|
void GuiController::ConstructObjectList()
|
||||||
{
|
{
|
||||||
rings[(int)RingTypes::Inventory]->numobjectsinlist = 0;
|
rings[(int)RingTypes::Inventory]->numobjectsinlist = 0;
|
||||||
|
|
||||||
|
@ -1788,7 +1788,7 @@ void InventoryClass::ConstructObjectList()
|
||||||
ammo_active = 0;
|
ammo_active = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::ConstructCombineObjectList()
|
void GuiController::ConstructCombineObjectList()
|
||||||
{
|
{
|
||||||
rings[(int)RingTypes::Ammo]->numobjectsinlist = 0;
|
rings[(int)RingTypes::Ammo]->numobjectsinlist = 0;
|
||||||
|
|
||||||
|
@ -1859,7 +1859,7 @@ void InventoryClass::ConstructCombineObjectList()
|
||||||
rings[(int)RingTypes::Ammo]->ringactive = 0;
|
rings[(int)RingTypes::Ammo]->ringactive = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::InitializeInventory()
|
void GuiController::InitializeInventory()
|
||||||
{
|
{
|
||||||
compassNeedleAngle = 4096;
|
compassNeedleAngle = 4096;
|
||||||
AlterFOV(14560);
|
AlterFOV(14560);
|
||||||
|
@ -1948,19 +1948,19 @@ void InventoryClass::InitializeInventory()
|
||||||
HandleObjectChangeover((int)RingTypes::Inventory);
|
HandleObjectChangeover((int)RingTypes::Inventory);
|
||||||
}
|
}
|
||||||
|
|
||||||
int InventoryClass::IsObjectInInventory(short object_number)
|
int GuiController::IsObjectInInventory(short object_number)
|
||||||
{
|
{
|
||||||
return GetInventoryCount(from_underlying(object_number));
|
return GetInventoryCount(from_underlying(object_number));
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::SetupObjectListStartPosition2(short newobj)
|
void GuiController::SetupObjectListStartPosition2(short newobj)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < INVENTORY_TABLE_SIZE; i++)
|
for (int i = 0; i < INVENTORY_TABLE_SIZE; i++)
|
||||||
if (inventry_objects_list[rings[(int)RingTypes::Inventory]->current_object_list[i].invitem].object_number == newobj)
|
if (inventry_objects_list[rings[(int)RingTypes::Inventory]->current_object_list[i].invitem].object_number == newobj)
|
||||||
rings[(int)RingTypes::Inventory]->curobjinlist = i;
|
rings[(int)RingTypes::Inventory]->curobjinlist = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
int InventoryClass::ConvertObjectToInventoryItem(short obj)
|
int GuiController::ConvertObjectToInventoryItem(short obj)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < INVENTORY_TABLE_SIZE; i++)
|
for (int i = 0; i < INVENTORY_TABLE_SIZE; i++)
|
||||||
{
|
{
|
||||||
|
@ -1971,12 +1971,12 @@ int InventoryClass::ConvertObjectToInventoryItem(short obj)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int InventoryClass::ConvertInventoryItemToObject(int obj)
|
int GuiController::ConvertInventoryItemToObject(int obj)
|
||||||
{
|
{
|
||||||
return inventry_objects_list[obj].object_number;
|
return inventry_objects_list[obj].object_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::FadeAmmoSelector()
|
void GuiController::FadeAmmoSelector()
|
||||||
{
|
{
|
||||||
if (rings[(int)RingTypes::Inventory]->ringactive && (rptLeft >= 8 || rptRight >= 8))
|
if (rings[(int)RingTypes::Inventory]->ringactive && (rptLeft >= 8 || rptRight >= 8))
|
||||||
ammo_selector_fade_val = 0;
|
ammo_selector_fade_val = 0;
|
||||||
|
@ -2004,7 +2004,7 @@ void InventoryClass::FadeAmmoSelector()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::UseCurrentItem()
|
void GuiController::UseCurrentItem()
|
||||||
{
|
{
|
||||||
short invobject, gmeobject;
|
short invobject, gmeobject;
|
||||||
long OldBinocular;
|
long OldBinocular;
|
||||||
|
@ -2263,7 +2263,7 @@ void InventoryClass::UseCurrentItem()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::HandleInventoryMenu()
|
void GuiController::HandleInventoryMenu()
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
unsigned __int64 opts;
|
unsigned __int64 opts;
|
||||||
|
@ -2603,7 +2603,7 @@ void InventoryClass::HandleInventoryMenu()
|
||||||
}
|
}
|
||||||
|
|
||||||
//this function is to UPDATE THE SELECTED AMMO OF WEPS THAT REQUIRE DOING SO, and only these..
|
//this function is to UPDATE THE SELECTED AMMO OF WEPS THAT REQUIRE DOING SO, and only these..
|
||||||
void InventoryClass::UpdateWeaponStatus()
|
void GuiController::UpdateWeaponStatus()
|
||||||
{
|
{
|
||||||
if (Lara.Weapons[WEAPON_SHOTGUN].Present)
|
if (Lara.Weapons[WEAPON_SHOTGUN].Present)
|
||||||
{
|
{
|
||||||
|
@ -2634,7 +2634,7 @@ void InventoryClass::UpdateWeaponStatus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::SpinBack(unsigned short* angle)
|
void GuiController::SpinBack(unsigned short* angle)
|
||||||
{
|
{
|
||||||
unsigned short val;
|
unsigned short val;
|
||||||
unsigned short val2;
|
unsigned short val2;
|
||||||
|
@ -2676,7 +2676,7 @@ void InventoryClass::SpinBack(unsigned short* angle)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::DrawAmmoSelector()
|
void GuiController::DrawAmmoSelector()
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
int xpos;
|
int xpos;
|
||||||
|
@ -2751,7 +2751,7 @@ void InventoryClass::DrawAmmoSelector()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::DrawCurrentObjectList(int ringnum)
|
void GuiController::DrawCurrentObjectList(int ringnum)
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
int maxobj;
|
int maxobj;
|
||||||
|
@ -3172,7 +3172,7 @@ void InventoryClass::DrawCurrentObjectList(int ringnum)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int InventoryClass::CallInventory(bool reset_mode)
|
int GuiController::CallInventory(bool reset_mode)
|
||||||
{
|
{
|
||||||
int return_value;
|
int return_value;
|
||||||
|
|
||||||
|
@ -3264,7 +3264,7 @@ int InventoryClass::CallInventory(bool reset_mode)
|
||||||
return return_value;
|
return return_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::DoStatisticsMode()
|
void GuiController::DoStatisticsMode()
|
||||||
{
|
{
|
||||||
invMode = InventoryMode::Statistics;
|
invMode = InventoryMode::Statistics;
|
||||||
|
|
||||||
|
@ -3276,7 +3276,7 @@ void InventoryClass::DoStatisticsMode()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::DoExamineMode()
|
void GuiController::DoExamineMode()
|
||||||
{
|
{
|
||||||
invMode = InventoryMode::Examine;
|
invMode = InventoryMode::Examine;
|
||||||
|
|
||||||
|
@ -3288,7 +3288,7 @@ void InventoryClass::DoExamineMode()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::DrawCompass()
|
void GuiController::DrawCompass()
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
g_Renderer.drawObjectOn2DPosition(130, 480, ID_COMPASS_ITEM, ANGLE(90), 0, ANGLE(180), inventry_objects_list[INV_OBJECT_COMPASS].scale1);
|
g_Renderer.drawObjectOn2DPosition(130, 480, ID_COMPASS_ITEM, ANGLE(90), 0, ANGLE(180), inventry_objects_list[INV_OBJECT_COMPASS].scale1);
|
||||||
|
@ -3297,7 +3297,7 @@ void InventoryClass::DrawCompass()
|
||||||
Matrix::CreateRotationY(compass_angle);
|
Matrix::CreateRotationY(compass_angle);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::DoDiary()
|
void GuiController::DoDiary()
|
||||||
{
|
{
|
||||||
invMode = InventoryMode::Diary;
|
invMode = InventoryMode::Diary;
|
||||||
|
|
||||||
|
@ -3321,12 +3321,12 @@ void InventoryClass::DoDiary()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
short InventoryClass::GetLoadSaveSelection()
|
short GuiController::GetLoadSaveSelection()
|
||||||
{
|
{
|
||||||
return selected_slot;
|
return selected_slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
int InventoryClass::DoLoad()
|
int GuiController::DoLoad()
|
||||||
{
|
{
|
||||||
invMode = InventoryMode::Load;
|
invMode = InventoryMode::Load;
|
||||||
|
|
||||||
|
@ -3373,7 +3373,7 @@ int InventoryClass::DoLoad()
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryClass::DoSave()
|
void GuiController::DoSave()
|
||||||
{
|
{
|
||||||
invMode = InventoryMode::Save;
|
invMode = InventoryMode::Save;
|
||||||
|
|
||||||
|
@ -3866,7 +3866,7 @@ void combine_ClockWorkBeetle(int flag)
|
||||||
Lara.hasBeetleThings |= 1;//get beetle
|
Lara.hasBeetleThings |= 1;//get beetle
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InventoryClass::PerformWaterskinCombine(int flag)
|
bool GuiController::PerformWaterskinCombine(int flag)
|
||||||
{
|
{
|
||||||
short small_liters, big_liters, small_capacity, big_capacity;
|
short small_liters, big_liters, small_capacity, big_capacity;
|
||||||
int i;
|
int i;
|
|
@ -395,7 +395,7 @@ struct InventoryObject
|
||||||
short rot_flags;
|
short rot_flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
class InventoryClass
|
class GuiController
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int CallInventory(bool reset_mode);
|
int CallInventory(bool reset_mode);
|
||||||
|
@ -607,6 +607,6 @@ void combine_Examine7(int flag);
|
||||||
void combine_Examine8(int flag);
|
void combine_Examine8(int flag);
|
||||||
void combine_ClockWorkBeetle(int flag);
|
void combine_ClockWorkBeetle(int flag);
|
||||||
|
|
||||||
extern InventoryClass g_Inventory;
|
extern GuiController g_Gui;
|
||||||
extern InventoryObject inventry_objects_list[];
|
extern InventoryObject inventry_objects_list[];
|
||||||
extern const char* controlmsgs[];
|
extern const char* controlmsgs[];
|
|
@ -3,7 +3,7 @@
|
||||||
#include "Specific/phd_global.h"
|
#include "Specific/phd_global.h"
|
||||||
#include "lara.h"
|
#include "lara.h"
|
||||||
#include "animation.h"
|
#include "animation.h"
|
||||||
#include "newinv2.h"
|
#include "gui.h"
|
||||||
#include "room.h"
|
#include "room.h"
|
||||||
#include "effects/debris.h"
|
#include "effects/debris.h"
|
||||||
#include "health.h"
|
#include "health.h"
|
||||||
|
@ -340,7 +340,7 @@ void PickupCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(TrInput & IN_ACTION) &&
|
if (!(TrInput & IN_ACTION) &&
|
||||||
(g_Inventory.GetInventoryItemChosen() == NO_ITEM || triggerFlags != 2)
|
(g_Gui.GetInventoryItemChosen() == NO_ITEM || triggerFlags != 2)
|
||||||
|| BinocularRange
|
|| BinocularRange
|
||||||
|| (l->currentAnimState != LS_STOP || l->animNumber != LA_STAND_IDLE || Lara.gunStatus)
|
|| (l->currentAnimState != LS_STOP || l->animNumber != LA_STAND_IDLE || Lara.gunStatus)
|
||||||
&& (l->currentAnimState != LS_CROUCH_IDLE || l->animNumber != LA_CROUCH_IDLE || Lara.gunStatus)
|
&& (l->currentAnimState != LS_CROUCH_IDLE || l->animNumber != LA_CROUCH_IDLE || Lara.gunStatus)
|
||||||
|
@ -435,10 +435,10 @@ void PickupCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll)
|
||||||
}
|
}
|
||||||
if (!Lara.isMoving)
|
if (!Lara.isMoving)
|
||||||
{
|
{
|
||||||
if (g_Inventory.GetInventoryItemChosen() == NO_ITEM)
|
if (g_Gui.GetInventoryItemChosen() == NO_ITEM)
|
||||||
{
|
{
|
||||||
if (g_Inventory.IsObjectInInventory(ID_CROWBAR_ITEM))
|
if (g_Gui.IsObjectInInventory(ID_CROWBAR_ITEM))
|
||||||
g_Inventory.SetEnterInventory(ID_CROWBAR_ITEM);
|
g_Gui.SetEnterInventory(ID_CROWBAR_ITEM);
|
||||||
|
|
||||||
item->pos.xRot = oldXrot;
|
item->pos.xRot = oldXrot;
|
||||||
item->pos.yRot = oldYrot;
|
item->pos.yRot = oldYrot;
|
||||||
|
@ -446,7 +446,7 @@ void PickupCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_Inventory.GetInventoryItemChosen() != ID_CROWBAR_ITEM)
|
if (g_Gui.GetInventoryItemChosen() != ID_CROWBAR_ITEM)
|
||||||
{
|
{
|
||||||
item->pos.xRot = oldXrot;
|
item->pos.xRot = oldXrot;
|
||||||
item->pos.yRot = oldYrot;
|
item->pos.yRot = oldYrot;
|
||||||
|
@ -454,7 +454,7 @@ void PickupCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_Inventory.SetInventoryItemChosen(NO_ITEM);
|
g_Gui.SetInventoryItemChosen(NO_ITEM);
|
||||||
}
|
}
|
||||||
if (MoveLaraPosition(&CrowbarPickUpPosition, item, l))
|
if (MoveLaraPosition(&CrowbarPickUpPosition, item, l))
|
||||||
{
|
{
|
||||||
|
@ -1040,7 +1040,7 @@ void SearchObjectControl(short itemNumber)
|
||||||
int UseSpecialItem(ITEM_INFO* item)
|
int UseSpecialItem(ITEM_INFO* item)
|
||||||
{
|
{
|
||||||
int flag = 0;
|
int flag = 0;
|
||||||
int use = g_Inventory.GetInventoryItemChosen();
|
int use = g_Gui.GetInventoryItemChosen();
|
||||||
|
|
||||||
if (item->animNumber == LA_STAND_IDLE && Lara.gunStatus == LG_NO_ARMS && use != NO_ITEM)
|
if (item->animNumber == LA_STAND_IDLE && Lara.gunStatus == LG_NO_ARMS && use != NO_ITEM)
|
||||||
{
|
{
|
||||||
|
@ -1098,7 +1098,7 @@ int UseSpecialItem(ITEM_INFO* item)
|
||||||
item->currentAnimState = LS_MISC_CONTROL;
|
item->currentAnimState = LS_MISC_CONTROL;
|
||||||
Lara.gunStatus = LG_HANDS_BUSY;
|
Lara.gunStatus = LG_HANDS_BUSY;
|
||||||
|
|
||||||
g_Inventory.SetInventoryItemChosen(NO_ITEM);
|
g_Gui.SetInventoryItemChosen(NO_ITEM);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include "level.h"
|
#include "level.h"
|
||||||
#include "setup.h"
|
#include "setup.h"
|
||||||
#include "lara.h"
|
#include "lara.h"
|
||||||
#include "newinv2.h"
|
#include "gui.h"
|
||||||
#include "pickup.h"
|
#include "pickup.h"
|
||||||
#include "animation.h"
|
#include "animation.h"
|
||||||
#include "control/control.h"
|
#include "control/control.h"
|
||||||
|
@ -51,7 +51,7 @@ void PuzzleHoleCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll)
|
||||||
else
|
else
|
||||||
flag = PUZZLETYPE_SPECIFIC;
|
flag = PUZZLETYPE_SPECIFIC;
|
||||||
|
|
||||||
if (((TrInput & IN_ACTION || g_Inventory.GetInventoryItemChosen() != NO_ITEM)
|
if (((TrInput & IN_ACTION || g_Gui.GetInventoryItemChosen() != NO_ITEM)
|
||||||
&& !BinocularRange
|
&& !BinocularRange
|
||||||
&& !Lara.gunStatus
|
&& !Lara.gunStatus
|
||||||
&& l->currentAnimState == LS_STOP
|
&& l->currentAnimState == LS_STOP
|
||||||
|
@ -77,16 +77,16 @@ void PuzzleHoleCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll)
|
||||||
|
|
||||||
if (!Lara.isMoving)
|
if (!Lara.isMoving)
|
||||||
{
|
{
|
||||||
if (g_Inventory.GetInventoryItemChosen() == NO_ITEM)
|
if (g_Gui.GetInventoryItemChosen() == NO_ITEM)
|
||||||
{
|
{
|
||||||
if (g_Inventory.IsObjectInInventory(item->objectNumber - (ID_PUZZLE_HOLE1 - ID_PUZZLE_ITEM1)))
|
if (g_Gui.IsObjectInInventory(item->objectNumber - (ID_PUZZLE_HOLE1 - ID_PUZZLE_ITEM1)))
|
||||||
g_Inventory.SetEnterInventory(item->objectNumber - (ID_PUZZLE_HOLE1 - ID_PUZZLE_ITEM1));
|
g_Gui.SetEnterInventory(item->objectNumber - (ID_PUZZLE_HOLE1 - ID_PUZZLE_ITEM1));
|
||||||
|
|
||||||
item->pos.yRot = oldYrot;
|
item->pos.yRot = oldYrot;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_Inventory.GetInventoryItemChosen() != item->objectNumber - (ID_PUZZLE_HOLE1 - ID_PUZZLE_ITEM1))
|
if (g_Gui.GetInventoryItemChosen() != item->objectNumber - (ID_PUZZLE_HOLE1 - ID_PUZZLE_ITEM1))
|
||||||
{
|
{
|
||||||
item->pos.yRot = oldYrot;
|
item->pos.yRot = oldYrot;
|
||||||
return;
|
return;
|
||||||
|
@ -100,7 +100,7 @@ void PuzzleHoleCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll)
|
||||||
if (!MoveLaraPosition(&pos, item, l))
|
if (!MoveLaraPosition(&pos, item, l))
|
||||||
{
|
{
|
||||||
Lara.interactedItem = itemNum;
|
Lara.interactedItem = itemNum;
|
||||||
g_Inventory.SetInventoryItemChosen(NO_ITEM);
|
g_Gui.SetInventoryItemChosen(NO_ITEM);
|
||||||
item->pos.yRot = oldYrot;
|
item->pos.yRot = oldYrot;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -131,7 +131,7 @@ void PuzzleHoleCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll)
|
||||||
Lara.gunStatus = LG_HANDS_BUSY;
|
Lara.gunStatus = LG_HANDS_BUSY;
|
||||||
item->flags |= 0x20;
|
item->flags |= 0x20;
|
||||||
Lara.interactedItem = itemNum;
|
Lara.interactedItem = itemNum;
|
||||||
g_Inventory.SetInventoryItemChosen(NO_ITEM);
|
g_Gui.SetInventoryItemChosen(NO_ITEM);
|
||||||
item->pos.yRot = oldYrot;
|
item->pos.yRot = oldYrot;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -245,7 +245,7 @@ void KeyHoleCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!((TrInput & IN_ACTION || g_Inventory.GetInventoryItemChosen() != NO_ITEM)
|
if (!((TrInput & IN_ACTION || g_Gui.GetInventoryItemChosen() != NO_ITEM)
|
||||||
&& !BinocularRange
|
&& !BinocularRange
|
||||||
&& !Lara.gunStatus
|
&& !Lara.gunStatus
|
||||||
&& l->currentAnimState == LS_STOP
|
&& l->currentAnimState == LS_STOP
|
||||||
|
@ -264,15 +264,15 @@ void KeyHoleCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll)
|
||||||
if (item->status != ITEM_NOT_ACTIVE)
|
if (item->status != ITEM_NOT_ACTIVE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (g_Inventory.GetInventoryItemChosen() == NO_ITEM)
|
if (g_Gui.GetInventoryItemChosen() == NO_ITEM)
|
||||||
{
|
{
|
||||||
if (g_Inventory.IsObjectInInventory(item->objectNumber - (ID_KEY_HOLE1 - ID_KEY_ITEM1)))
|
if (g_Gui.IsObjectInInventory(item->objectNumber - (ID_KEY_HOLE1 - ID_KEY_ITEM1)))
|
||||||
g_Inventory.SetEnterInventory(item->objectNumber - (ID_KEY_HOLE1 - ID_KEY_ITEM1));
|
g_Gui.SetEnterInventory(item->objectNumber - (ID_KEY_HOLE1 - ID_KEY_ITEM1));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_Inventory.GetInventoryItemChosen() != item->objectNumber - (ID_KEY_HOLE1 - ID_KEY_ITEM1))
|
if (g_Gui.GetInventoryItemChosen() != item->objectNumber - (ID_KEY_HOLE1 - ID_KEY_ITEM1))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -299,7 +299,7 @@ void KeyHoleCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll)
|
||||||
if (item->triggerFlags == 1 && item->objectNumber == ID_KEY_HOLE8)
|
if (item->triggerFlags == 1 && item->objectNumber == ID_KEY_HOLE8)
|
||||||
{
|
{
|
||||||
item->itemFlags[3] = 92;
|
item->itemFlags[3] = 92;
|
||||||
g_Inventory.SetInventoryItemChosen(NO_ITEM);
|
g_Gui.SetInventoryItemChosen(NO_ITEM);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -308,7 +308,7 @@ void KeyHoleCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll)
|
||||||
Lara.interactedItem = itemNum;
|
Lara.interactedItem = itemNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_Inventory.SetInventoryItemChosen(NO_ITEM);
|
g_Gui.SetInventoryItemChosen(NO_ITEM);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include "control/box.h"
|
#include "control/box.h"
|
||||||
#include "items.h"
|
#include "items.h"
|
||||||
#include "control/lot.h"
|
#include "control/lot.h"
|
||||||
#include "newinv2.h"
|
#include "gui.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "pickup.h"
|
#include "pickup.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include "control/box.h"
|
#include "control/box.h"
|
||||||
#include "items.h"
|
#include "items.h"
|
||||||
#include "control/lot.h"
|
#include "control/lot.h"
|
||||||
#include "newinv2.h"
|
#include "gui.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "pickup.h"
|
#include "pickup.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
|
@ -166,7 +166,7 @@ namespace TEN::Entities::Doors
|
||||||
|
|
||||||
if (item->triggerFlags == 2
|
if (item->triggerFlags == 2
|
||||||
&& item->status == ITEM_NOT_ACTIVE && !item->gravityStatus // CHECK
|
&& item->status == ITEM_NOT_ACTIVE && !item->gravityStatus // CHECK
|
||||||
&& ((TrInput & IN_ACTION || g_Inventory.GetInventoryItemChosen() == ID_CROWBAR_ITEM)
|
&& ((TrInput & IN_ACTION || g_Gui.GetInventoryItemChosen() == ID_CROWBAR_ITEM)
|
||||||
&& l->currentAnimState == LS_STOP
|
&& l->currentAnimState == LS_STOP
|
||||||
&& l->animNumber == LA_STAND_IDLE
|
&& l->animNumber == LA_STAND_IDLE
|
||||||
&& !l->hitStatus
|
&& !l->hitStatus
|
||||||
|
@ -178,11 +178,11 @@ namespace TEN::Entities::Doors
|
||||||
{
|
{
|
||||||
if (!Lara.isMoving)
|
if (!Lara.isMoving)
|
||||||
{
|
{
|
||||||
if (g_Inventory.GetInventoryItemChosen() == NO_ITEM)
|
if (g_Gui.GetInventoryItemChosen() == NO_ITEM)
|
||||||
{
|
{
|
||||||
if (g_Inventory.IsObjectInInventory(ID_CROWBAR_ITEM))
|
if (g_Gui.IsObjectInInventory(ID_CROWBAR_ITEM))
|
||||||
{
|
{
|
||||||
g_Inventory.SetEnterInventory(ID_CROWBAR_ITEM);
|
g_Gui.SetEnterInventory(ID_CROWBAR_ITEM);
|
||||||
item->pos.yRot ^= ANGLE(180);
|
item->pos.yRot ^= ANGLE(180);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -199,14 +199,14 @@ namespace TEN::Entities::Doors
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_Inventory.GetInventoryItemChosen() != ID_CROWBAR_ITEM)
|
if (g_Gui.GetInventoryItemChosen() != ID_CROWBAR_ITEM)
|
||||||
{
|
{
|
||||||
item->pos.yRot ^= ANGLE(180);
|
item->pos.yRot ^= ANGLE(180);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
g_Inventory.SetInventoryItemChosen(NO_ITEM);
|
g_Gui.SetInventoryItemChosen(NO_ITEM);
|
||||||
|
|
||||||
if (MoveLaraPosition(&CrowbarDoorPos, item, l))
|
if (MoveLaraPosition(&CrowbarDoorPos, item, l))
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include "control/box.h"
|
#include "control/box.h"
|
||||||
#include "items.h"
|
#include "items.h"
|
||||||
#include "control/lot.h"
|
#include "control/lot.h"
|
||||||
#include "newinv2.h"
|
#include "gui.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "pickup.h"
|
#include "pickup.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include "control/box.h"
|
#include "control/box.h"
|
||||||
#include "items.h"
|
#include "items.h"
|
||||||
#include "control/lot.h"
|
#include "control/lot.h"
|
||||||
#include "newinv2.h"
|
#include "gui.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "pickup.h"
|
#include "pickup.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include "control/box.h"
|
#include "control/box.h"
|
||||||
#include "items.h"
|
#include "items.h"
|
||||||
#include "control/lot.h"
|
#include "control/lot.h"
|
||||||
#include "newinv2.h"
|
#include "gui.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "pickup.h"
|
#include "pickup.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include "control/box.h"
|
#include "control/box.h"
|
||||||
#include "items.h"
|
#include "items.h"
|
||||||
#include "control/lot.h"
|
#include "control/lot.h"
|
||||||
#include "newinv2.h"
|
#include "gui.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "pickup.h"
|
#include "pickup.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "lara.h"
|
#include "lara.h"
|
||||||
#include "crowbar_switch.h"
|
#include "crowbar_switch.h"
|
||||||
#include "newinv2.h"
|
#include "gui.h"
|
||||||
#include "Sound/sound.h"
|
#include "Sound/sound.h"
|
||||||
#include "pickup.h"
|
#include "pickup.h"
|
||||||
#include "level.h"
|
#include "level.h"
|
||||||
|
@ -42,7 +42,7 @@ namespace TEN::Entities::Switches
|
||||||
int doSwitch = 0;
|
int doSwitch = 0;
|
||||||
ITEM_INFO* item = &g_Level.Items[itemNum];
|
ITEM_INFO* item = &g_Level.Items[itemNum];
|
||||||
|
|
||||||
if ((((TrInput & IN_ACTION) || g_Inventory.GetInventoryItemChosen() == ID_CROWBAR_ITEM)
|
if ((((TrInput & IN_ACTION) || g_Gui.GetInventoryItemChosen() == ID_CROWBAR_ITEM)
|
||||||
&& l->currentAnimState == LS_STOP
|
&& l->currentAnimState == LS_STOP
|
||||||
&& l->animNumber == LA_STAND_IDLE
|
&& l->animNumber == LA_STAND_IDLE
|
||||||
&& Lara.gunStatus == LG_NO_ARMS
|
&& Lara.gunStatus == LG_NO_ARMS
|
||||||
|
@ -55,7 +55,7 @@ namespace TEN::Entities::Switches
|
||||||
|
|
||||||
if (TestLaraPosition(&CrowbarBounds2, item, l))
|
if (TestLaraPosition(&CrowbarBounds2, item, l))
|
||||||
{
|
{
|
||||||
if (Lara.isMoving || g_Inventory.GetInventoryItemChosen() == ID_CROWBAR_ITEM)
|
if (Lara.isMoving || g_Gui.GetInventoryItemChosen() == ID_CROWBAR_ITEM)
|
||||||
{
|
{
|
||||||
if (MoveLaraPosition(&CrowbarPos2, item, l))
|
if (MoveLaraPosition(&CrowbarPos2, item, l))
|
||||||
{
|
{
|
||||||
|
@ -69,7 +69,7 @@ namespace TEN::Entities::Switches
|
||||||
Lara.interactedItem = itemNum;
|
Lara.interactedItem = itemNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_Inventory.SetInventoryItemChosen(NO_ITEM);
|
g_Gui.SetInventoryItemChosen(NO_ITEM);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -87,7 +87,7 @@ namespace TEN::Entities::Switches
|
||||||
{
|
{
|
||||||
if (TestLaraPosition(&CrowbarBounds, item, l))
|
if (TestLaraPosition(&CrowbarBounds, item, l))
|
||||||
{
|
{
|
||||||
if (Lara.isMoving || g_Inventory.GetInventoryItemChosen() == ID_CROWBAR_ITEM)
|
if (Lara.isMoving || g_Gui.GetInventoryItemChosen() == ID_CROWBAR_ITEM)
|
||||||
{
|
{
|
||||||
if (MoveLaraPosition(&CrowbarPos, item, l))
|
if (MoveLaraPosition(&CrowbarPos, item, l))
|
||||||
{
|
{
|
||||||
|
@ -101,7 +101,7 @@ namespace TEN::Entities::Switches
|
||||||
Lara.interactedItem = itemNum;
|
Lara.interactedItem = itemNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_Inventory.SetInventoryItemChosen(NO_ITEM);
|
g_Gui.SetInventoryItemChosen(NO_ITEM);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -121,7 +121,7 @@ namespace TEN::Entities::Switches
|
||||||
if (doSwitch == -1)
|
if (doSwitch == -1)
|
||||||
{
|
{
|
||||||
if (Lara.Crowbar)
|
if (Lara.Crowbar)
|
||||||
g_Inventory.SetEnterInventory(ID_CROWBAR_ITEM);
|
g_Gui.SetEnterInventory(ID_CROWBAR_ITEM);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (OldPickupPos.x != l->pos.xPos || OldPickupPos.y != l->pos.yPos || OldPickupPos.z != l->pos.zPos)
|
if (OldPickupPos.x != l->pos.xPos || OldPickupPos.y != l->pos.yPos || OldPickupPos.z != l->pos.zPos)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include "control/box.h"
|
#include "control/box.h"
|
||||||
#include "effects/effects.h"
|
#include "effects/effects.h"
|
||||||
#include "items.h"
|
#include "items.h"
|
||||||
#include "newinv2.h"
|
#include "gui.h"
|
||||||
#include "level.h"
|
#include "level.h"
|
||||||
#include "control/lot.h"
|
#include "control/lot.h"
|
||||||
#include "effects/tomb4fx.h"
|
#include "effects/tomb4fx.h"
|
||||||
|
@ -138,7 +138,7 @@ namespace TEN::Entities::TR4
|
||||||
{
|
{
|
||||||
if (info.distance < SQUARE(SECTOR(9)))
|
if (info.distance < SQUARE(SECTOR(9)))
|
||||||
{
|
{
|
||||||
if (!g_Inventory.IsObjectInInventory(ID_PUZZLE_ITEM5) && !item->itemFlags[0])
|
if (!g_Gui.IsObjectInInventory(ID_PUZZLE_ITEM5) && !item->itemFlags[0])
|
||||||
{
|
{
|
||||||
if (info.distance <= SQUARE(SECTOR(2)))
|
if (info.distance <= SQUARE(SECTOR(2)))
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include "framework.h"
|
#include "framework.h"
|
||||||
#include "jeep.h"
|
#include "jeep.h"
|
||||||
#include "lara.h"
|
#include "lara.h"
|
||||||
#include "newinv2.h"
|
#include "gui.h"
|
||||||
#include "effects/effects.h"
|
#include "effects/effects.h"
|
||||||
#include "collide.h"
|
#include "collide.h"
|
||||||
#include "lara_one_gun.h"
|
#include "lara_one_gun.h"
|
||||||
|
@ -420,7 +420,7 @@ static int GetOnJeep(int itemNumber)
|
||||||
{
|
{
|
||||||
ITEM_INFO* item = &g_Level.Items[itemNumber];
|
ITEM_INFO* item = &g_Level.Items[itemNumber];
|
||||||
|
|
||||||
if (!(TrInput & IN_ACTION) && g_Inventory.GetInventoryItemChosen() != ID_PUZZLE_ITEM1)
|
if (!(TrInput & IN_ACTION) && g_Gui.GetInventoryItemChosen() != ID_PUZZLE_ITEM1)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (item->flags & 0x100)
|
if (item->flags & 0x100)
|
||||||
|
@ -457,15 +457,15 @@ static int GetOnJeep(int itemNumber)
|
||||||
int tempAngle = LaraItem->pos.yRot - item->pos.yRot;
|
int tempAngle = LaraItem->pos.yRot - item->pos.yRot;
|
||||||
if (tempAngle > ANGLE(45) && tempAngle < ANGLE(135))
|
if (tempAngle > ANGLE(45) && tempAngle < ANGLE(135))
|
||||||
{
|
{
|
||||||
if (g_Inventory.GetInventoryItemChosen() == ID_PUZZLE_ITEM1)
|
if (g_Gui.GetInventoryItemChosen() == ID_PUZZLE_ITEM1)
|
||||||
{
|
{
|
||||||
g_Inventory.SetInventoryItemChosen(NO_ITEM);
|
g_Gui.SetInventoryItemChosen(NO_ITEM);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (g_Inventory.IsObjectInInventory(ID_PUZZLE_ITEM1))
|
if (g_Gui.IsObjectInInventory(ID_PUZZLE_ITEM1))
|
||||||
g_Inventory.SetEnterInventory(ID_PUZZLE_ITEM1);
|
g_Gui.SetEnterInventory(ID_PUZZLE_ITEM1);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -478,15 +478,15 @@ static int GetOnJeep(int itemNumber)
|
||||||
int tempAngle = LaraItem->pos.yRot - item->pos.yRot;
|
int tempAngle = LaraItem->pos.yRot - item->pos.yRot;
|
||||||
if (tempAngle > ANGLE(225) && tempAngle < ANGLE(315))
|
if (tempAngle > ANGLE(225) && tempAngle < ANGLE(315))
|
||||||
{
|
{
|
||||||
if (g_Inventory.GetInventoryItemChosen() == ID_PUZZLE_ITEM1)
|
if (g_Gui.GetInventoryItemChosen() == ID_PUZZLE_ITEM1)
|
||||||
{
|
{
|
||||||
g_Inventory.SetInventoryItemChosen(NO_ITEM);
|
g_Gui.SetInventoryItemChosen(NO_ITEM);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (g_Inventory.IsObjectInInventory(ID_PUZZLE_ITEM1))
|
if (g_Gui.IsObjectInInventory(ID_PUZZLE_ITEM1))
|
||||||
g_Inventory.SetEnterInventory(ID_PUZZLE_ITEM1);
|
g_Gui.SetEnterInventory(ID_PUZZLE_ITEM1);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include "control/control.h"
|
#include "control/control.h"
|
||||||
#include "effects/effects.h"
|
#include "effects/effects.h"
|
||||||
#include "lara.h"
|
#include "lara.h"
|
||||||
#include "newinv2.h"
|
#include "gui.h"
|
||||||
#include "collide.h"
|
#include "collide.h"
|
||||||
#include "lara_flare.h"
|
#include "lara_flare.h"
|
||||||
#include "setup.h"
|
#include "setup.h"
|
||||||
|
@ -301,7 +301,7 @@ static BOOL GetOnMotorBike(short itemNumber)
|
||||||
if (item->flags & ONESHOT || Lara.gunStatus != LG_NO_ARMS || LaraItem->gravityStatus)
|
if (item->flags & ONESHOT || Lara.gunStatus != LG_NO_ARMS || LaraItem->gravityStatus)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if ((abs(item->pos.yPos - LaraItem->pos.yPos) >= STEP_SIZE || !(TrInput & IN_ACTION)) && g_Inventory.GetInventoryItemChosen() != ID_PUZZLE_ITEM1)
|
if ((abs(item->pos.yPos - LaraItem->pos.yPos) >= STEP_SIZE || !(TrInput & IN_ACTION)) && g_Gui.GetInventoryItemChosen() != ID_PUZZLE_ITEM1)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
dx = LaraItem->pos.xPos - item->pos.xPos;
|
dx = LaraItem->pos.xPos - item->pos.xPos;
|
||||||
|
@ -369,10 +369,10 @@ void MotorbikeCollision(short itemNumber, ITEM_INFO* laraitem, COLL_INFO* coll)
|
||||||
short angle = phd_atan(item->pos.zPos - laraitem->pos.zPos, item->pos.xPos - laraitem->pos.xPos) - item->pos.yRot;
|
short angle = phd_atan(item->pos.zPos - laraitem->pos.zPos, item->pos.xPos - laraitem->pos.xPos) - item->pos.yRot;
|
||||||
if (angle <= -ANGLE(45.0f) || angle >= ANGLE(135.0f))
|
if (angle <= -ANGLE(45.0f) || angle >= ANGLE(135.0f))
|
||||||
{
|
{
|
||||||
if (g_Inventory.GetInventoryItemChosen() == ID_PUZZLE_ITEM1)
|
if (g_Gui.GetInventoryItemChosen() == ID_PUZZLE_ITEM1)
|
||||||
{
|
{
|
||||||
laraitem->animNumber = Objects[ID_MOTORBIKE_LARA_ANIMS].animIndex + BA_UNLOCK;
|
laraitem->animNumber = Objects[ID_MOTORBIKE_LARA_ANIMS].animIndex + BA_UNLOCK;
|
||||||
g_Inventory.SetInventoryItemChosen(NO_ITEM);
|
g_Gui.SetInventoryItemChosen(NO_ITEM);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include "control/box.h"
|
#include "control/box.h"
|
||||||
#include "effects/effects.h"
|
#include "effects/effects.h"
|
||||||
#include "effects/tomb4fx.h"
|
#include "effects/tomb4fx.h"
|
||||||
#include "newinv2.h"
|
#include "gui.h"
|
||||||
#include "setup.h"
|
#include "setup.h"
|
||||||
#include "level.h"
|
#include "level.h"
|
||||||
#include "lara.h"
|
#include "lara.h"
|
||||||
|
@ -58,7 +58,7 @@ void LagoonWitchControl(short itemNumber)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (g_Inventory.IsObjectInInventory(ID_PUZZLE_ITEM2))
|
if (g_Gui.IsObjectInInventory(ID_PUZZLE_ITEM2))
|
||||||
{
|
{
|
||||||
item->aiBits = 0;
|
item->aiBits = 0;
|
||||||
creature->enemy = LaraItem;
|
creature->enemy = LaraItem;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include "health.h"
|
#include "health.h"
|
||||||
#include "camera.h"
|
#include "camera.h"
|
||||||
#include "animation.h"
|
#include "animation.h"
|
||||||
#include "newinv2.h"
|
#include "gui.h"
|
||||||
#include "lara.h"
|
#include "lara.h"
|
||||||
#include "gameflow.h"
|
#include "gameflow.h"
|
||||||
#include "rope.h"
|
#include "rope.h"
|
||||||
|
@ -60,7 +60,7 @@ namespace TEN::Renderer
|
||||||
x *= (ScreenWidth / 800.0f);
|
x *= (ScreenWidth / 800.0f);
|
||||||
y *= (ScreenHeight / 600.0f);
|
y *= (ScreenHeight / 600.0f);
|
||||||
|
|
||||||
auto index = g_Inventory.ConvertObjectToInventoryItem(objectNum);
|
auto index = g_Gui.ConvertObjectToInventoryItem(objectNum);
|
||||||
|
|
||||||
if (index != -1)
|
if (index != -1)
|
||||||
{
|
{
|
||||||
|
@ -124,7 +124,7 @@ namespace TEN::Renderer
|
||||||
{
|
{
|
||||||
InventoryObject* objme;
|
InventoryObject* objme;
|
||||||
|
|
||||||
objme = &inventry_objects_list[g_Inventory.ConvertObjectToInventoryItem(objectNum)];
|
objme = &inventry_objects_list[g_Gui.ConvertObjectToInventoryItem(objectNum)];
|
||||||
|
|
||||||
if (!(objme->meshbits & (1 << n)))
|
if (!(objme->meshbits & (1 << n)))
|
||||||
continue;
|
continue;
|
||||||
|
@ -489,9 +489,9 @@ namespace TEN::Renderer
|
||||||
int y = 400;
|
int y = 400;
|
||||||
short lastY;
|
short lastY;
|
||||||
RendererVideoAdapter* adapter = &m_adapters[g_Configuration.Adapter];
|
RendererVideoAdapter* adapter = &m_adapters[g_Configuration.Adapter];
|
||||||
RendererDisplayMode* mode = &adapter->DisplayModes[g_Inventory.GetCurrentSettings().videoMode];
|
RendererDisplayMode* mode = &adapter->DisplayModes[g_Gui.GetCurrentSettings().videoMode];
|
||||||
__int64 title_option = g_Inventory.GetSelectedOption();
|
__int64 title_option = g_Gui.GetSelectedOption();
|
||||||
Menu title_menu = g_Inventory.GetMenuToDisplay();
|
Menu title_menu = g_Gui.GetMenuToDisplay();
|
||||||
|
|
||||||
switch (title_menu)
|
switch (title_menu)
|
||||||
{
|
{
|
||||||
|
@ -620,7 +620,7 @@ namespace TEN::Renderer
|
||||||
drawString(200, y, g_GameFlow->GetString(STRING_WINDOWED),
|
drawString(200, y, g_GameFlow->GetString(STRING_WINDOWED),
|
||||||
PRINTSTRING_COLOR_ORANGE,
|
PRINTSTRING_COLOR_ORANGE,
|
||||||
PRINTSTRING_DONT_UPDATE_BLINK | PRINTSTRING_OUTLINE | (title_option == 1 ? PRINTSTRING_BLINK : 0));
|
PRINTSTRING_DONT_UPDATE_BLINK | PRINTSTRING_OUTLINE | (title_option == 1 ? PRINTSTRING_BLINK : 0));
|
||||||
drawString(400, y, g_GameFlow->GetString(g_Inventory.GetCurrentSettings().conf.Windowed ? STRING_ENABLED : STRING_DISABLED),
|
drawString(400, y, g_GameFlow->GetString(g_Gui.GetCurrentSettings().conf.Windowed ? STRING_ENABLED : STRING_DISABLED),
|
||||||
PRINTSTRING_COLOR_WHITE,
|
PRINTSTRING_COLOR_WHITE,
|
||||||
PRINTSTRING_OUTLINE | (title_option == 1 ? PRINTSTRING_BLINK : 0));
|
PRINTSTRING_OUTLINE | (title_option == 1 ? PRINTSTRING_BLINK : 0));
|
||||||
|
|
||||||
|
@ -630,7 +630,7 @@ namespace TEN::Renderer
|
||||||
drawString(200, y, g_GameFlow->GetString(STRING_SHADOWS),
|
drawString(200, y, g_GameFlow->GetString(STRING_SHADOWS),
|
||||||
PRINTSTRING_COLOR_ORANGE,
|
PRINTSTRING_COLOR_ORANGE,
|
||||||
PRINTSTRING_DONT_UPDATE_BLINK | PRINTSTRING_OUTLINE | (title_option == 2 ? PRINTSTRING_BLINK : 0));
|
PRINTSTRING_DONT_UPDATE_BLINK | PRINTSTRING_OUTLINE | (title_option == 2 ? PRINTSTRING_BLINK : 0));
|
||||||
drawString(400, y, g_GameFlow->GetString(g_Inventory.GetCurrentSettings().conf.EnableShadows ? STRING_ENABLED : STRING_DISABLED),
|
drawString(400, y, g_GameFlow->GetString(g_Gui.GetCurrentSettings().conf.EnableShadows ? STRING_ENABLED : STRING_DISABLED),
|
||||||
PRINTSTRING_COLOR_WHITE,
|
PRINTSTRING_COLOR_WHITE,
|
||||||
PRINTSTRING_OUTLINE | (title_option == 2 ? PRINTSTRING_BLINK : 0));
|
PRINTSTRING_OUTLINE | (title_option == 2 ? PRINTSTRING_BLINK : 0));
|
||||||
|
|
||||||
|
@ -640,7 +640,7 @@ namespace TEN::Renderer
|
||||||
drawString(200, y, g_GameFlow->GetString(STRING_CAUSTICS),
|
drawString(200, y, g_GameFlow->GetString(STRING_CAUSTICS),
|
||||||
PRINTSTRING_COLOR_ORANGE,
|
PRINTSTRING_COLOR_ORANGE,
|
||||||
PRINTSTRING_DONT_UPDATE_BLINK | PRINTSTRING_OUTLINE | (title_option == 3 ? PRINTSTRING_BLINK : 0));
|
PRINTSTRING_DONT_UPDATE_BLINK | PRINTSTRING_OUTLINE | (title_option == 3 ? PRINTSTRING_BLINK : 0));
|
||||||
drawString(400, y, g_GameFlow->GetString(g_Inventory.GetCurrentSettings().conf.EnableCaustics ? STRING_ENABLED : STRING_DISABLED),
|
drawString(400, y, g_GameFlow->GetString(g_Gui.GetCurrentSettings().conf.EnableCaustics ? STRING_ENABLED : STRING_DISABLED),
|
||||||
PRINTSTRING_COLOR_WHITE,
|
PRINTSTRING_COLOR_WHITE,
|
||||||
PRINTSTRING_OUTLINE | (title_option == 3 ? PRINTSTRING_BLINK : 0));
|
PRINTSTRING_OUTLINE | (title_option == 3 ? PRINTSTRING_BLINK : 0));
|
||||||
|
|
||||||
|
@ -650,7 +650,7 @@ namespace TEN::Renderer
|
||||||
drawString(200, y, g_GameFlow->GetString(STRING_VOLUMETRIC_FOG),
|
drawString(200, y, g_GameFlow->GetString(STRING_VOLUMETRIC_FOG),
|
||||||
PRINTSTRING_COLOR_ORANGE,
|
PRINTSTRING_COLOR_ORANGE,
|
||||||
PRINTSTRING_DONT_UPDATE_BLINK | PRINTSTRING_OUTLINE | (title_option == 4 ? PRINTSTRING_BLINK : 0));
|
PRINTSTRING_DONT_UPDATE_BLINK | PRINTSTRING_OUTLINE | (title_option == 4 ? PRINTSTRING_BLINK : 0));
|
||||||
drawString(400, y, g_GameFlow->GetString(g_Inventory.GetCurrentSettings().conf.EnableVolumetricFog ? STRING_ENABLED : STRING_DISABLED),
|
drawString(400, y, g_GameFlow->GetString(g_Gui.GetCurrentSettings().conf.EnableVolumetricFog ? STRING_ENABLED : STRING_DISABLED),
|
||||||
PRINTSTRING_COLOR_WHITE,
|
PRINTSTRING_COLOR_WHITE,
|
||||||
PRINTSTRING_OUTLINE | (title_option == 4 ? PRINTSTRING_BLINK : 0));
|
PRINTSTRING_OUTLINE | (title_option == 4 ? PRINTSTRING_BLINK : 0));
|
||||||
|
|
||||||
|
@ -682,9 +682,9 @@ namespace TEN::Renderer
|
||||||
drawString(200, y, g_GameFlow->GetString(controlmsgs[k]),
|
drawString(200, y, g_GameFlow->GetString(controlmsgs[k]),
|
||||||
PRINTSTRING_COLOR_WHITE,
|
PRINTSTRING_COLOR_WHITE,
|
||||||
PRINTSTRING_OUTLINE | (title_option == k ? PRINTSTRING_BLINK : 0) |
|
PRINTSTRING_OUTLINE | (title_option == k ? PRINTSTRING_BLINK : 0) |
|
||||||
(g_Inventory.GetCurrentSettings().waitingForkey ? PRINTSTRING_DONT_UPDATE_BLINK : 0));
|
(g_Gui.GetCurrentSettings().waitingForkey ? PRINTSTRING_DONT_UPDATE_BLINK : 0));
|
||||||
|
|
||||||
if (g_Inventory.GetCurrentSettings().waitingForkey && title_option == k)
|
if (g_Gui.GetCurrentSettings().waitingForkey && title_option == k)
|
||||||
{
|
{
|
||||||
drawString(400, y, g_GameFlow->GetString(STRING_WAITING_FOR_KEY),
|
drawString(400, y, g_GameFlow->GetString(STRING_WAITING_FOR_KEY),
|
||||||
PRINTSTRING_COLOR_YELLOW,
|
PRINTSTRING_COLOR_YELLOW,
|
||||||
|
@ -724,7 +724,7 @@ namespace TEN::Renderer
|
||||||
drawString(200, y, g_GameFlow->GetString(STRING_SPECIAL_SOUND_FX),
|
drawString(200, y, g_GameFlow->GetString(STRING_SPECIAL_SOUND_FX),
|
||||||
PRINTSTRING_COLOR_ORANGE,
|
PRINTSTRING_COLOR_ORANGE,
|
||||||
PRINTSTRING_DONT_UPDATE_BLINK | PRINTSTRING_OUTLINE | (title_option == 0 ? PRINTSTRING_BLINK : 0));
|
PRINTSTRING_DONT_UPDATE_BLINK | PRINTSTRING_OUTLINE | (title_option == 0 ? PRINTSTRING_BLINK : 0));
|
||||||
drawString(400, y, g_GameFlow->GetString(g_Inventory.GetCurrentSettings().conf.EnableAudioSpecialEffects ? STRING_ENABLED : STRING_DISABLED),
|
drawString(400, y, g_GameFlow->GetString(g_Gui.GetCurrentSettings().conf.EnableAudioSpecialEffects ? STRING_ENABLED : STRING_DISABLED),
|
||||||
PRINTSTRING_COLOR_WHITE,
|
PRINTSTRING_COLOR_WHITE,
|
||||||
PRINTSTRING_OUTLINE | (title_option == 0 ? PRINTSTRING_BLINK : 0));
|
PRINTSTRING_OUTLINE | (title_option == 0 ? PRINTSTRING_BLINK : 0));
|
||||||
|
|
||||||
|
@ -734,7 +734,7 @@ namespace TEN::Renderer
|
||||||
drawString(200, y, g_GameFlow->GetString(STRING_MUSIC_VOLUME),
|
drawString(200, y, g_GameFlow->GetString(STRING_MUSIC_VOLUME),
|
||||||
PRINTSTRING_COLOR_ORANGE,
|
PRINTSTRING_COLOR_ORANGE,
|
||||||
PRINTSTRING_OUTLINE | (title_option == 1 ? PRINTSTRING_BLINK : 0));
|
PRINTSTRING_OUTLINE | (title_option == 1 ? PRINTSTRING_BLINK : 0));
|
||||||
drawBar(g_Inventory.GetCurrentSettings().conf.MusicVolume / 100.0f, g_MusicVolumeBar,ID_SFX_BAR_TEXTURE,0,false);
|
drawBar(g_Gui.GetCurrentSettings().conf.MusicVolume / 100.0f, g_MusicVolumeBar,ID_SFX_BAR_TEXTURE,0,false);
|
||||||
|
|
||||||
y += 25;
|
y += 25;
|
||||||
|
|
||||||
|
@ -742,7 +742,7 @@ namespace TEN::Renderer
|
||||||
drawString(200, y, g_GameFlow->GetString(STRING_SFX_VOLUME),
|
drawString(200, y, g_GameFlow->GetString(STRING_SFX_VOLUME),
|
||||||
PRINTSTRING_COLOR_ORANGE,
|
PRINTSTRING_COLOR_ORANGE,
|
||||||
PRINTSTRING_OUTLINE | (title_option == 2 ? PRINTSTRING_BLINK : 0));
|
PRINTSTRING_OUTLINE | (title_option == 2 ? PRINTSTRING_BLINK : 0));
|
||||||
drawBar(g_Inventory.GetCurrentSettings().conf.SfxVolume / 100.0f, g_SFXVolumeBar, ID_SFX_BAR_TEXTURE,0,false);
|
drawBar(g_Gui.GetCurrentSettings().conf.SfxVolume / 100.0f, g_SFXVolumeBar, ID_SFX_BAR_TEXTURE,0,false);
|
||||||
y += 25;
|
y += 25;
|
||||||
|
|
||||||
// Apply and cancel
|
// Apply and cancel
|
||||||
|
@ -764,9 +764,9 @@ namespace TEN::Renderer
|
||||||
char stringBuffer[255];
|
char stringBuffer[255];
|
||||||
int y;
|
int y;
|
||||||
RendererVideoAdapter* adapter = &m_adapters[g_Configuration.Adapter];
|
RendererVideoAdapter* adapter = &m_adapters[g_Configuration.Adapter];
|
||||||
RendererDisplayMode* mode = &adapter->DisplayModes[g_Inventory.GetCurrentSettings().videoMode];
|
RendererDisplayMode* mode = &adapter->DisplayModes[g_Gui.GetCurrentSettings().videoMode];
|
||||||
Menu pause_menu = g_Inventory.GetMenuToDisplay();
|
Menu pause_menu = g_Gui.GetMenuToDisplay();
|
||||||
__int64 pause_option = g_Inventory.GetSelectedOption();
|
__int64 pause_option = g_Gui.GetSelectedOption();
|
||||||
|
|
||||||
switch (pause_menu)
|
switch (pause_menu)
|
||||||
{
|
{
|
||||||
|
@ -847,7 +847,7 @@ namespace TEN::Renderer
|
||||||
drawString(200, y, g_GameFlow->GetString(STRING_WINDOWED),
|
drawString(200, y, g_GameFlow->GetString(STRING_WINDOWED),
|
||||||
PRINTSTRING_COLOR_ORANGE,
|
PRINTSTRING_COLOR_ORANGE,
|
||||||
PRINTSTRING_DONT_UPDATE_BLINK | PRINTSTRING_OUTLINE | (pause_option == 1 ? PRINTSTRING_BLINK : 0));
|
PRINTSTRING_DONT_UPDATE_BLINK | PRINTSTRING_OUTLINE | (pause_option == 1 ? PRINTSTRING_BLINK : 0));
|
||||||
drawString(400, y, g_GameFlow->GetString(g_Inventory.GetCurrentSettings().conf.Windowed ? STRING_ENABLED : STRING_DISABLED),
|
drawString(400, y, g_GameFlow->GetString(g_Gui.GetCurrentSettings().conf.Windowed ? STRING_ENABLED : STRING_DISABLED),
|
||||||
PRINTSTRING_COLOR_WHITE,
|
PRINTSTRING_COLOR_WHITE,
|
||||||
PRINTSTRING_OUTLINE | (pause_option == 1 ? PRINTSTRING_BLINK : 0));
|
PRINTSTRING_OUTLINE | (pause_option == 1 ? PRINTSTRING_BLINK : 0));
|
||||||
|
|
||||||
|
@ -857,7 +857,7 @@ namespace TEN::Renderer
|
||||||
drawString(200, y, g_GameFlow->GetString(STRING_SHADOWS),
|
drawString(200, y, g_GameFlow->GetString(STRING_SHADOWS),
|
||||||
PRINTSTRING_COLOR_ORANGE,
|
PRINTSTRING_COLOR_ORANGE,
|
||||||
PRINTSTRING_DONT_UPDATE_BLINK | PRINTSTRING_OUTLINE | (pause_option == 2 ? PRINTSTRING_BLINK : 0));
|
PRINTSTRING_DONT_UPDATE_BLINK | PRINTSTRING_OUTLINE | (pause_option == 2 ? PRINTSTRING_BLINK : 0));
|
||||||
drawString(400, y, g_GameFlow->GetString(g_Inventory.GetCurrentSettings().conf.EnableShadows ? STRING_ENABLED : STRING_DISABLED),
|
drawString(400, y, g_GameFlow->GetString(g_Gui.GetCurrentSettings().conf.EnableShadows ? STRING_ENABLED : STRING_DISABLED),
|
||||||
PRINTSTRING_COLOR_WHITE,
|
PRINTSTRING_COLOR_WHITE,
|
||||||
PRINTSTRING_OUTLINE | (pause_option == 2 ? PRINTSTRING_BLINK : 0));
|
PRINTSTRING_OUTLINE | (pause_option == 2 ? PRINTSTRING_BLINK : 0));
|
||||||
|
|
||||||
|
@ -867,7 +867,7 @@ namespace TEN::Renderer
|
||||||
drawString(200, y, g_GameFlow->GetString(STRING_CAUSTICS),
|
drawString(200, y, g_GameFlow->GetString(STRING_CAUSTICS),
|
||||||
PRINTSTRING_COLOR_ORANGE,
|
PRINTSTRING_COLOR_ORANGE,
|
||||||
PRINTSTRING_DONT_UPDATE_BLINK | PRINTSTRING_OUTLINE | (pause_option == 3 ? PRINTSTRING_BLINK : 0));
|
PRINTSTRING_DONT_UPDATE_BLINK | PRINTSTRING_OUTLINE | (pause_option == 3 ? PRINTSTRING_BLINK : 0));
|
||||||
drawString(400, y, g_GameFlow->GetString(g_Inventory.GetCurrentSettings().conf.EnableCaustics ? STRING_ENABLED : STRING_DISABLED),
|
drawString(400, y, g_GameFlow->GetString(g_Gui.GetCurrentSettings().conf.EnableCaustics ? STRING_ENABLED : STRING_DISABLED),
|
||||||
PRINTSTRING_COLOR_WHITE,
|
PRINTSTRING_COLOR_WHITE,
|
||||||
PRINTSTRING_OUTLINE | (pause_option == 3 ? PRINTSTRING_BLINK : 0));
|
PRINTSTRING_OUTLINE | (pause_option == 3 ? PRINTSTRING_BLINK : 0));
|
||||||
|
|
||||||
|
@ -877,7 +877,7 @@ namespace TEN::Renderer
|
||||||
drawString(200, y, g_GameFlow->GetString(STRING_VOLUMETRIC_FOG),
|
drawString(200, y, g_GameFlow->GetString(STRING_VOLUMETRIC_FOG),
|
||||||
PRINTSTRING_COLOR_ORANGE,
|
PRINTSTRING_COLOR_ORANGE,
|
||||||
PRINTSTRING_DONT_UPDATE_BLINK | PRINTSTRING_OUTLINE | (pause_option == 4 ? PRINTSTRING_BLINK : 0));
|
PRINTSTRING_DONT_UPDATE_BLINK | PRINTSTRING_OUTLINE | (pause_option == 4 ? PRINTSTRING_BLINK : 0));
|
||||||
drawString(400, y, g_GameFlow->GetString(g_Inventory.GetCurrentSettings().conf.EnableVolumetricFog ? STRING_ENABLED : STRING_DISABLED),
|
drawString(400, y, g_GameFlow->GetString(g_Gui.GetCurrentSettings().conf.EnableVolumetricFog ? STRING_ENABLED : STRING_DISABLED),
|
||||||
PRINTSTRING_COLOR_WHITE,
|
PRINTSTRING_COLOR_WHITE,
|
||||||
PRINTSTRING_OUTLINE | (pause_option == 4 ? PRINTSTRING_BLINK : 0));
|
PRINTSTRING_OUTLINE | (pause_option == 4 ? PRINTSTRING_BLINK : 0));
|
||||||
|
|
||||||
|
@ -909,9 +909,9 @@ namespace TEN::Renderer
|
||||||
drawString(200, y, g_GameFlow->GetString(controlmsgs[k]),
|
drawString(200, y, g_GameFlow->GetString(controlmsgs[k]),
|
||||||
PRINTSTRING_COLOR_WHITE,
|
PRINTSTRING_COLOR_WHITE,
|
||||||
PRINTSTRING_OUTLINE | (pause_option == k ? PRINTSTRING_BLINK : 0) |
|
PRINTSTRING_OUTLINE | (pause_option == k ? PRINTSTRING_BLINK : 0) |
|
||||||
(g_Inventory.GetCurrentSettings().waitingForkey ? PRINTSTRING_DONT_UPDATE_BLINK : 0));
|
(g_Gui.GetCurrentSettings().waitingForkey ? PRINTSTRING_DONT_UPDATE_BLINK : 0));
|
||||||
|
|
||||||
if (g_Inventory.GetCurrentSettings().waitingForkey && pause_option == k)
|
if (g_Gui.GetCurrentSettings().waitingForkey && pause_option == k)
|
||||||
{
|
{
|
||||||
drawString(400, y, g_GameFlow->GetString(STRING_WAITING_FOR_KEY),
|
drawString(400, y, g_GameFlow->GetString(STRING_WAITING_FOR_KEY),
|
||||||
PRINTSTRING_COLOR_YELLOW,
|
PRINTSTRING_COLOR_YELLOW,
|
||||||
|
@ -952,7 +952,7 @@ namespace TEN::Renderer
|
||||||
drawString(200, y, g_GameFlow->GetString(STRING_SPECIAL_SOUND_FX),
|
drawString(200, y, g_GameFlow->GetString(STRING_SPECIAL_SOUND_FX),
|
||||||
PRINTSTRING_COLOR_ORANGE,
|
PRINTSTRING_COLOR_ORANGE,
|
||||||
PRINTSTRING_DONT_UPDATE_BLINK | PRINTSTRING_OUTLINE | (pause_option == 0 ? PRINTSTRING_BLINK : 0));
|
PRINTSTRING_DONT_UPDATE_BLINK | PRINTSTRING_OUTLINE | (pause_option == 0 ? PRINTSTRING_BLINK : 0));
|
||||||
drawString(400, y, g_GameFlow->GetString(g_Inventory.GetCurrentSettings().conf.EnableAudioSpecialEffects ? STRING_ENABLED : STRING_DISABLED),
|
drawString(400, y, g_GameFlow->GetString(g_Gui.GetCurrentSettings().conf.EnableAudioSpecialEffects ? STRING_ENABLED : STRING_DISABLED),
|
||||||
PRINTSTRING_COLOR_WHITE,
|
PRINTSTRING_COLOR_WHITE,
|
||||||
PRINTSTRING_OUTLINE | (pause_option == 0 ? PRINTSTRING_BLINK : 0));
|
PRINTSTRING_OUTLINE | (pause_option == 0 ? PRINTSTRING_BLINK : 0));
|
||||||
|
|
||||||
|
@ -962,7 +962,7 @@ namespace TEN::Renderer
|
||||||
drawString(200, y, g_GameFlow->GetString(STRING_MUSIC_VOLUME),
|
drawString(200, y, g_GameFlow->GetString(STRING_MUSIC_VOLUME),
|
||||||
PRINTSTRING_COLOR_ORANGE,
|
PRINTSTRING_COLOR_ORANGE,
|
||||||
PRINTSTRING_OUTLINE | (pause_option == 1 ? PRINTSTRING_BLINK : 0));
|
PRINTSTRING_OUTLINE | (pause_option == 1 ? PRINTSTRING_BLINK : 0));
|
||||||
drawBar(g_Inventory.GetCurrentSettings().conf.MusicVolume / 100.0f, g_MusicVolumeBar, ID_SFX_BAR_TEXTURE,0,0);
|
drawBar(g_Gui.GetCurrentSettings().conf.MusicVolume / 100.0f, g_MusicVolumeBar, ID_SFX_BAR_TEXTURE,0,0);
|
||||||
|
|
||||||
y += 25;
|
y += 25;
|
||||||
|
|
||||||
|
@ -970,7 +970,7 @@ namespace TEN::Renderer
|
||||||
drawString(200, y, g_GameFlow->GetString(STRING_SFX_VOLUME),
|
drawString(200, y, g_GameFlow->GetString(STRING_SFX_VOLUME),
|
||||||
PRINTSTRING_COLOR_ORANGE,
|
PRINTSTRING_COLOR_ORANGE,
|
||||||
PRINTSTRING_OUTLINE | (pause_option == 2 ? PRINTSTRING_BLINK : 0));
|
PRINTSTRING_OUTLINE | (pause_option == 2 ? PRINTSTRING_BLINK : 0));
|
||||||
drawBar(g_Inventory.GetCurrentSettings().conf.SfxVolume / 100.0f, g_SFXVolumeBar, ID_SFX_BAR_TEXTURE,0,0);
|
drawBar(g_Gui.GetCurrentSettings().conf.SfxVolume / 100.0f, g_SFXVolumeBar, ID_SFX_BAR_TEXTURE,0,0);
|
||||||
y += 25;
|
y += 25;
|
||||||
|
|
||||||
// Apply and cancel
|
// Apply and cancel
|
||||||
|
@ -994,16 +994,16 @@ namespace TEN::Renderer
|
||||||
{
|
{
|
||||||
if (!g_GameFlow->EnableLoadSave)
|
if (!g_GameFlow->EnableLoadSave)
|
||||||
{
|
{
|
||||||
g_Inventory.SetInventoryMode(InventoryMode::InGame);
|
g_Gui.SetInventoryMode(InventoryMode::InGame);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
short selection = g_Inventory.GetLoadSaveSelection();
|
short selection = g_Gui.GetLoadSaveSelection();
|
||||||
char stringBuffer[255];
|
char stringBuffer[255];
|
||||||
long y = 70;
|
long y = 70;
|
||||||
LoadSavegameInfos();
|
LoadSavegameInfos();
|
||||||
|
|
||||||
if (g_Inventory.GetInventoryMode() == InventoryMode::Load)
|
if (g_Gui.GetInventoryMode() == InventoryMode::Load)
|
||||||
drawString(400, 40, "Load Game", D3DCOLOR_ARGB(255, 255, 140, 0), PRINTSTRING_CENTER | PRINTSTRING_OUTLINE);
|
drawString(400, 40, "Load Game", D3DCOLOR_ARGB(255, 255, 140, 0), PRINTSTRING_CENTER | PRINTSTRING_OUTLINE);
|
||||||
else
|
else
|
||||||
drawString(400, 40, "Save Game", D3DCOLOR_ARGB(255, 255, 140, 0), PRINTSTRING_CENTER | PRINTSTRING_OUTLINE);
|
drawString(400, 40, "Save Game", D3DCOLOR_ARGB(255, 255, 140, 0), PRINTSTRING_CENTER | PRINTSTRING_OUTLINE);
|
||||||
|
@ -1035,16 +1035,16 @@ namespace TEN::Renderer
|
||||||
|
|
||||||
void Renderer11::renderNewInventory()
|
void Renderer11::renderNewInventory()
|
||||||
{
|
{
|
||||||
g_Inventory.DrawCurrentObjectList((int)RingTypes::Inventory);
|
g_Gui.DrawCurrentObjectList((int)RingTypes::Inventory);
|
||||||
|
|
||||||
g_Inventory.HandleInventoryMenu();
|
g_Gui.HandleInventoryMenu();
|
||||||
|
|
||||||
if (g_Inventory.GetRings((int)RingTypes::Ammo)->ringactive)
|
if (g_Gui.GetRings((int)RingTypes::Ammo)->ringactive)
|
||||||
g_Inventory.DrawCurrentObjectList((int)RingTypes::Ammo);
|
g_Gui.DrawCurrentObjectList((int)RingTypes::Ammo);
|
||||||
|
|
||||||
g_Inventory.DrawAmmoSelector();
|
g_Gui.DrawAmmoSelector();
|
||||||
g_Inventory.FadeAmmoSelector();
|
g_Gui.FadeAmmoSelector();
|
||||||
g_Inventory.DrawCompass();
|
g_Gui.DrawCompass();
|
||||||
drawAllStrings();
|
drawAllStrings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1090,7 +1090,7 @@ namespace TEN::Renderer
|
||||||
static short xrot = 0, yrot = 0, zrot = 0;
|
static short xrot = 0, yrot = 0, zrot = 0;
|
||||||
static float scaler = 1.2f;
|
static float scaler = 1.2f;
|
||||||
float saved_scale;
|
float saved_scale;
|
||||||
short inv_item = g_Inventory.GetRings((int)RingTypes::Inventory)->current_object_list[g_Inventory.GetRings((int)RingTypes::Inventory)->curobjinlist].invitem;
|
short inv_item = g_Gui.GetRings((int)RingTypes::Inventory)->current_object_list[g_Gui.GetRings((int)RingTypes::Inventory)->curobjinlist].invitem;
|
||||||
InventoryObject* obj = &inventry_objects_list[inv_item];
|
InventoryObject* obj = &inventry_objects_list[inv_item];
|
||||||
|
|
||||||
if (TrInput & IN_LEFT)
|
if (TrInput & IN_LEFT)
|
||||||
|
@ -1119,7 +1119,7 @@ namespace TEN::Renderer
|
||||||
|
|
||||||
saved_scale = obj->scale1;
|
saved_scale = obj->scale1;
|
||||||
obj->scale1 = scaler;
|
obj->scale1 = scaler;
|
||||||
drawObjectOn2DPosition(400, 300, g_Inventory.ConvertInventoryItemToObject(inv_item), xrot, yrot, zrot, obj->scale1);
|
drawObjectOn2DPosition(400, 300, g_Gui.ConvertInventoryItemToObject(inv_item), xrot, yrot, zrot, obj->scale1);
|
||||||
obj->scale1 = saved_scale;
|
obj->scale1 = saved_scale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1127,7 +1127,7 @@ namespace TEN::Renderer
|
||||||
{
|
{
|
||||||
InventoryObject* obj = &inventry_objects_list[INV_OBJECT_OPEN_DIARY];
|
InventoryObject* obj = &inventry_objects_list[INV_OBJECT_OPEN_DIARY];
|
||||||
short currentPage = Lara.Diary.currentPage;
|
short currentPage = Lara.Diary.currentPage;
|
||||||
drawObjectOn2DPosition(400, 300, g_Inventory.ConvertInventoryItemToObject(INV_OBJECT_OPEN_DIARY), obj->xrot, obj->yrot, obj->zrot, obj->scale1);
|
drawObjectOn2DPosition(400, 300, g_Gui.ConvertInventoryItemToObject(INV_OBJECT_OPEN_DIARY), obj->xrot, obj->yrot, obj->zrot, obj->scale1);
|
||||||
|
|
||||||
for (int i = 0; i < MaxStringsPerPage; i++)
|
for (int i = 0; i < MaxStringsPerPage; i++)
|
||||||
{
|
{
|
||||||
|
@ -1203,7 +1203,7 @@ namespace TEN::Renderer
|
||||||
|
|
||||||
if (CurrentLevel == 0)
|
if (CurrentLevel == 0)
|
||||||
{
|
{
|
||||||
Menu title_menu = g_Inventory.GetMenuToDisplay();
|
Menu title_menu = g_Gui.GetMenuToDisplay();
|
||||||
|
|
||||||
if (title_menu == Menu::Title || title_menu == Menu::Options)
|
if (title_menu == Menu::Title || title_menu == Menu::Options)
|
||||||
drawLogo = 1;
|
drawLogo = 1;
|
||||||
|
@ -1230,7 +1230,7 @@ namespace TEN::Renderer
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
InventoryMode mode = g_Inventory.GetInventoryMode();
|
InventoryMode mode = g_Gui.GetInventoryMode();
|
||||||
|
|
||||||
if (mode == InventoryMode::Load || mode == InventoryMode::Save)
|
if (mode == InventoryMode::Load || mode == InventoryMode::Save)
|
||||||
{
|
{
|
||||||
|
@ -1258,7 +1258,7 @@ namespace TEN::Renderer
|
||||||
|
|
||||||
if (mode == InventoryMode::Pause)
|
if (mode == InventoryMode::Pause)
|
||||||
{
|
{
|
||||||
Menu pause_menu = g_Inventory.GetMenuToDisplay();
|
Menu pause_menu = g_Gui.GetMenuToDisplay();
|
||||||
|
|
||||||
if (pause_menu == Menu::Pause || pause_menu == Menu::Options)
|
if (pause_menu == Menu::Pause || pause_menu == Menu::Options)
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include "savegame.h"
|
#include "savegame.h"
|
||||||
#include "GameScriptInventoryObject.h"
|
#include "GameScriptInventoryObject.h"
|
||||||
#include "InventorySlots.h"
|
#include "InventorySlots.h"
|
||||||
#include "Game/newinv2.h"
|
#include "Game/gui.h"
|
||||||
|
|
||||||
/***
|
/***
|
||||||
Scripts that will be run on game startup.
|
Scripts that will be run on game startup.
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include "effects\tomb4fx.h"
|
#include "effects\tomb4fx.h"
|
||||||
#include "effects\effects.h"
|
#include "effects\effects.h"
|
||||||
#include "pickup.h"
|
#include "pickup.h"
|
||||||
#include "newinv2.h"
|
#include "gui.h"
|
||||||
#include "ObjectIDs.h"
|
#include "ObjectIDs.h"
|
||||||
#include "GameScriptDisplayString.h"
|
#include "GameScriptDisplayString.h"
|
||||||
#include "ReservedScriptNames.h"
|
#include "ReservedScriptNames.h"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "ItemEnumPair.h"
|
#include "ItemEnumPair.h"
|
||||||
#include "GameScriptRotation.h"
|
#include "GameScriptRotation.h"
|
||||||
#include "newinv2.h"
|
#include "gui.h"
|
||||||
|
|
||||||
static const std::unordered_map<std::string, RotationFlags> kRotAxes{
|
static const std::unordered_map<std::string, RotationFlags> kRotAxes{
|
||||||
{"X", RotationFlags::INV_ROT_X},
|
{"X", RotationFlags::INV_ROT_X},
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "newinv2.h"
|
#include "gui.h"
|
||||||
#include "objectslist.h"
|
#include "objectslist.h"
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
|
|
@ -176,7 +176,7 @@ xcopy /Y "$(ProjectDir)Shaders\HUD\*.hlsl" "$(TargetDir)\Shaders\HUD\"</Command>
|
||||||
<ClInclude Include="Game\memory\LinearArrayBuffer.h" />
|
<ClInclude Include="Game\memory\LinearArrayBuffer.h" />
|
||||||
<ClInclude Include="Game\memory\MemoryPoolAllocator.h" />
|
<ClInclude Include="Game\memory\MemoryPoolAllocator.h" />
|
||||||
<ClInclude Include="Game\memory\Vector.h" />
|
<ClInclude Include="Game\memory\Vector.h" />
|
||||||
<ClInclude Include="Game\newinv2.h" />
|
<ClInclude Include="Game\gui.h" />
|
||||||
<ClInclude Include="Game\particle\SimpleParticle.h" />
|
<ClInclude Include="Game\particle\SimpleParticle.h" />
|
||||||
<ClInclude Include="Specific\phd_global.h" />
|
<ClInclude Include="Specific\phd_global.h" />
|
||||||
<ClInclude Include="Game\memory\qmalloc.h" />
|
<ClInclude Include="Game\memory\qmalloc.h" />
|
||||||
|
@ -555,7 +555,7 @@ xcopy /Y "$(ProjectDir)Shaders\HUD\*.hlsl" "$(TargetDir)\Shaders\HUD\"</Command>
|
||||||
<ClCompile Include="Game\Lara\lara_tests.cpp" />
|
<ClCompile Include="Game\Lara\lara_tests.cpp" />
|
||||||
<ClCompile Include="Game\effects\lightning.cpp" />
|
<ClCompile Include="Game\effects\lightning.cpp" />
|
||||||
<ClCompile Include="Game\misc.cpp" />
|
<ClCompile Include="Game\misc.cpp" />
|
||||||
<ClCompile Include="Game\newinv2.cpp" />
|
<ClCompile Include="Game\gui.cpp" />
|
||||||
<ClCompile Include="Game\particle\SimpleParticle.cpp" />
|
<ClCompile Include="Game\particle\SimpleParticle.cpp" />
|
||||||
<ClCompile Include="Game\pickup\pickup_ammo.cpp" />
|
<ClCompile Include="Game\pickup\pickup_ammo.cpp" />
|
||||||
<ClCompile Include="Game\pickup\pickup_consumable.cpp" />
|
<ClCompile Include="Game\pickup\pickup_consumable.cpp" />
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
<ClCompile Include="Game\Lara\lara_tests.cpp" />
|
<ClCompile Include="Game\Lara\lara_tests.cpp" />
|
||||||
<ClCompile Include="Game\effects\lightning.cpp" />
|
<ClCompile Include="Game\effects\lightning.cpp" />
|
||||||
<ClCompile Include="Game\misc.cpp" />
|
<ClCompile Include="Game\misc.cpp" />
|
||||||
<ClCompile Include="Game\newinv2.cpp" />
|
|
||||||
<ClCompile Include="Game\particle\SimpleParticle.cpp" />
|
<ClCompile Include="Game\particle\SimpleParticle.cpp" />
|
||||||
<ClCompile Include="Game\pickup\pickup_ammo.cpp" />
|
<ClCompile Include="Game\pickup\pickup_ammo.cpp" />
|
||||||
<ClCompile Include="Game\pickup\pickup_consumable.cpp" />
|
<ClCompile Include="Game\pickup\pickup_consumable.cpp" />
|
||||||
|
@ -316,6 +315,7 @@
|
||||||
<ClCompile Include="Scripting\LuaHandler.cpp" />
|
<ClCompile Include="Scripting\LuaHandler.cpp" />
|
||||||
<ClCompile Include="Scripting\ScriptAssert.cpp" />
|
<ClCompile Include="Scripting\ScriptAssert.cpp" />
|
||||||
<ClCompile Include="Objects\Effects\enemy_missile.cpp" />
|
<ClCompile Include="Objects\Effects\enemy_missile.cpp" />
|
||||||
|
<ClCompile Include="Game\gui.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="framework.h" />
|
<ClInclude Include="framework.h" />
|
||||||
|
@ -360,7 +360,6 @@
|
||||||
<ClInclude Include="Game\memory\LinearArrayBuffer.h" />
|
<ClInclude Include="Game\memory\LinearArrayBuffer.h" />
|
||||||
<ClInclude Include="Game\memory\MemoryPoolAllocator.h" />
|
<ClInclude Include="Game\memory\MemoryPoolAllocator.h" />
|
||||||
<ClInclude Include="Game\memory\Vector.h" />
|
<ClInclude Include="Game\memory\Vector.h" />
|
||||||
<ClInclude Include="Game\newinv2.h" />
|
|
||||||
<ClInclude Include="Game\particle\SimpleParticle.h" />
|
<ClInclude Include="Game\particle\SimpleParticle.h" />
|
||||||
<ClInclude Include="Specific\phd_global.h" />
|
<ClInclude Include="Specific\phd_global.h" />
|
||||||
<ClInclude Include="Game\memory\qmalloc.h" />
|
<ClInclude Include="Game\memory\qmalloc.h" />
|
||||||
|
@ -709,6 +708,7 @@
|
||||||
<ClInclude Include="Objects\TR5\Object\tr5_genslot.h" />
|
<ClInclude Include="Objects\TR5\Object\tr5_genslot.h" />
|
||||||
<ClInclude Include="Renderer\VertexBuffer\VertexBuffer.h" />
|
<ClInclude Include="Renderer\VertexBuffer\VertexBuffer.h" />
|
||||||
<ClInclude Include="Objects\TR5\Object\tr5_expandingplatform.h" />
|
<ClInclude Include="Objects\TR5\Object\tr5_expandingplatform.h" />
|
||||||
|
<ClInclude Include="Game\gui.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="Resources.rc" />
|
<ResourceCompile Include="Resources.rc" />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue