Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev troye #150

Merged
merged 2 commits into from
Apr 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
- Make mono screen (inventory background) style customizable.
- Allow quick reloading while dead.
- Extend the time it takes for the death menu to pop up.
- Add optional loading text.

## [2.2.0](https://github.com/Trxyebeep/TOMB5/tree/V2.2.0) (Jan. 11 2022)

Expand Down
1 change: 1 addition & 0 deletions TOMB5/global/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -2417,6 +2417,7 @@ struct tomb5_options //only bools or ulongs because that's what registry likes
bool tr4_loadscreens; //on off
bool tr4_loadbar; //on off
ulong inv_bg_mode; //1-> original, 2->TR4, 3-> clear
bool loadingtxt; //on off
};
#endif
#pragma pack(pop)
11 changes: 11 additions & 0 deletions TOMB5/specific/output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "../tomb5/tomb5.h"
#include "../game/draw.h"
#include "../game/health.h"
#include "../game/text.h"
#endif

void S_DrawPickup(short object_number)
Expand Down Expand Up @@ -1203,6 +1204,11 @@ void RenderLoadPic(long unused)
phd_LookAt(camera.pos.x, camera.pos.y, camera.pos.z, camera.target.x, camera.target.y, camera.target.z, 0);
S_InitialisePolyList();
RenderIt(camera.pos.room_number);

if (tomb5.loadingtxt && tomb5.tr4_loadbar)
PrintString((ushort)phd_centerx, ushort((float((480 - (font_height >> 1)) * float(phd_winymax / 480.0F))) - (font_height >> 1)),
5, SCRIPT_TEXT(STR_LOADING), FF_CENTER);

S_OutputPolyList();
S_DumpScreen();

Expand All @@ -1211,6 +1217,11 @@ void RenderLoadPic(long unused)
phd_LookAt(camera.pos.x, camera.pos.y, camera.pos.z, camera.target.x, camera.target.y, camera.target.z, 0);
S_InitialisePolyList();
RenderIt(camera.pos.room_number);

if (tomb5.loadingtxt && tomb5.tr4_loadbar)
PrintString((ushort)phd_centerx, ushort((float((480 - (font_height >> 1)) * float(phd_winymax / 480.0F))) - (font_height >> 1)),
5, SCRIPT_TEXT(STR_LOADING), FF_CENTER);

S_OutputPolyList();
S_DumpScreen();
#endif
Expand Down
10 changes: 10 additions & 0 deletions TOMB5/tomb5/tomb5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ void init_tomb5_stuff()
sprintf(buf, "inv_bgM");
tomb5.inv_bg_mode = 1; //original
REG_WriteLong(buf, tomb5.inv_bg_mode);

sprintf(buf, "loadtxt");
tomb5.loadingtxt = 1; //on
REG_WriteBool(buf, tomb5.loadingtxt);
}
else //Key already exists, settings already written, read them. also falls back to default if a smartass manually deletes a single value
{
Expand Down Expand Up @@ -149,6 +153,9 @@ void init_tomb5_stuff()

sprintf(buf, "inv_bgM");
REG_ReadLong(buf, tomb5.inv_bg_mode, 1);

sprintf(buf, "loadtxt");
REG_ReadBool(buf, tomb5.loadingtxt, 1);
}

CloseRegistry();
Expand Down Expand Up @@ -216,6 +223,9 @@ void save_new_tomb5_settings()
sprintf(buf, "inv_bgM");
REG_WriteLong(buf, tomb5.inv_bg_mode);

sprintf(buf, "loadtxt");
REG_WriteBool(buf, tomb5.loadingtxt);

CloseRegistry();
}

Expand Down
21 changes: 18 additions & 3 deletions TOMB5/tomb5/troyestuff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "tomb5.h"

#define PAGE0_NUM 14
#define PAGE1_NUM 5
#define PAGE1_NUM 6

void TroyeMenu(long textY, long& menu, ulong& selection, ulong selection_bak)
{
Expand Down Expand Up @@ -365,7 +365,8 @@ bool Page1(long& num, long textY, ulong selection)
PrintString(phd_centerx >> 2, ushort(textY + 3 * font_height), selection & 2 ? 1 : 2, "PSX skies", 0);
PrintString(phd_centerx >> 2, ushort(textY + 4 * font_height), selection & 4 ? 1 : 2, "TR4 loadscreens", 0);
PrintString(phd_centerx >> 2, ushort(textY + 5 * font_height), selection & 8 ? 1 : 2, "loadbar style", 0);
PrintString(phd_centerx >> 2, ushort(textY + 6 * font_height), selection & 16 ? 1 : 2, "mono screen style", 0);
PrintString(phd_centerx >> 2, ushort(textY + 6 * font_height), selection & 0x10 ? 1 : 2, "mono screen style", 0);
PrintString(phd_centerx >> 2, ushort(textY + 7 * font_height), selection & 0x20 ? 1 : 2, "Loading text", 0);

strcpy(buffer, tomb5.crawltilt ? "on" : "off");
PrintString(phd_centerx + (phd_centerx >> 2), ushort(textY + 2 * font_height), selection & 1 ? 1 : 6, buffer, 0);
Expand All @@ -380,7 +381,10 @@ bool Page1(long& num, long textY, ulong selection)
PrintString(phd_centerx + (phd_centerx >> 2), ushort(textY + 5 * font_height), selection & 8 ? 1 : 6, buffer, 0);

strcpy(buffer, tomb5.inv_bg_mode == 1 ? "original" : tomb5.inv_bg_mode == 2 ? "TR4" : "clear");
PrintString(phd_centerx + (phd_centerx >> 2), ushort(textY + 6 * font_height), selection & 16 ? 1 : 6, buffer, 0);
PrintString(phd_centerx + (phd_centerx >> 2), ushort(textY + 6 * font_height), selection & 0x10 ? 1 : 6, buffer, 0);

strcpy(buffer, tomb5.loadingtxt ? "on" : "off");
PrintString(phd_centerx + (phd_centerx >> 2), ushort(textY + 7 * font_height), selection & 0x20 ? 1 : 6, buffer, 0);

switch (selection)
{
Expand Down Expand Up @@ -452,6 +456,17 @@ bool Page1(long& num, long textY, ulong selection)
changed = 1;
}

break;

case 1 << 5:

if (dbinput & IN_LEFT || dbinput & IN_RIGHT)
{
SoundEffect(SFX_MENU_SELECT, 0, SFX_ALWAYS);
tomb5.loadingtxt = !tomb5.loadingtxt;
changed = 1;
}

break;
}

Expand Down
33 changes: 33 additions & 0 deletions USING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
## New options menu:
*accessible through the title options menu/pause options menu*

# page 1

### 1. FootPrints:
- Toggles footprints on and off.
Expand Down Expand Up @@ -97,3 +98,35 @@ Changes the positions of the bars on the screen.

### 12. TR4 Camera:
- Toggles TR4 camera behavior on and off.

### 13. Bar Mode:
Determines the mode of the bars.
- original: original TR4 bars.
- TR5: TR5 bar colors.
- PSX: PSX bar colors.

# page 2

### 14. Crawl Tilting:
- Toggles Lara tilting while crawling on sloped surfaces.

### 15. PSX Skies:
- Toggles using the PSX sprite for the sky.

### 16. TR4 loadscreens:
- Toggles using original picture or new TR4 style loading screens.

### 17. Loadbar style:
Determines the style of the loading bar in the loading screens.
- TR4: big bar, like TR4.
- TR5: original small TR5 bar.

### 18. mono screen style:
Determines the style of the inventory/pause menu background.
- original: The original yellow-ish style.
- TR4: The TR4 black and white.
- Clear: Clear game screen as is, no color modification.

### 19. Loading text:
- Toggles the "Loading" text in loading screens.
Note: TR5 loadbar style will ignore this option and never show the text. This is intentional and will not change.