Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
18421a5
Initial POC commit of replay code
Karjala22 Nov 26, 2024
9ba869b
Added more debug logs and update tick recording
Karjala22 Dec 2, 2024
5d4f089
Working version of replays.
Karjala22 Dec 5, 2024
f9b9a33
Working version of demo replays. Still rare issues with long term rep…
Karjala22 Dec 7, 2024
c647178
Add replay POC
Karjala22 Feb 20, 2025
f705b90
Temp muting logging for events
Karjala22 Feb 20, 2025
e425b75
updating projet files
Karjala22 Feb 20, 2025
e47d5d1
Updating Cmakelist
Karjala22 Feb 23, 2025
c6cd639
updating project and merging some files
Karjala22 Feb 23, 2025
83728b3
Ignoring modcache
Karjala22 Feb 23, 2025
fef63e9
Merge of 1.15 code
Karjala22 Feb 26, 2025
83b0bba
More logging cleanup and simplifying code.
Karjala22 Feb 26, 2025
bde3e4f
More merging of the 1.15 code.
Karjala22 Feb 26, 2025
e8638e7
Additional Merging
Karjala22 Feb 26, 2025
52360e6
updating ui and filters
Karjala22 Feb 26, 2025
5759a7c
ensuring version is 141 instead of 143
Karjala22 Feb 26, 2025
a4af801
Merge branch 'master' into replays
ifeldshteyn Feb 26, 2025
7a3c270
Removing sdl import
Karjala22 Feb 26, 2025
3dd429a
Merge branch 'replays' of https://github.com/ifeldshteyn/TheForceEngi…
Karjala22 Feb 26, 2025
bbcf767
Removed unused dependencies
Karjala22 Feb 26, 2025
c43f888
Removing unreachable code
Karjala22 Feb 26, 2025
5832e6d
Removing inused includes
Karjala22 Feb 26, 2025
62ce1ac
Updating strcpy call
Karjala22 Feb 26, 2025
d02c738
Don't open folder in linux
Karjala22 Feb 26, 2025
01a0ba0
Remove stale replay logging
Karjala22 Feb 26, 2025
cc3af63
Fix up pathing for linux
Karjala22 Feb 26, 2025
8ebfd45
Updating UI to support linux and change the mod checking behavior for…
Karjala22 Feb 26, 2025
1068024
Change functinoality of mod checker.
Karjala22 Feb 26, 2025
8589ab6
temp debug logging
Karjala22 Feb 26, 2025
dd96465
Rewriting log
Karjala22 Feb 27, 2025
c0d9f68
Fix for linux paths and sorting
Karjala22 Feb 27, 2025
f82ef82
Clean up some empty space - make it look nicer on linux.
Karjala22 Feb 27, 2025
2c2b8e2
Updating version - removing eye requirement in the events - adding re…
Karjala22 Feb 28, 2025
845f893
Add logging toggle for replays
Karjala22 Feb 28, 2025
f885f53
update linux offsets
Karjala22 Feb 28, 2025
5b40dd2
Change playback counter
Karjala22 Feb 28, 2025
c53709e
Adding append more for filestreaming.
Karjala22 Feb 28, 2025
0da2621
fix log
Karjala22 Feb 28, 2025
511e44e
never skip priority by default
Karjala22 Mar 3, 2025
63c1166
Adding an option to run a replay via commandline. Also add parameter …
Karjala22 Mar 7, 2025
674ab36
adding param to auto exit.
Karjala22 Mar 7, 2025
7ffed3a
Adding latest editor changes from master.
Karjala22 Mar 7, 2025
d225050
Merge of 1.15 code
Karjala22 Mar 8, 2025
d530d12
Minor cleanup
Karjala22 Mar 8, 2025
626fe4a
Removing spurious log messages
Karjala22 Mar 8, 2025
60cb5e3
Adding replay test mechanism
Karjala22 Mar 10, 2025
de69d8e
Ignore any replays
Karjala22 Mar 10, 2025
f967481
fixing tests workflow
Karjala22 Mar 10, 2025
36e00f0
Fix path
Karjala22 Mar 10, 2025
a3ac19e
more debug
Karjala22 Mar 10, 2025
3918af2
more workflow testing
Karjala22 Mar 10, 2025
a985321
More workflow debugging
Karjala22 Mar 10, 2025
ea75130
More testing
Karjala22 Mar 10, 2025
54df93d
workflow fix
Karjala22 Mar 10, 2025
cc3832b
more bug fixing
Karjala22 Mar 10, 2025
8a98030
more workflow testing
Karjala22 Mar 10, 2025
f86f99d
more workflow test
Karjala22 Mar 10, 2025
11f692a
add cmake Tests folder
Karjala22 Mar 10, 2025
ebd2126
testing
Karjala22 Mar 10, 2025
7d7408b
updating
Karjala22 Mar 10, 2025
d408ada
more tests
Karjala22 Mar 10, 2025
83ac59a
top fix
Karjala22 Mar 10, 2025
d7af3dd
test
Karjala22 Mar 10, 2025
c090e8b
log is ignored - changing to txt
Karjala22 Mar 10, 2025
91f9b34
Disable tests through actions.
Karjala22 Mar 10, 2025
24704d7
Remove mousebot and turret number checking
Karjala22 Mar 10, 2025
fc68b8a
Added testing
Karjala22 Mar 11, 2025
2901d0e
testing workflow
Karjala22 Mar 11, 2025
5391e99
fix spacing
Karjala22 Mar 11, 2025
483bbd3
check for dump
Karjala22 Mar 11, 2025
8a01a3e
workflow testing
Karjala22 Mar 11, 2025
7b187ef
allow dispatch
Karjala22 Mar 11, 2025
d16bb82
listing dump
Karjala22 Mar 11, 2025
6c401d5
updating dump
Karjala22 Mar 11, 2025
9dfc93d
don't fail build no matter what
Karjala22 Mar 11, 2025
2ad3fee
remove commented out copy
Karjala22 Mar 11, 2025
8288b05
adding ldd
Karjala22 Mar 11, 2025
b7f3f15
try to find dump
Karjala22 Mar 11, 2025
bf659b0
add stdout / error
Karjala22 Mar 11, 2025
073ac04
more tests
Karjala22 Mar 11, 2025
18dd117
runtest test
Karjala22 Mar 11, 2025
5c21217
more test
Karjala22 Mar 11, 2025
db6f608
find log
Karjala22 Mar 11, 2025
196e56e
software
Karjala22 Mar 11, 2025
1347979
Just testing simple main call
Karjala22 Mar 11, 2025
1fc0bb9
add log redirect
Karjala22 Mar 11, 2025
78529e1
adding iostream
Karjala22 Mar 11, 2025
a169e3d
attach console does not exist in nix
Karjala22 Mar 11, 2025
e1e62e2
test on linux
Karjala22 Mar 11, 2025
83af483
test different path
Karjala22 Mar 11, 2025
2c02183
print log file
Karjala22 Mar 11, 2025
0a9cf65
new file name
Karjala22 Mar 11, 2025
1e07b79
print result log
Karjala22 Mar 11, 2025
35497fb
more logs
Karjala22 Mar 11, 2025
3e7b24a
more testing
Karjala22 Mar 11, 2025
4bb9c3c
pathset
Karjala22 Mar 11, 2025
8b5f83c
more logging
Karjala22 Mar 11, 2025
e50b1d9
update posix
Karjala22 Mar 11, 2025
836f117
fix for ofstream
Karjala22 Mar 11, 2025
8bc03a4
testing perms
Karjala22 Mar 11, 2025
5102a47
typo fix
Karjala22 Mar 11, 2025
955af7d
fix stream
Karjala22 Mar 11, 2025
3d4d957
add dependency
Karjala22 Mar 11, 2025
93f5b34
mkdir
Karjala22 Mar 11, 2025
95dc877
expanding logging
Karjala22 Mar 11, 2025
a017253
looks like it actually laods now
Karjala22 Mar 11, 2025
57d286d
uncommenting previous dependencies
Karjala22 Mar 11, 2025
796bfd7
always upload artifact and add timeout
Karjala22 Mar 11, 2025
6d3871e
upload change
Karjala22 Mar 11, 2025
59342be
typo fix
Karjala22 Mar 11, 2025
7220bd4
run new demo
Karjala22 Mar 11, 2025
5d67b10
run in software
Karjala22 Mar 11, 2025
5e5979a
fix always
Karjala22 Mar 11, 2025
ac0f31c
fixed always
Karjala22 Mar 11, 2025
20faf12
add dependency
Karjala22 Mar 11, 2025
1b2bae3
try to run on failure
Karjala22 Mar 11, 2025
9e9d50b
trying to always run
Karjala22 Mar 11, 2025
a2dfb3d
try again
Karjala22 Mar 11, 2025
3ff16c5
update version
Karjala22 Mar 11, 2025
b3db87d
rename demo
Karjala22 Mar 11, 2025
2b12987
don't close logs
Karjala22 Mar 11, 2025
a2194e9
more logging and send replay.log
Karjala22 Mar 12, 2025
24e93b9
update nosound
Karjala22 Mar 12, 2025
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
44 changes: 35 additions & 9 deletions .github/workflows/ubuntu-gcc.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml
name: Linux/x64 Test-Build master branch

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest

steps:
Expand All @@ -27,10 +22,41 @@ jobs:
sudo apt-get install -y libsdl2-dev libsdl2-image-dev

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_FORCE_SCRIPT=ON -DENABLE_EDITOR=ON

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Tests
timeout-minutes: 1
run: |
ulimit -c unlimited
mkdir -p /home/runner/work/TheForceEngine/TheForceEngine/logs/.local/share/TheForceEngine/
chmod -R 755 ${{github.workspace}}
chmod +x ${{github.workspace}}/TheForceEngine/Tests/runTests.sh
cp ${{github.workspace}}/build/theforceengine ${{github.workspace}}/TheForceEngine/
cp ${{github.workspace}}/build/theforceengine ${{github.workspace}}/
cp ${{github.workspace}}/build/theforceengine ${{github.workspace}}/build/TheForceEngine/
${{github.workspace}}/TheForceEngine/Tests/runTests.sh ${{github.workspace}}

- name: Upload Logs on Failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: tfe_log2
path: |
/home/runner/work/TheForceEngine/TheForceEngine/logs/.local/share/TheForceEngine/the_force_engine_log.txt
/home/runner/work/TheForceEngine/TheForceEngine/logs/.local/share/TheForceEngine/replay.log

update:
needs: build
runs-on: ubuntu-latest
steps:
- name: Always Upload Logs
if: always()
uses: actions/upload-artifact@v4
with:
name: tfe_log
path: |
/home/runner/work/TheForceEngine/TheForceEngine/logs/.local/share/TheForceEngine/the_force_engine_log.txt
/home/runner/work/TheForceEngine/TheForceEngine/logs/.local/share/TheForceEngine/replay.log
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@
.vs/
Internal/
TheForceEngine/Games/
TheForceEngine/ModCache/
TheForceEngine/Mods/
TheForceEngine/screenshots/
TheForceEngine/Reference/
TheForceEngine/Replays/
TheForceEngine/LawMaker/
TheForceEngine/Backup/
TheForceEngine/Exports/
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ if(ENABLE_TFE)
execute_process(COMMAND ln -sf ${CMAKE_SOURCE_DIR}/TheForceEngine/UI_Images)
execute_process(COMMAND ln -sf ${CMAKE_SOURCE_DIR}/TheForceEngine/UI_Text)
execute_process(COMMAND ln -sf ${CMAKE_SOURCE_DIR}/TheForceEngine/EditorDef)
execute_process(COMMAND ln -sf ${CMAKE_SOURCE_DIR}/TheForceEngine/Tests)
include(CreateGitVersionH.cmake)
create_git_version_h()
endif()
Expand Down Expand Up @@ -137,6 +138,7 @@ if(ENABLE_TFE)
"${CMAKE_CURRENT_SOURCE_DIR}/TheForceEngine/Shaders"
"${CMAKE_CURRENT_SOURCE_DIR}/TheForceEngine/SoundFonts"
"${CMAKE_CURRENT_SOURCE_DIR}/TheForceEngine/Fonts"
"${CMAKE_CURRENT_SOURCE_DIR}/TheForceEngine/Tests"
DESTINATION "${CMAKE_INSTALL_DATADIR}"
FILE_PERMISSIONS
OWNER_READ OWNER_WRITE
Expand Down
9 changes: 7 additions & 2 deletions TheForceEngine.sln
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.705
# Visual Studio Version 17
VisualStudioVersion = 17.11.35303.130
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TheForceEngine", "TheForceEngine\TheForceEngine.vcxproj", "{31CD2991-9EF0-4AA9-AEEB-BA1194D2DAB4}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{37B1C899-6E4C-4173-8745-CD8C17293198}"
ProjectSection(SolutionItems) = preProject
testReplay.cpp = testReplay.cpp
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
BuildForRelease|x64 = BuildForRelease|x64
Expand Down
2 changes: 2 additions & 0 deletions TheForceEngine/TFE_DarkForces/Actor/actorSerialization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ namespace TFE_DarkForces

void actorDispatch_serialize(Logic*& logic, SecObject* obj, Stream* stream)
{

ActorDispatch* dispatch = nullptr;
if (serialization_getMode() == SMODE_WRITE)
{
Expand Down Expand Up @@ -140,6 +141,7 @@ namespace TFE_DarkForces
// This will be filled in a fixup pass if needed.
dispatch->freeTask = nullptr;
}

}

void actor_serializeObject(Stream* stream, SecObject*& obj)
Expand Down
6 changes: 3 additions & 3 deletions TheForceEngine/TFE_DarkForces/Actor/mousebot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ namespace TFE_DarkForces
local(tick) = s_curTick;
}
else
{
{
Tick dt = s_curTick - local(tick);
// If enough time has past since the player was last spotted, go back to sleep.
if (dt > 728) // ~5 seconds.
Expand All @@ -164,8 +164,8 @@ namespace TFE_DarkForces
{
local(odd) = (s_curTick & 1) ? JTRUE : JFALSE;
angle14_32 deltaYaw = random(16338);
local(moveMod)->target.yaw = local(odd) ? (local(obj)->yaw + deltaYaw) : (local(obj)->yaw - deltaYaw);

local(moveMod)->target.yaw = local(odd) ? (local(obj)->yaw + deltaYaw) : (local(obj)->yaw - deltaYaw);
local(moveMod)->target.speedRotation = random(0x3555) + 0x555;
local(moveMod)->target.flags |= TARGET_MOVE_ROT;
local(flip) = JFALSE;
Expand Down
29 changes: 29 additions & 0 deletions TheForceEngine/TFE_DarkForces/GameUI/agentMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,35 @@ namespace TFE_DarkForces
menu_blitToScreen(s_framebuffer);
}

void agentMenu_setAgentName(const char* name)
{
if (s_agentId < 0 || s_agentId >= MAX_AGENT_COUNT)
{
return;
}
strncpy(s_agentData[s_agentId].name, name, 32);
}

s32 agentMenu_getAgentID()
{
return s_agentId;
}

void agentMenu_setAgentId(s32 id)
{
s_agentId = id;
}

void agentMenu_setAgentCount(s32 count)
{
s_agentCount = count;
}

s32 agentMenu_getAgentCount()
{
return s_agentCount;
}

void agentMenu_createNewAgent()
{
if (s_agentCount < MAX_AGENT_COUNT)
Expand Down
7 changes: 7 additions & 0 deletions TheForceEngine/TFE_DarkForces/GameUI/agentMenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,12 @@ namespace TFE_DarkForces
void agentMenu_load(LangHotkeys* hotkeys);

// Reset Presistent State.

s32 agentMenu_getAgentID();
void agentMenu_setAgentId(s32 id);
void agentMenu_setAgentCount(s32 count);
s32 agentMenu_getAgentCount();
void agentMenu_createNewAgent();
void agentMenu_setAgentName(const char* name);
void agentMenu_resetState();
}
28 changes: 22 additions & 6 deletions TheForceEngine/TFE_DarkForces/GameUI/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <TFE_System/system.h>
#include <TFE_Jedi/Renderer/virtualFramebuffer.h>
#include <TFE_Jedi/Renderer/screenDraw.h>
#include <TFE_Input/replay.h>

using namespace TFE_Jedi;

Expand Down Expand Up @@ -62,16 +63,31 @@ namespace TFE_DarkForces
s32 mx, my;
TFE_Input::getMousePos(&mx, &my);
s_cursorPosAccum = { 12*mx/10, my }; // Account for 320x200 in 4:3 scaling.

if (displayInfo.width >= displayInfo.height)

// Load the replay PDA positions.
if (TFE_Input::isDemoPlayback())
{
s_cursorPos.x = clamp(s_cursorPosAccum.x * (s32)height / (s32)displayInfo.height, 0, (s32)width - 3);
s_cursorPos.z = clamp(s_cursorPosAccum.z * (s32)height / (s32)displayInfo.height, 0, (s32)height - 3);
Vec2i pdap = TFE_Input::getPDAPosition();
s_cursorPos = pdap;
}
else
{
s_cursorPos.x = clamp(s_cursorPosAccum.x * (s32)width / (s32)displayInfo.width, 0, (s32)width - 3);
s_cursorPos.z = clamp(s_cursorPosAccum.z * (s32)width / (s32)displayInfo.width, 0, (s32)height - 3);
if (displayInfo.width >= displayInfo.height)
{
s_cursorPos.x = clamp(s_cursorPosAccum.x * (s32)height / (s32)displayInfo.height, 0, (s32)width - 3);
s_cursorPos.z = clamp(s_cursorPosAccum.z * (s32)height / (s32)displayInfo.height, 0, (s32)height - 3);
}
else
{
s_cursorPos.x = clamp(s_cursorPosAccum.x * (s32)width / (s32)displayInfo.width, 0, (s32)width - 3);
s_cursorPos.z = clamp(s_cursorPosAccum.z * (s32)width / (s32)displayInfo.width, 0, (s32)height - 3);
}
}

// Store the PDA positions for replay.
if (TFE_Input::isRecording())
{
TFE_Input::storePDAPosition(s_cursorPos);
}
}

Expand Down
Loading
Loading