mirror of
https://github.com/jndean/IPUDOOM.git
synced 2026-03-22 07:29:46 +00:00
Load mapped walls from savefiles, add livewallupdates cmdline flag
This commit is contained in:
10
src/d_main.c
10
src/d_main.c
@@ -115,6 +115,9 @@ boolean storedemo;
|
||||
// If true, the main game loop has started.
|
||||
boolean main_loop_started = false;
|
||||
|
||||
// Josef: CPU traces walls while IPU does automap
|
||||
boolean livewallupdates = false;
|
||||
|
||||
char wadfile[1024]; // primary wad file
|
||||
char mapdir[1024]; // directory of development maps
|
||||
|
||||
@@ -232,7 +235,8 @@ void D_Display(void) {
|
||||
I_UpdateNoBlit();
|
||||
|
||||
// draw the view directly
|
||||
if (gamestate == GS_LEVEL && /* JOSEF !automapactive && */ gametic)
|
||||
int busy_with_automap = automapactive && !livewallupdates; // JOSEF
|
||||
if (gamestate == GS_LEVEL && !busy_with_automap && gametic)
|
||||
R_RenderPlayerView(&players[displayplayer]);
|
||||
|
||||
IPU_AM_Drawer(); // JOSEF: After RenderplayerView for wall updates
|
||||
@@ -827,6 +831,10 @@ void D_DoomMain(void) {
|
||||
printf("Z_Init: Init zone memory allocation daemon. \n");
|
||||
Z_Init();
|
||||
|
||||
// JOSEF: flag to enable CPU wall mapping while in automap
|
||||
if (M_CheckParm("-livewallupdates"))
|
||||
livewallupdates = true;
|
||||
|
||||
//!
|
||||
// @category net
|
||||
//
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
#include "z_zone.h"
|
||||
|
||||
#include "ipu_host.h"
|
||||
#include "ipu_transfer.h"
|
||||
|
||||
|
||||
#define SAVEGAMESIZE 0x2c000
|
||||
@@ -1357,6 +1358,8 @@ void G_DoLoadGame(void) {
|
||||
P_UnArchiveThinkers();
|
||||
P_UnArchiveSpecials();
|
||||
|
||||
IPU_CheckAlreadyMappedLines();
|
||||
|
||||
if (!P_ReadSaveGameEOF())
|
||||
I_Error("Bad savegame");
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include "ipu/ipu_interface.h"
|
||||
|
||||
|
||||
void IPU_G_LoadLevel_PackMiscValues(void* buf) {
|
||||
assert(sizeof(G_LoadLevel_MiscValues_t) <= IPUMISCVALUESSIZE);
|
||||
|
||||
@@ -35,7 +36,7 @@ void IPU_G_LoadLevel_PackMiscValues(void* buf) {
|
||||
}
|
||||
|
||||
|
||||
#define MAX_BUFFERED_MAPPED_LINES 50
|
||||
#define MAX_BUFFERED_MAPPED_LINES 1000
|
||||
static int mapped_line_buf[MAX_BUFFERED_MAPPED_LINES];
|
||||
static int mapped_line_count = 0;
|
||||
|
||||
@@ -47,6 +48,14 @@ void IPU_NotifyLineMapped(line_t *line) {
|
||||
}
|
||||
}
|
||||
|
||||
void IPU_CheckAlreadyMappedLines(void) {
|
||||
for (int i = 0; i < numlines; ++i) {
|
||||
if (lines[i].flags & ML_MAPPED) {
|
||||
IPU_NotifyLineMapped(&lines[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void IPU_G_Ticker_PackMiscValues(void* buf) {
|
||||
assert(sizeof(G_Ticker_MiscValues_t) <= IPUMISCVALUESSIZE);
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ void IPU_G_Responder_PackMiscValues(void* src_buf, void* dst_buf);
|
||||
void IPU_LoadLumpForTransfer(int lumpnum, byte* buf);
|
||||
void IPU_Setup_PackMarkNums(void* buf);
|
||||
void IPU_NotifyLineMapped(line_t *line);
|
||||
void IPU_CheckAlreadyMappedLines(void);
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user