Skip to content

Commit 9d5c714

Browse files
committed
moving more and more into shared memory
1 parent 350da33 commit 9d5c714

File tree

22 files changed

+215
-149
lines changed

22 files changed

+215
-149
lines changed

components/doom/prboom/f_wipe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static screeninfo_t wipe_scr_start;
5959
static screeninfo_t wipe_scr_end;
6060
static screeninfo_t wipe_scr;
6161

62-
static int y_lookup[MAX_SCREENWIDTH];
62+
int *y_lookup = NULL; // [MAX_SCREENWIDTH];
6363

6464

6565
static int wipe_initMelt(int ticks)

components/doom/prboom/g_game.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2876,15 +2876,14 @@ boolean G_CheckDemoStatus (void)
28762876
// killough 3/6/98: Made limit static to allow z_zone functions to call
28772877
// this function, without calling realloc(), which seems to cause problems.
28782878

2879-
#define MAX_MESSAGE_SIZE 1024
2879+
char *doom_player_msg = NULL; // [MAX_MESSAGE_SIZE];
28802880

28812881
// CPhipps - renamed to doom_printf to avoid name collision with glibc
28822882
void doom_printf(const char *s, ...)
28832883
{
2884-
static char msg[MAX_MESSAGE_SIZE];
28852884
va_list v;
28862885
va_start(v,s);
2887-
vsnprintf(msg,sizeof(msg),s,v); /* print message in buffer */
2886+
vsnprintf(doom_player_msg,MAX_MESSAGE_SIZE,s,v); /* print message in buffer */
28882887
va_end(v);
2889-
players[consoleplayer].message = msg; // set new message
2888+
players[consoleplayer].message = doom_player_msg; // set new message
28902889
}

components/doom/prboom/g_game.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545

4646
#define NUMKEYS 512
4747

48+
#define MAX_MESSAGE_SIZE 1024
49+
4850
boolean G_Responder(event_t *ev);
4951
boolean G_CheckDemoStatus(void);
5052
void G_DeathMatchSpawnPlayer(int playernum);

components/doom/prboom/p_mobj.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,14 @@
5353
// Returns true if the mobj is still present.
5454
//
5555

56+
statenum_t *seenstate_tab; // [NUMSTATES]; // fast transition table
57+
5658
boolean P_SetMobjState(mobj_t* mobj,statenum_t state)
5759
{
5860
state_t* st;
5961

6062
// killough 4/9/98: remember states seen, to detect cycles:
6163

62-
static statenum_t seenstate_tab[NUMSTATES]; // fast transition table
6364
statenum_t *seenstate = seenstate_tab; // pointer to table
6465
static int recursion; // detects recursion
6566
statenum_t i = state; // initial state

components/doom/prboom/r_bsp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void R_ClearDrawSegs(void)
6969
// Instead of clipsegs, let's try using an array with one entry for each column,
7070
// indicating whether it's blocked by a solid wall yet or not.
7171

72-
byte solidcol[MAX_SCREENWIDTH];
72+
byte *solidcol = NULL; // [MAX_SCREENWIDTH];
7373

7474
// CPhipps -
7575
// R_ClipWallSegment

components/doom/prboom/r_bsp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ extern sector_t *backsector;
5050
extern drawseg_t *drawsegs;
5151
extern unsigned maxdrawsegs;
5252

53-
extern byte solidcol[MAX_SCREENWIDTH];
53+
extern byte *solidcol; // [MAX_SCREENWIDTH];
5454

5555
extern drawseg_t *ds_p;
5656

components/doom/prboom/r_draw.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ typedef enum
9090

9191
static int temp_x = 0;
9292
static int tempyl[4], tempyh[4];
93-
static byte byte_tempbuf[MAX_SCREENHEIGHT * 4];
93+
byte *byte_tempbuf = NULL; // [MAX_SCREENHEIGHT * 4];
9494
#ifndef NOTRUECOLOR
95-
static unsigned short short_tempbuf[MAX_SCREENHEIGHT * 4];
96-
static unsigned int int_tempbuf[MAX_SCREENHEIGHT * 4];
95+
unsigned short *short_tempbuf = NULL; // [MAX_SCREENHEIGHT * 4];
96+
unsigned int *int_tempbuf = NULL; // [MAX_SCREENHEIGHT * 4];
9797
#endif
9898
static int startx = 0;
9999
static int temptype = COL_NONE;
@@ -106,7 +106,6 @@ static const byte *tempfuzzmap;
106106
// Spectre/Invisibility.
107107
//
108108

109-
#define FUZZTABLE 50
110109
// proff 08/17/98: Changed for high-res
111110
//#define FUZZOFF (SCREENWIDTH)
112111
#define FUZZOFF 1
@@ -121,7 +120,7 @@ static const int fuzzoffset_org[FUZZTABLE] = {
121120
FUZZOFF,FUZZOFF,-FUZZOFF,FUZZOFF,FUZZOFF,-FUZZOFF,FUZZOFF
122121
};
123122

124-
static int fuzzoffset[FUZZTABLE];
123+
int *fuzzoffset = NULL; // [FUZZTABLE];
125124

126125
static int fuzzpos = 0;
127126

@@ -487,7 +486,7 @@ byte translationtables[3 * 256];
487486
#undef R_DRAWCOLUMN_PIPELINE_BASE
488487
#undef R_DRAWCOLUMN_PIPELINE_TYPE
489488

490-
static R_DrawColumn_f drawcolumnfuncs[VID_MODEMAX][RDRAW_FILTER_MAXFILTERS][RDRAW_FILTER_MAXFILTERS][RDC_PIPELINE_MAXPIPELINES] = {
489+
static const R_DrawColumn_f drawcolumnfuncs[VID_MODEMAX][RDRAW_FILTER_MAXFILTERS][RDRAW_FILTER_MAXFILTERS][RDC_PIPELINE_MAXPIPELINES] = {
491490
{
492491
{
493492
{NULL, NULL, NULL, NULL,},
@@ -877,7 +876,7 @@ void R_InitTranslationTables (void)
877876
#include "r_drawspan.inl"
878877
#endif
879878

880-
static R_DrawSpan_f drawspanfuncs[VID_MODEMAX][RDRAW_FILTER_MAXFILTERS][RDRAW_FILTER_MAXFILTERS] = {
879+
static const R_DrawSpan_f drawspanfuncs[VID_MODEMAX][RDRAW_FILTER_MAXFILTERS][RDRAW_FILTER_MAXFILTERS] = {
881880
{
882881
{
883882
NULL,

components/doom/prboom/r_draw.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
#pragma interface
4141
#endif
4242

43+
#define FUZZTABLE 50
44+
4345
enum column_pipeline_e {
4446
RDC_PIPELINE_STANDARD,
4547
RDC_PIPELINE_TRANSLUCENT,

components/doom/prboom/r_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ int *viewangletox;
9797
// to the lowest viewangle that maps back to x ranges
9898
// from clipangle to -clipangle.
9999

100-
angle_t xtoviewangle[MAX_SCREENWIDTH+1]; // killough 2/8/98
100+
angle_t *xtoviewangle = NULL; // [MAX_SCREENWIDTH+1]; // killough 2/8/98
101101

102102
// killough 3/20/98: Support dynamic colormaps, e.g. deep water
103103
// killough 4/4/98: support dynamic number of them as well

components/doom/prboom/r_state.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ extern angle_t viewangle;
103103
extern player_t *viewplayer;
104104
extern angle_t clipangle;
105105
extern int *viewangletox;
106-
extern angle_t xtoviewangle[MAX_SCREENWIDTH+1]; // killough 2/8/98
106+
extern angle_t *xtoviewangle; // [MAX_SCREENWIDTH+1]; // killough 2/8/98
107107
extern fixed_t rw_distance;
108108
extern angle_t rw_normalangle;
109109

0 commit comments

Comments
 (0)