Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wolf3d
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
wolf3d
Commits
349df00f
Commit
349df00f
authored
Apr 19, 2000
by
Steven Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More cleanups
parent
fc651432
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
88 additions
and
363 deletions
+88
-363
Makefile
src/Makefile
+3
-3
id_ca.c
src/id_ca.c
+43
-337
id_ca.h
src/id_ca.h
+9
-21
id_heads.h
src/id_heads.h
+4
-0
id_sd.h
src/id_sd.h
+2
-2
misc.c
src/misc.c
+19
-0
misc.h
src/misc.h
+8
-0
No files found.
src/Makefile
View file @
349df00f
...
@@ -4,9 +4,9 @@ CFLAGS = -g -DUSEVGA
...
@@ -4,9 +4,9 @@ CFLAGS = -g -DUSEVGA
#CFLAGS = -g -Wall -DUSEVGA -DDEBUG
#CFLAGS = -g -Wall -DUSEVGA -DDEBUG
#CFLAGS = -g -DUSEVGA -DDEBUG
#CFLAGS = -g -DUSEVGA -DDEBUG
#CFLAGS = -g -pg -DDEBUG
#CFLAGS = -g -pg -DDEBUG
OBJS
=
objs.o
id_ca.o id_in.o id_sd.o id_vl.o id_vh.o wl_scale.o wl_draw
.o
\
OBJS
=
objs.o
misc.o id_ca.o id_in.o id_sd.o id_vl.o id_vh.o wl_scale
.o
\
wl_
act1.o wl_act2.o wl_agent.o wl_game.o wl_inter.o wl_menu
.o
\
wl_
draw.o wl_act1.o wl_act2.o wl_agent.o wl_game.o wl_inter
.o
\
wl_play.o wl_state.o wl_main.o wl_debug.o
wl_
menu.o wl_
play.o wl_state.o wl_main.o wl_debug.o
#LFLAGS = -lm -lvga -pg
#LFLAGS = -lm -lvga -pg
LFLAGS
=
-lm
-lvga
LFLAGS
=
-lm
-lvga
...
...
src/id_ca.c
View file @
349df00f
This diff is collapsed.
Click to expand it.
src/id_ca.h
View file @
349df00f
...
@@ -167,12 +167,6 @@ void MM_BombOnError (boolean bomb);
...
@@ -167,12 +167,6 @@ void MM_BombOnError (boolean bomb);
void
MML_UseSpace
(
unsigned
segstart
,
unsigned
seglength
);
void
MML_UseSpace
(
unsigned
segstart
,
unsigned
seglength
);
//
// ID_PM.H
// Header file for Id Engine's Page Manager
//
// NOTE! PMPageSize must be an even divisor of EMSPageSize, and >= 1024
#define EMSPageSize 16384
#define EMSPageSize 16384
#define EMSPageSizeSeg (EMSPageSize >> 4)
#define EMSPageSizeSeg (EMSPageSize >> 4)
#define EMSPageSizeKB (EMSPageSize >> 10)
#define EMSPageSizeKB (EMSPageSize >> 10)
...
@@ -201,19 +195,13 @@ typedef enum
...
@@ -201,19 +195,13 @@ typedef enum
pmba_Allocated
=
2
pmba_Allocated
=
2
}
PMBlockAttr
;
}
PMBlockAttr
;
typedef
struct
typedef
struct
{
{
longword
offset
;
// Offset of chunk into file
longword
offset
;
// Offset of chunk into file
word
length
;
// Length of the chunk
word
length
;
// Length of the chunk
PMLockType
locked
;
// If set, this page can't be purged
memptr
addr
;
int
xmsPage
;
// If in XMS, (xmsPage * PMPageSize) gives offset into XMS handle
longword
lastHit
;
// Last frame number of hit
}
PageListStruct
;
PMLockType
locked
;
// If set, this page can't be purged
int
emsPage
;
// If in EMS, logical page/offset into page
int
mainPage
;
// If in Main, index into handle array
longword
lastHit
;
// Last frame number of hit
}
PageListStruct
;
typedef
struct
typedef
struct
{
{
...
@@ -238,7 +226,7 @@ extern PageListStruct *PMPages;
...
@@ -238,7 +226,7 @@ extern PageListStruct *PMPages;
extern
char
PageFileName
[
13
];
extern
char
PageFileName
[
13
];
extern
void
PM_Startup
(
void
),
void
PM_Startup
(
void
),
PM_Shutdown
(
void
),
PM_Shutdown
(
void
),
PM_Reset
(
void
),
PM_Reset
(
void
),
PM_Preload
(
boolean
(
*
update
)(
word
current
,
word
total
)),
PM_Preload
(
boolean
(
*
update
)(
word
current
,
word
total
)),
...
@@ -246,7 +234,7 @@ extern void PM_Startup(void),
...
@@ -246,7 +234,7 @@ extern void PM_Startup(void),
PM_SetPageLock
(
int
pagenum
,
PMLockType
lock
),
PM_SetPageLock
(
int
pagenum
,
PMLockType
lock
),
PM_SetMainPurge
(
int
level
),
PM_SetMainPurge
(
int
level
),
PM_CheckMainMem
(
void
);
PM_CheckMainMem
(
void
);
extern
memptr
PM_GetPageAddress
(
int
pagenum
),
memptr
PM_GetPageAddress
(
int
pagenum
),
PM_GetPage
(
int
pagenum
);
// Use this one to cache page
PM_GetPage
(
int
pagenum
);
// Use this one to cache page
void
PM_SetMainMemPurge
(
int
level
);
void
PM_SetMainMemPurge
(
int
level
);
src/id_heads.h
View file @
349df00f
#ifndef __ID_HEADS_H__
#ifndef __ID_HEADS_H__
#define __ID_HEADS_H__
#define __ID_HEADS_H__
#include <unistd.h>
#include <ctype.h>
#include <ctype.h>
#include <errno.h>
#include <errno.h>
#include <fcntl.h>
#include <fcntl.h>
...
@@ -9,6 +10,9 @@
...
@@ -9,6 +10,9 @@
#include <string.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/stat.h>
#include <values.h>
#include <values.h>
#include <sys/types.h>
#include "misc.h"
#include "version.h"
#include "version.h"
...
...
src/id_sd.h
View file @
349df00f
...
@@ -14,10 +14,10 @@ void alOut(byte n,byte b);
...
@@ -14,10 +14,10 @@ void alOut(byte n,byte b);
typedef
enum
{
typedef
enum
{
sdm_Off
,
sdm_Off
,
sdm_PC
,
sdm_AdLib
,
sdm_PC
,
sdm_AdLib
}
SDMode
;
}
SDMode
;
typedef
enum
{
typedef
enum
{
smm_Off
,
smm_AdLib
smm_Off
,
smm_AdLib
}
SMMode
;
}
SMMode
;
typedef
enum
{
typedef
enum
{
sds_Off
,
sds_PC
,
sds_SoundSource
,
sds_SoundBlaster
sds_Off
,
sds_PC
,
sds_SoundSource
,
sds_SoundBlaster
...
...
src/misc.c
0 → 100644
View file @
349df00f
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include "misc.h"
long
filelength
(
int
handle
)
{
struct
stat
buf
;
if
(
fstat
(
handle
,
&
buf
)
==
-
1
)
{
perror
(
"filelength"
);
exit
(
EXIT_FAILURE
);
}
return
buf
.
st_size
;
}
src/misc.h
0 → 100644
View file @
349df00f
#ifndef __MISC_H__
#define __MISC_H__
long
filelength
(
int
handle
);
#elif
#error "fix me TODO"
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment