cmd/pos: improve indexing of demo and cutscenes

This commit is contained in:
Marcin Kurczewski 2025-03-11 21:28:22 +01:00
parent 4eb4cbd34b
commit 1989453f58
3 changed files with 6 additions and 1 deletions

View file

@ -6,6 +6,7 @@
- changed the Controls screen to hide the reset and unbind texts when changing a key (#2103)
- changed injections to a new file format with a smaller footprint and improved applicability tests (#1967)
- changed the `/pos` command to show `Demo` and `Cutscene` instead of `Level` when relevant
- changed the `/pos` command to show demo and cutscene numbers starting at 1, in line with `/play`
- fixed several instances of the camera going out of bounds (#1034)
- fixed issues with stacked, floating and flipmap pushblocks in custom levels
- fixed issues with fixed cameras in 60 FPS shifting before settling on their target (#1186)

View file

@ -8,6 +8,7 @@
- added Italian localization to the config tool
- changed injections to a new file format with a smaller footprint, improved applicability tests and similar feature support as TR1 (#1967)
- changed the `/pos` command to show `Demo` and `Cutscene` instead of `Level` when relevant
- changed the `/pos` command to show demo and cutscene numbers starting at 1, in line with `/play`
- fixed smashed windows blocking enemy pathing after loading a save (#2535)
- fixed several instances of the camera going out of bounds (#1034)
- fixed Lara getting stuck in a T-pose after jumping/falling and then dying before reaching fast fall speed (#2575)

View file

@ -24,12 +24,15 @@ static COMMAND_RESULT M_Entrypoint(const COMMAND_CONTEXT *const ctx)
const ITEM *const lara_item = Lara_GetItem();
const char *prefix = nullptr;
int32_t reindex = 0;
switch (GF_GetCurrentLevel()->type) {
case GFL_CUTSCENE:
prefix = GS(OSD_POS_CUTSCENE);
reindex = 1;
break;
case GFL_DEMO:
prefix = GS(OSD_POS_DEMO);
reindex = 1;
break;
default:
prefix = GS(OSD_POS_LEVEL);
@ -40,7 +43,7 @@ static COMMAND_RESULT M_Entrypoint(const COMMAND_CONTEXT *const ctx)
Console_Log(
GS(OSD_POS_GET),
prefix,
GF_GetCurrentLevel()->num,
GF_GetCurrentLevel()->num + reindex,
GF_GetCurrentLevel()->title,
lara_item->room_num,
lara_item->pos.x / (float)WALL_L,