Skip to content

Commit

Permalink
Fix desync on gothicdm demo1
Browse files Browse the repository at this point in the history
Add demo state dump support

Remove support for SMP rendering (following the lead of Pr+)

Use fixed-width types instead of the (u)int_64_t types (mostly)

MULTINET also has to mean (!netdemo); fixed
  • Loading branch information
camgunz committed Apr 17, 2016
1 parent 869aced commit 00f2fe2
Show file tree
Hide file tree
Showing 25 changed files with 1,359 additions and 137 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,7 @@ SET(D2K_SOURCES
${CMAKE_SOURCE_DIR}/src/d_cfg.c
${CMAKE_SOURCE_DIR}/src/d_deh.c
${CMAKE_SOURCE_DIR}/src/d_items.c
${CMAKE_SOURCE_DIR}/src/d_dump.c
${CMAKE_SOURCE_DIR}/src/d_main.c
${CMAKE_SOURCE_DIR}/src/d_msg.c
${CMAKE_SOURCE_DIR}/src/doomdef.c
Expand Down
12 changes: 12 additions & 0 deletions dumpdemo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

CMD="cbuild/d2k -iwad doom2.wad -file gothicdm.wad -nomouse -playdemo DEMO1 -dumpdemo d2kdump.bin"

./build.sh || exit 1
#$CMD
# gdb --args $CMD
# gdb -ex run --args $CMD
gdb -ex "source gdbdemo.txt" --args $CMD

mv d2kdump.bin ../democomp/d2kdump.bin

2 changes: 2 additions & 0 deletions gdbclient.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
break w_wad.c:371
run
10 changes: 10 additions & 0 deletions gdbdemo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
set logging on
set logging file gdb.log
set logging overwrite on
set logging redirect on
watch rng.prndindex
commands
bt
continue
end
run
6 changes: 4 additions & 2 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ CMD="${BASE_DIR}/cbuild/d2k -skill 5 -warp 1 -nomonsters -nomouse"
CMD="${BASE_DIR}/cbuild/d2k -iwad doom2.wad -playdemo DEMO3 -nomouse"
CMD="${BASE_DIR}/cbuild/d2k -iwad doom2.wad -file dwango5.wad -skill 5 -warp 1 -nomonsters -nomouse -deathmatch -frags 50 -timer 10"
CMD="${BASE_DIR}/cbuild/d2k -iwad freedm.wad -skill 5 -warp 1 -nomonsters -nomouse -deathmatch -frags 50 -timer 10"
CMD="${BASE_DIR}/cbuild/d2k -iwad doom2.wad -file gothicdm.wad -playdemo DEMO1 -dumpdemo d2kdump.bin"

mkdir -p ~/.d2k/scripts
mkdir -p ~/.d2k/fonts
Expand All @@ -15,9 +16,10 @@ cp "${BASE_DIR}/scripts/"* ~/.d2k/scripts/
cp "${BASE_DIR}/fonts/"* ~/.d2k/fonts/

# gdb -ex 'source gdbserver.txt' --args $CMD
gdb -ex run --args $CMD
# gdb -ex run --args $CMD
# gdb -ex "source gdbdemo.txt" --args $CMD
# gdb --args $CMD
# CPUPROFILE=cpu.prof $CMD
# valgrind --leak-check=full --show-leak-kinds=all $CMD
# $CMD
$CMD

5 changes: 0 additions & 5 deletions src/SDL/i_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
#include "i_joy.h"
#include "i_main.h"
#include "i_mouse.h"
#include "i_smp.h"
#include "i_video.h"
#include "m_argv.h"
#include "p_user.h"
Expand Down Expand Up @@ -749,8 +748,6 @@ void I_UpdateVideoMode(void) {
vid_8ingl.surface = NULL;
}
#endif

SMP_Free();
}

// e6y: initialisation of screen_multiply
Expand Down Expand Up @@ -885,8 +882,6 @@ void I_UpdateVideoMode(void) {
);
}

SMP_Init();

#ifdef GL_DOOM
if (V_GetMode() == VID_MODEGL) {
#if SDL_VERSION_ATLEAST(1, 3, 0)
Expand Down
Loading

0 comments on commit 00f2fe2

Please sign in to comment.