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
abf4a36f
Commit
abf4a36f
authored
Apr 19, 2000
by
Steven Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More cleanups, id_ca should be good enough for now
parent
349df00f
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
111 additions
and
361 deletions
+111
-361
id_ca.c
src/id_ca.c
+95
-224
id_ca.h
src/id_ca.h
+10
-107
id_vl.h
src/id_vl.h
+2
-0
version.h
src/version.h
+4
-3
wl_draw.c
src/wl_draw.c
+0
-9
wl_main.c
src/wl_main.c
+0
-12
wlfj1ver.h
src/wlfj1ver.h
+0
-3
wolfjver.h
src/wolfjver.h
+0
-3
No files found.
src/id_ca.c
View file @
abf4a36f
This diff is collapsed.
Click to expand it.
src/id_ca.h
View file @
abf4a36f
// ID_CA.H
#ifndef __ID_CA_H__
#define __ID_CA_H__
//===========================================================================
#define NUMMAPS 60
...
...
@@ -14,7 +16,7 @@ typedef struct
word
planelength
[
3
];
word
width
,
height
;
char
name
[
16
];
}
maptype
;
}
PACKED
maptype
;
//===========================================================================
...
...
@@ -31,8 +33,6 @@ extern byte ca_levelbit,ca_levelnum;
extern
char
*
titleptr
[
8
];
extern
int
profilehandle
,
debughandle
;
extern
char
extension
[
5
],
gheadname
[
10
],
gfilename
[
10
],
...
...
@@ -42,7 +42,7 @@ extern char extension[5],
aheadname
[
10
],
afilename
[
10
];
extern
long
*
grstarts
;
// array of offsets in
e
gagraph, -1 for sparse
extern
long
*
grstarts
;
// array of offsets in
v
gagraph, -1 for sparse
extern
long
*
audiostarts
;
// array of offsets in audio / audiot
//===========================================================================
...
...
@@ -80,76 +80,12 @@ void CA_CacheMarks (void);
void
CA_CacheScreen
(
int
chunk
);
#define SAVENEARHEAP 0x400 // space to leave in data segment
#define SAVEFARHEAP 0 // space to leave in far heap
#define BUFFERSIZE 0x1000 // miscelanious, allways available buffer
#define MAXBLOCKS 700
//--------
#define EMS_INT 0x67
#define EMS_STATUS 0x40
#define EMS_GETFRAME 0x41
#define EMS_GETPAGES 0x42
#define EMS_ALLOCPAGES 0x43
#define EMS_MAPPAGE 0x44
#define EMS_FREEPAGES 0x45
#define EMS_VERSION 0x46
//--------
#define XMS_INT 0x2f
#define XMS_CALL(v) _AH = (v);\
asm call [DWORD PTR XMSDriver]
#define XMS_VERSION 0x00
#define XMS_ALLOCHMA 0x01
#define XMS_FREEHMA 0x02
#define XMS_GENABLEA20 0x03
#define XMS_GDISABLEA20 0x04
#define XMS_LENABLEA20 0x05
#define XMS_LDISABLEA20 0x06
#define XMS_QUERYA20 0x07
#define XMS_QUERYFREE 0x08
#define XMS_ALLOC 0x09
#define XMS_FREE 0x0A
#define XMS_MOVE 0x0B
#define XMS_LOCK 0x0C
#define XMS_UNLOCK 0x0D
#define XMS_GETINFO 0x0E
#define XMS_RESIZE 0x0F
#define XMS_ALLOCUMB 0x10
#define XMS_FREEUMB 0x11
//==========================================================================
typedef
struct
{
long
nearheap
,
farheap
,
EMSmem
,
XMSmem
,
mainmem
;
}
mminfotype
;
//==========================================================================
extern
mminfotype
mminfo
;
extern
memptr
bufferseg
;
extern
boolean
mmerror
;
extern
void
(
*
beforesort
)
(
void
);
extern
void
(
*
aftersort
)
(
void
);
//==========================================================================
void
MM_Startup
(
void
);
void
MM_Shutdown
(
void
);
void
MM_MapEMS
(
void
);
void
MM_GetPtr
(
memptr
*
baseptr
,
unsigned
long
size
);
void
MM_FreePtr
(
memptr
*
baseptr
);
...
...
@@ -165,22 +101,7 @@ long MM_TotalFree (void);
void
MM_BombOnError
(
boolean
bomb
);
void
MML_UseSpace
(
unsigned
segstart
,
unsigned
seglength
);
#define EMSPageSize 16384
#define EMSPageSizeSeg (EMSPageSize >> 4)
#define EMSPageSizeKB (EMSPageSize >> 10)
#define EMSFrameCount 4
#define PMPageSize 4096
#define PMPageSizeSeg (PMPageSize >> 4)
#define PMPageSizeKB (PMPageSize >> 10)
#define PMEMSSubPage (EMSPageSize / PMPageSize)
#define PMMinMainMem 10 // Min acceptable # of pages from main
#define PMMaxMainMem 100 // Max number of pages in main memory
#define PMThrashThreshold 1 // Number of page thrashes before panic mode
#define PMUnThrashThreshold 5 // Number of non-thrashing frames before leaving panic mode
#define PMPageSize 4096
typedef
enum
{
...
...
@@ -188,30 +109,14 @@ typedef enum
pml_Locked
}
PMLockType
;
typedef
enum
{
pmba_Unused
=
0
,
pmba_Used
=
1
,
pmba_Allocated
=
2
}
PMBlockAttr
;
typedef
struct
{
longword
offset
;
// Offset of chunk into file
word
length
;
// Length of the chunk
PMLockType
locked
;
// If set, this page can'
t be purged
PMLockType
locked
;
// If set, this page canno
t be purged
memptr
addr
;
longword
lastHit
;
// Last frame number of hit
}
PageListStruct
;
typedef
struct
{
int
baseEMSPage
;
// Base EMS page for this phys frame
longword
lastHit
;
// Last frame number of hit
}
EMSListStruct
;
extern
boolean
XMSPresent
,
EMSPresent
;
extern
word
XMSPagesAvail
,
EMSPagesAvail
;
extern
word
ChunksInFile
,
PMSpriteStart
,
PMSoundStart
;
extern
PageListStruct
*
PMPages
;
...
...
@@ -219,10 +124,6 @@ extern PageListStruct *PMPages;
#define PM_GetSoundPage(v) PM_GetPage(PMSoundStart + (v))
#define PM_GetSpritePage(v) PM_GetPage(PMSpriteStart + (v))
#define PM_LockMainMem() PM_SetMainMemPurge(0)
#define PM_UnlockMainMem() PM_SetMainMemPurge(3)
extern
char
PageFileName
[
13
];
...
...
@@ -237,4 +138,6 @@ void PM_Startup(void),
memptr
PM_GetPageAddress
(
int
pagenum
),
PM_GetPage
(
int
pagenum
);
// Use this one to cache page
void
PM_SetMainMemPurge
(
int
level
);
#elif
#error "fix me TODO"
#endif
src/id_vl.h
View file @
abf4a36f
...
...
@@ -72,6 +72,8 @@
//===========================================================================
extern
byte
*
gfxbuf
;
extern
unsigned
bufferofs
;
// all drawing is reletive to this
extern
unsigned
displayofs
;
// last setscreen coordinates
...
...
src/version.h
View file @
abf4a36f
#ifndef __VERSION_H__
#define __VERSION_H__
//#define SPEAR
//#define JAPAN
/* #define SPEAR */
/* #define SPEARDEMO */
/* #define JAPAN */
#define GOODTIMES
#define DEMOSEXTERN
/
/#define UPLOAD
/
* #define UPLOAD */
#elif
#error "fix me: TODO"
...
...
src/wl_draw.c
View file @
abf4a36f
/* wl_draw.c */
#include "wl_def.h"
#include <dos.h>
/*
=============================================================================
...
...
@@ -1243,14 +1242,6 @@ void CalcTics (void)
lasttimecount
=
newtime
;
#ifdef FILEPROFILE
strcpy
(
scratch
,
"
\t
Tics:"
);
itoa
(
tics
,
str
,
10
);
strcat
(
scratch
,
str
);
strcat
(
scratch
,
"
\n
"
);
write
(
profilehandle
,
scratch
,
strlen
(
scratch
));
#endif
if
(
tics
>
MAXTICS
)
{
TimeCount
-=
(
tics
-
MAXTICS
);
...
...
src/wl_main.c
View file @
abf4a36f
...
...
@@ -1189,18 +1189,6 @@ void InitGame (void)
BuildTables
();
// trig tables
SetupWalls
();
#if 0
{
int temp,i;
temp = viewsize;
profilehandle = open("SCALERS.TXT", O_CREAT | O_WRONLY | O_TEXT);
for (i=1;i<20;i++)
NewViewSize(i);
viewsize = temp;
close(profilehandle);
}
#endif
NewViewSize
(
viewsize
);
...
...
src/wlfj1ver.h
View file @
abf4a36f
...
...
@@ -2,8 +2,5 @@
#define JAPAN
#define JAPDEMO
#define UPLOAD
#define ARTSEXTERN
#define DEMOSEXTERN
//#define MYPROFILE
//#define DEBCHECK
#define CARMACIZED
src/wolfjver.h
View file @
abf4a36f
//#define SPEAR
#define JAPAN
#define ARTSEXTERN
#define DEMOSEXTERN
//#define MYPROFILE
//#define DEBCHECK
#define CARMACIZED
//#define UPLOAD
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