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
97af6bcd
Commit
97af6bcd
authored
Apr 27, 2000
by
Steven Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor cleanups (once again)
parent
893a320a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
26 additions
and
99 deletions
+26
-99
Makefile
src/Makefile
+4
-4
id_heads.h
src/id_heads.h
+4
-7
vi_svga.c
src/vi_svga.c
+1
-66
vi_xlib.c
src/vi_xlib.c
+4
-5
wl_def.h
src/wl_def.h
+2
-1
wl_draw.c
src/wl_draw.c
+2
-2
wl_main.c
src/wl_main.c
+9
-14
No files found.
src/Makefile
View file @
97af6bcd
CC
=
gcc
#CFLAGS = -O6 -fomit-frame-pointer -ffast-math -funroll-loops -mpentiumpro -mcpu=pentiumpro -march=pentiumpro
#CFLAGS = -g -Wall -pedantic
CFLAGS
=
-g
CFLAGS
=
-g
-Wall
#
CFLAGS = -g
#CFLAGS = -Os
OBJS
=
objs.o misc.o id_ca.o id_sd.o id_vh.o id_us.o
\
wl_scale.o wl_draw.o wl_act1.o wl_act2.o wl_agent.o wl_game.o
\
...
...
@@ -21,8 +21,8 @@ NASM = nasm
all
:
swolf3d xwolf3d
$(SOBJS)
:
version.h id_heads.h
$(XOBJS)
:
version.h id_heads.h
$(SOBJS)
:
version.h id_heads.h
wl_def.h
$(XOBJS)
:
version.h id_heads.h
wl_def.h
.asm.o
:
$(NASM)
-f
elf
-o
$@
$<
...
...
src/id_heads.h
View file @
97af6bcd
...
...
@@ -31,10 +31,6 @@ int WolfMain(int argc, char *argv[]);
/* ------------------------------------------------------------------------ */
extern
char
signon
;
#define introscn signon
#ifndef SPEAR
#ifndef UPLOAD
...
...
@@ -59,9 +55,6 @@ extern char signon;
/* ---------------- */
#define GREXT "VGA"
typedef
enum
{
false
,
true
}
boolean
;
typedef
unsigned
char
byte
;
typedef
unsigned
short
int
word
;
...
...
@@ -88,6 +81,10 @@ typedef struct
#include "id_sd.h"
#include "id_us.h"
extern
byte
signon
;
#define introscn signon
void
Quit
(
char
*
error
);
// defined in user program
#define MAXTICS 10
...
...
src/vi_svga.c
View file @
97af6bcd
...
...
@@ -378,76 +378,11 @@ static char *ParmStrings[] = {"nojoys","nomouse",nil};
// Internal routines
///////////////////////////////////////////////////////////////////////////
//
// INL_KeyService() - Handles a keyboard interrupt (key up/down)
//
///////////////////////////////////////////////////////////////////////////
static
void
INL_KeyService
(
void
)
{
static
boolean
special
;
byte
k
,
c
,
temp
;
int
i
;
/* k = inportb(0x60); // Get the scan code */
if
(
k
==
0xe0
)
// Special key prefix
special
=
true
;
else
if
(
k
==
0xe1
)
// Handle Pause key
Paused
=
true
;
else
{
if
(
k
&
0x80
)
// Break code
{
k
&=
0x7f
;
// DEBUG - handle special keys: ctl-alt-delete, print scrn
Keyboard
[
k
]
=
false
;
}
else
// Make code
{
LastCode
=
CurCode
;
CurCode
=
LastScan
=
k
;
Keyboard
[
k
]
=
true
;
if
(
special
)
c
=
SpecialNames
[
k
];
else
{
if
(
k
==
sc_CapsLock
)
{
CapsLock
^=
true
;
}
if
(
Keyboard
[
sc_LShift
]
||
Keyboard
[
sc_RShift
])
// If shifted
{
c
=
ShiftNames
[
k
];
if
((
c
>=
'A'
)
&&
(
c
<=
'Z'
)
&&
CapsLock
)
c
+=
'a'
-
'A'
;
}
else
{
c
=
ASCIINames
[
k
];
if
((
c
>=
'a'
)
&&
(
c
<=
'z'
)
&&
CapsLock
)
c
-=
'a'
-
'A'
;
}
}
if
(
c
)
LastASCII
=
c
;
}
special
=
false
;
}
}
void
keyboard_handler
(
int
code
,
int
press
)
{
static
boolean
special
;
byte
k
,
c
,
temp
;
int
i
;
byte
k
,
c
;
/* k = inportb(0x60); // Get the scan code */
k
=
code
;
if
(
k
==
0xe0
)
// Special key prefix
...
...
src/vi_xlib.c
View file @
97af6bcd
...
...
@@ -134,7 +134,7 @@ void VL_Startup()
if
(
gfxbuf
==
NULL
)
gfxbuf
=
malloc
(
320
*
200
*
1
);
img
=
XCreateImage
(
dpy
,
vi
->
visual
,
8
,
ZPixmap
,
0
,
gfxbuf
,
320
,
200
,
img
=
XCreateImage
(
dpy
,
vi
->
visual
,
8
,
ZPixmap
,
0
,
(
char
*
)
gfxbuf
,
320
,
200
,
8
,
320
);
XMapWindow
(
dpy
,
win
);
...
...
@@ -275,8 +275,8 @@ void VL_SetPalette(byte *palette)
*/
void
VL_GetPalette
(
byte
*
palette
)
{
int
i
,
r
,
g
,
b
;
{
int
i
;
for
(
i
=
0
;
i
<
256
;
i
++
)
{
palette
[
i
*
3
+
0
]
=
clr
[
i
].
red
>>
10
;
...
...
@@ -540,8 +540,7 @@ int XKeysymToScancode(unsigned int keysym)
void
keyboard_handler
(
int
code
,
int
press
)
{
static
boolean
special
;
byte
k
,
c
,
temp
;
int
i
;
byte
k
,
c
;
k
=
code
;
...
...
src/wl_def.h
View file @
97af6bcd
...
...
@@ -414,7 +414,7 @@ enum {
SPR_MACHINEGUNATK4
,
SPR_CHAINREADY
,
SPR_CHAINATK1
,
SPR_CHAINATK2
,
SPR_CHAINATK3
,
SPR_CHAINATK4
,
SPR_CHAINATK4
};
...
...
@@ -868,6 +868,7 @@ void LevelCompleted (void);
void
CheckHighScore
(
long
score
,
word
other
);
void
Victory
(
void
);
void
ClearSplitVWB
(
void
);
void
PG13
();
/*
=============================================================================
...
...
src/wl_draw.c
View file @
97af6bcd
...
...
@@ -945,7 +945,7 @@ void HitVertWall (void)
{
int
wallpic
;
unsigned
texture
;
char
*
wall
;
byte
*
wall
;
#ifdef DEBUGx
printf
(
"HitVertWall: xtile = %d, TILE(yintercept) = %d
\n
"
,
...
...
@@ -981,7 +981,7 @@ void HitHorizWall (void)
{
int
wallpic
;
unsigned
texture
;
char
*
wall
;
byte
*
wall
;
#ifdef DEBUGx
printf
(
"HitHorizWall: ytile = %d, TILE(xintercept) = %d
\n
"
,
...
...
src/wl_main.c
View file @
97af6bcd
...
...
@@ -272,7 +272,7 @@ long DoChecksum(byte *source,unsigned size,long checksum)
boolean
SaveTheGame
(
int
file
,
int
x
,
int
y
)
{
long
avail
,
size
,
checksum
;
long
checksum
;
objtype
*
ob
,
nullobj
;
checksum
=
0
;
...
...
@@ -358,8 +358,7 @@ boolean SaveTheGame(int file,int x,int y)
boolean
LoadTheGame
(
int
file
,
int
x
,
int
y
)
{
long
checksum
,
oldchecksum
;
objtype
*
ob
,
nullobj
;
objtype
nullobj
;
checksum
=
0
;
...
...
@@ -557,15 +556,12 @@ void BuildTables (void)
void
CalcProjection
(
long
focal
)
{
int
i
;
long
intang
;
int
i
;
long
intang
;
float
angle
;
double
tang
;
double
planedist
;
double
globinhalf
;
int
halfview
;
double
halfangle
,
facedist
;
int
halfview
;
double
facedist
;
focallength
=
focal
;
facedist
=
focal
+
MINDIST
;
...
...
@@ -1021,7 +1017,7 @@ void DoJukebox(void)
void
InitGame
(
void
)
{
int
i
,
x
,
y
;
int
i
;
MM_Startup
();
VW_Startup
();
...
...
@@ -1191,7 +1187,6 @@ void Quit(char *error)
void
DemoLoop
(
void
)
{
static
int
LastDemo
;
int
i
;
//
// main game cycle
...
...
@@ -1210,6 +1205,8 @@ void DemoLoop (void)
if
(
i
&&
(
(
i
+
1
)
<
_argc
)
)
{
i
++
;
for
(;
i
<
_argc
;
i
++
)
{
if
(
_argv
[
i
][
0
]
==
'-'
)
break
;
IN_ClearKeysDown
();
if
(
PlayDemoFromFile
(
_argv
[
i
]))
IN_UserInput
(
3
*
70
);
...
...
@@ -1310,8 +1307,6 @@ void DemoLoop (void)
int
WolfMain
(
int
argc
,
char
*
argv
[])
{
int
i
;
_argc
=
argc
;
_argv
=
argv
;
...
...
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