Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
6683eb5
Fix for remaster darkpilo.cfg which is not located in the game folder.
Karjala22 Apr 9, 2025
85b2194
Add for linux compatibility
Karjala22 Apr 9, 2025
d3ed1cb
Update Linux pathing.
Karjala22 Apr 9, 2025
8241d5f
fix for nix paths
Karjala22 Apr 9, 2025
1babf91
change the path path based on testing on proton.
Karjala22 Apr 10, 2025
f7a999c
Merge branch 'luciusDXL:master' into master
ifeldshteyn Apr 21, 2025
923de14
Merge branch 'luciusDXL:master' into master
ifeldshteyn Sep 8, 2025
03c8cd3
Merge branch 'luciusDXL:master' into master
ifeldshteyn Sep 9, 2025
a33993c
Merge branch 'luciusDXL:master' into master
ifeldshteyn Sep 9, 2025
e68eee7
Merge branch 'luciusDXL:master' into master
ifeldshteyn Sep 10, 2025
7101dbf
Merge branch 'luciusDXL:master' into master
ifeldshteyn Sep 16, 2025
a7c89de
* Level Script now setup properly after loading from save file.
luciusDXL Sep 13, 2025
16b0710
Send messages from ForceScript (#564)
jerethk Sep 13, 2025
38b8fc0
* Make Script Arguments fixed size to work with Dark Forces allocators.
luciusDXL Sep 13, 2025
30d9c6d
Missing <cstring> include.
luciusDXL Sep 13, 2025
9cd3518
* Fixed smooth delta time at high framerates.
luciusDXL Sep 13, 2025
7a07359
Merge branch 'master' of https://github.com/ifeldshteyn/TheForceEngine
Karjala22 Sep 16, 2025
d7e2b10
Add secret count to the UI and allow for hud centering.
Karjala22 Sep 18, 2025
3c2f483
Merge branch 'luciusDXL:master' into master
ifeldshteyn Sep 22, 2025
664464e
It looks like there are more problems with trying to run faster than …
luciusDXL Sep 21, 2025
d1ba47e
Object Scripting - manipulate logic data (#568)
jerethk Sep 22, 2025
e0df74d
Bug fix - external data needs to be cleared out before loading a game…
jerethk Sep 22, 2025
a0ddc87
Merge branch 'master' of https://github.com/ifeldshteyn/TheForceEngine
Karjala22 Sep 22, 2025
55d64f2
Add recipes to ignore and restore vcxproj.
Karjala22 Sep 22, 2025
872ab7f
Delete TheForceEngine/x64/Debug/TheForceEngine.exe.recipe
ifeldshteyn Sep 22, 2025
707bee7
Merge branch 'master' into secret_count
Karjala22 Sep 22, 2025
3256102
Merge branch 'secret_count' of https://github.com/ifeldshteyn/TheForc…
Karjala22 Sep 22, 2025
d324c9c
Ensure offset is centered even when in non-hd mode.
Karjala22 Sep 23, 2025
dde1cf0
Merge branch 'master' into secret_count
ifeldshteyn Feb 8, 2026
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,7 @@ TheForceEngine/tfelnx

# Ignore dumps
*.dmp

# ignore recipe
*.recipe
.DS_Store
10 changes: 9 additions & 1 deletion TheForceEngine/TFE_DarkForces/GameUI/pda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,15 @@ namespace TFE_DarkForces
char secretStr[32];
LRect rect;

sprintf(secretStr, "%2d%%", secretPercentage);
bool showCount = TFE_Settings::getGameSettings()->df_showSecretCount;
if (showCount)
{
sprintf(secretStr, "%d/%d", s_secretsFound, s_levelState.secretCount);
}
else
{
sprintf(secretStr, "%2d%%", secretPercentage);
}
lactor_setState(s_pdaArt, 31, 0);
lactorAnim_getFrame(s_pdaArt, &rect);

Expand Down
24 changes: 22 additions & 2 deletions TheForceEngine/TFE_DarkForces/hud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <TFE_Jedi/Renderer/jediRenderer.h>
#include <TFE_Jedi/Renderer/screenDraw.h>
#include <TFE_Jedi/Renderer/RClassic_GPU/screenDrawGPU.h>
#include <TFE_Jedi/Level/levelData.h>
#include <TFE_Jedi/Level/rfont.h>
#include <TFE_Jedi/Level/rtexture.h>
#include <TFE_Jedi/Level/roffscreenBuffer.h>
Expand Down Expand Up @@ -549,7 +550,22 @@ namespace TFE_DarkForces
s32 xOffset = floor16(div16(intToFixed16(vfb_getWidescreenOffset()), vfb_getXScale()));

u8 dataStr[64];
sprintf((char*)dataStr, "X:%04d Y:%.1f Z:%04d H:%.1f S:%d%%", floor16(x), -fixed16ToFloat(s_playerEye->posWS.y), floor16(z), fixed16ToFloat(s_playerEye->worldHeight), s_secretsPercent);
char secretStr[8];

bool showCount = TFE_Settings::getGameSettings()->df_showSecretCount;
if (showCount)
{
sprintf(secretStr, "%d/%d ", s_secretsFound, TFE_Jedi::s_levelState.secretCount);

// Offset text for large # of secrets.
if (TFE_Jedi::s_levelState.secretCount > 10) xOffset -= 12;
}
else
{
sprintf(secretStr, "%2d%%", s_secretsPercent);
}

sprintf((char*)dataStr, "X:%04d Y:%.1f Z:%04d H:%.1f S:%s", floor16(x), -fixed16ToFloat(s_playerEye->posWS.y), floor16(z), fixed16ToFloat(s_playerEye->worldHeight), secretStr);
displayHudMessage(s_hudFont, (DrawRect*)vfb_getScreenRect(VFB_RECT_UI), 164 + xOffset, 10, dataStr, framebuffer);
}
}
Expand Down Expand Up @@ -1284,10 +1300,14 @@ namespace TFE_DarkForces
fixed16_16 xScale = vfb_getXScale();
fixed16_16 yScale = vfb_getYScale();

bool centerText = TFE_Settings::getGameSettings()->df_centerHudPosition;

// Center X Offset otherwise use the font centered scaling
fixed16_16 xf = mul16(intToFixed16(x), centerText ? xScale / 2 : xScale);

Comment thread
ifeldshteyn marked this conversation as resolved.
xScale /= fntScale;
yScale /= fntScale;

fixed16_16 xf = mul16(intToFixed16(x), xScale);
fixed16_16 yf = mul16(intToFixed16(y), yScale);
fixed16_16 x0 = xf;

Expand Down
42 changes: 30 additions & 12 deletions TheForceEngine/TFE_FrontEndUI/frontEndUi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1201,18 +1201,6 @@ namespace TFE_FrontEndUI
gameSettings->df_enableAutoaim = enableAutoaim;
}

bool showSecretMsg = gameSettings->df_showSecretFoundMsg;
if (ImGui::Checkbox("Show Secret Found Message", &showSecretMsg))
{
gameSettings->df_showSecretFoundMsg = showSecretMsg;
}

bool showKeysUsed = gameSettings->df_showKeyUsed;
if (ImGui::Checkbox("Show Key Used messages", &showKeysUsed))
{
gameSettings->df_showKeyUsed = showKeysUsed;
}

bool autorun = gameSettings->df_autorun;
if (ImGui::Checkbox("Autorun", &autorun))
{
Expand Down Expand Up @@ -1243,12 +1231,42 @@ namespace TFE_FrontEndUI
gameSettings->df_autoEndMission = autoEndMission;
}

ImGui::Separator();

ImGui::PushFont(s_versionFont);
ImGui::LabelText("##ConfigLabel", "UI Settings");
ImGui::PopFont();

bool showKeyColors = gameSettings->df_showKeyColors;
if (ImGui::Checkbox("Show the key color of the door on the map", &showKeyColors))
{
gameSettings->df_showKeyColors = showKeyColors;
}

bool centerDataPos = gameSettings->df_centerHudPosition;
if (ImGui::Checkbox("Center the hud LADATA overlay", &centerDataPos))
{
gameSettings->df_centerHudPosition = centerDataPos;
}

bool showSecretMsg = gameSettings->df_showSecretFoundMsg;
if (ImGui::Checkbox("Show Secret Found Message", &showSecretMsg))
{
gameSettings->df_showSecretFoundMsg = showSecretMsg;
}

bool showSecretCount = gameSettings->df_showSecretCount;
if (ImGui::Checkbox("Show the Total Number of Secrets Found", &showSecretCount))
{
gameSettings->df_showSecretCount = showSecretCount;
}

bool showKeysUsed = gameSettings->df_showKeyUsed;
if (ImGui::Checkbox("Show Key Used messages", &showKeysUsed))
{
gameSettings->df_showKeyUsed = showKeysUsed;
}

bool showMapSecrets = gameSettings->df_showMapSecrets;
if (ImGui::Checkbox("Show Secrets on the AutoMap", &showMapSecrets))
{
Expand Down
52 changes: 33 additions & 19 deletions TheForceEngine/TFE_Settings/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -554,29 +554,31 @@ namespace TFE_Settings

void writeDarkForcesGameSettings(FileStream& settings)
{
writeKeyValue_Int(settings, "airControl", s_gameSettings.df_airControl);
writeKeyValue_Int(settings, "airControl", s_gameSettings.df_airControl);
writeKeyValue_Bool(settings, "bobaFettFacePlayer", s_gameSettings.df_bobaFettFacePlayer);
writeKeyValue_Bool(settings, "smoothVUEs", s_gameSettings.df_smoothVUEs);
writeKeyValue_Bool(settings, "disableFightMusic", s_gameSettings.df_disableFightMusic);
writeKeyValue_Bool(settings, "enableAutoaim", s_gameSettings.df_enableAutoaim);
writeKeyValue_Bool(settings, "showSecretFoundMsg", s_gameSettings.df_showSecretFoundMsg);
writeKeyValue_Bool(settings, "showSecretCount", s_gameSettings.df_showSecretCount);
writeKeyValue_Bool(settings, "autorun", s_gameSettings.df_autorun);
writeKeyValue_Bool(settings, "crouchToggle", s_gameSettings.df_crouchToggle);
writeKeyValue_Bool(settings, "ignoreInfLimit", s_gameSettings.df_ignoreInfLimit);
writeKeyValue_Bool(settings, "stepSecondAlt", s_gameSettings.df_stepSecondAlt);
writeKeyValue_Int(settings, "pitchLimit", s_gameSettings.df_pitchLimit);
writeKeyValue_Int(settings, "pitchLimit", s_gameSettings.df_pitchLimit);
writeKeyValue_Bool(settings, "solidWallFlagFix", s_gameSettings.df_solidWallFlagFix);
writeKeyValue_Bool(settings, "enableUnusedItem", s_gameSettings.df_enableUnusedItem);
writeKeyValue_Bool(settings, "jsonAiLogics", s_gameSettings.df_jsonAiLogics);
writeKeyValue_Bool(settings, "df_showReplayCounter", s_gameSettings.df_showReplayCounter);
writeKeyValue_Int(settings, "df_recordFrameRate", s_gameSettings.df_recordFrameRate);
writeKeyValue_Int(settings, "df_playbackFrameRate", s_gameSettings.df_playbackFrameRate);
writeKeyValue_Bool(settings, "df_enableRecording", s_gameSettings.df_enableRecording);
writeKeyValue_Bool(settings, "df_enableRecordingAll", s_gameSettings.df_enableRecordingAll);
writeKeyValue_Bool(settings, "df_demologging", s_gameSettings.df_demologging);
writeKeyValue_Bool(settings, "df_autoNextMission", s_gameSettings.df_autoEndMission);
writeKeyValue_Bool(settings, "df_showKeyUsed", s_gameSettings.df_showKeyUsed);
writeKeyValue_Bool(settings, "df_showKeyColors", s_gameSettings.df_showKeyColors);
writeKeyValue_Bool(settings, "showReplayCounter", s_gameSettings.df_showReplayCounter);
writeKeyValue_Int(settings, "recordFrameRate", s_gameSettings.df_recordFrameRate);
writeKeyValue_Int(settings, "playbackFrameRate", s_gameSettings.df_playbackFrameRate);
writeKeyValue_Bool(settings, "enableRecording", s_gameSettings.df_enableRecording);
writeKeyValue_Bool(settings, "enableRecordingAll", s_gameSettings.df_enableRecordingAll);
writeKeyValue_Bool(settings, "demologging", s_gameSettings.df_demologging);
writeKeyValue_Bool(settings, "autoNextMission", s_gameSettings.df_autoEndMission);
writeKeyValue_Bool(settings, "showKeyUsed", s_gameSettings.df_showKeyUsed);
writeKeyValue_Bool(settings, "showKeyColors", s_gameSettings.df_showKeyColors);
writeKeyValue_Bool(settings, "centerHudPos", s_gameSettings.df_centerHudPosition);
writeKeyValue_Bool(settings, "df_showMapSecrets", s_gameSettings.df_showMapSecrets);
writeKeyValue_Bool(settings, "df_showMapObjects", s_gameSettings.df_showMapObjects);
}
Expand Down Expand Up @@ -1180,6 +1182,10 @@ namespace TFE_Settings
{
s_gameSettings.df_showSecretFoundMsg = parseBool(value);
}
else if (strcasecmp("showSecretCount", key) == 0)
{
s_gameSettings.df_showSecretCount = parseBool(value);
}
else if (strcasecmp("autorun", key) == 0)
{
s_gameSettings.df_autorun = parseBool(value);
Expand Down Expand Up @@ -1212,37 +1218,45 @@ namespace TFE_Settings
{
s_gameSettings.df_jsonAiLogics = parseBool(value);
}
else if (strcasecmp("df_showReplayCounter", key) == 0)
else if (strcasecmp("showReplayCounter", key) == 0)
{
s_gameSettings.df_showReplayCounter = parseBool(value);
}
else if (strcasecmp("df_recordFrameRate", key) == 0)
else if (strcasecmp("recordFrameRate", key) == 0)
{
s_gameSettings.df_recordFrameRate = parseInt(value);
}
else if (strcasecmp("df_playbackFrameRate", key) == 0)
else if (strcasecmp("playbackFrameRate", key) == 0)
{
s_gameSettings.df_playbackFrameRate = parseInt(value);
}
else if (strcasecmp("df_enableRecording", key) == 0)
else if (strcasecmp("enableRecording", key) == 0)
{
s_gameSettings.df_enableRecording = parseBool(value);
}
else if (strcasecmp("df_enableRecordingAll", key) == 0)
else if (strcasecmp("enableRecordingAll", key) == 0)
{
s_gameSettings.df_enableRecordingAll = parseBool(value);
}
else if (strcasecmp("df_demologging", key) == 0)
else if (strcasecmp("demologging", key) == 0)
{
s_gameSettings.df_demologging = parseBool(value);
}
else if (strcasecmp("df_autoNextMission", key) == 0)
else if (strcasecmp("autoNextMission", key) == 0)
{
s_gameSettings.df_autoEndMission = parseBool(value);
}
else if (strcasecmp("df_showKeyUsed", key) == 0)
else if (strcasecmp("showKeyUsed", key) == 0)
{
s_gameSettings.df_showKeyUsed = parseBool(value);
}
else if (strcasecmp("showKeyColors", key) == 0)
{
s_gameSettings.df_showKeyColors = parseBool(value);
}
else if (strcasecmp("centerHudPos", key) == 0)
{
s_gameSettings.df_centerHudPosition = parseBool(value);
}
else if (strcasecmp("df_showKeyColors", key) == 0)
{
Expand Down
6 changes: 4 additions & 2 deletions TheForceEngine/TFE_Settings/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,9 @@ struct TFE_Settings_Game
bool df_smoothVUEs = false; // Smooths VUE animations (e.g. the Moldy Crow entering and exiting levels)
bool df_disableFightMusic = false; // Set to true to disable fight music and music transitions during gameplay.
bool df_enableAutoaim = true; // Set to true to enable autoaim, false to disable.
bool df_showSecretFoundMsg = true; // Show a message when the player finds a secret.
bool df_showSecretFoundMsg = false; // Show a message when the player finds a secret.
bool df_showSecretCount = true; // Show secret counts instead of percentage.
bool df_centerHudPosition = false; // Center LADATA position instead of top-right (Default).
bool df_autorun = false; // Run by default instead of walk.
bool df_crouchToggle = false; // Use toggle instead of hold for crouch.
bool df_ignoreInfLimit = true; // Ignore the vanilla INF limit.
Expand All @@ -229,7 +231,7 @@ struct TFE_Settings_Game
bool df_showReplayCounter = false; // Show the replay counter on the HUD.
bool df_demologging = false; // Log the record/playback logging
bool df_autoEndMission = false; // Automatically skip to the next mission
bool df_showKeyColors = false; // Shows the door key color on the minimap
bool df_showKeyColors = false; // Shows the door key color on the minimap
bool df_showMapSecrets = true; // Show secrets on the automap.
bool df_showMapObjects = true; // Show objects on the automap.
s32 df_recordFrameRate = 4; // Recording Framerate value
Expand Down