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
d9003143
Commit
d9003143
authored
Apr 20, 2000
by
Steven Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Now just gotta fix linking problems, then actually fix the code!
parent
65d7dc44
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
115 additions
and
226 deletions
+115
-226
id_in.c
src/id_in.c
+1
-1
id_vh.c
src/id_vh.c
+1
-0
id_vl.c
src/id_vl.c
+2
-3
wl_act1.c
src/wl_act1.c
+1
-1
wl_debug.c
src/wl_debug.c
+3
-20
wl_def.h
src/wl_def.h
+2
-0
wl_draw.c
src/wl_draw.c
+0
-2
wl_main.c
src/wl_main.c
+88
-157
wl_play.c
src/wl_play.c
+15
-39
wl_state.c
src/wl_state.c
+2
-3
No files found.
src/id_in.c
View file @
d9003143
...
...
@@ -101,7 +101,7 @@ static void INL_KeyService(void)
byte
k
,
c
,
temp
;
int
i
;
k
=
inportb
(
0x60
);
// Get the scan code
/* k = inportb(0x60); // Get the scan code */
if
(
k
==
0xe0
)
// Special key prefix
special
=
true
;
...
...
src/id_vh.c
View file @
d9003143
...
...
@@ -12,6 +12,7 @@ int px,py;
byte
fontcolor
,
backcolor
;
int
fontnumber
;
unsigned
freelatch
;
/* ======================================================================== */
void
VW_DrawPropString
(
char
*
string
)
...
...
src/id_vl.c
View file @
d9003143
...
...
@@ -2,13 +2,12 @@
#include "id_heads.h"
unsigned
bufferofs
;
unsigned
displayofs
;
boolean
screenfaded
;
byte
palette1
[
256
][
3
],
palette2
[
256
][
3
];
byte
*
gfxbuf
;
void
VL_WaitVBL
(
int
vbls
)
{
}
...
...
src/wl_act1.c
View file @
d9003143
...
...
@@ -331,7 +331,7 @@ void InitAreas (void)
void
InitDoorList
(
void
)
{
memset
(
areabyplayer
,
0
,
sizeof
(
areabyplayer
));
_f
memset
(
areaconnect
,
0
,
sizeof
(
areaconnect
));
memset
(
areaconnect
,
0
,
sizeof
(
areaconnect
));
lastdoorobj
=
&
doorobjlist
[
0
];
doornum
=
0
;
...
...
src/wl_debug.c
View file @
d9003143
...
...
@@ -59,8 +59,6 @@ void DebugMemory (void)
US_CPrint
(
"Memory Usage"
);
US_CPrint
(
"------------"
);
US_Print
(
"Total :"
);
US_PrintUnsigned
(
mminfo
.
mainmem
/
1024
);
US_Print
(
"k
\n
Free :"
);
US_PrintUnsigned
(
MM_UnusedMemory
()
/
1024
);
US_Print
(
"k
\n
With purge:"
);
...
...
@@ -216,21 +214,10 @@ static char buf[10];
US_Print
(
" (Sound)"
);
US_Print
(
"
\n
XMS: "
);
if
(
page
->
xmsPage
!=
-
1
)
US_PrintUnsigned
(
page
->
xmsPage
);
else
US_Print
(
"No"
);
US_Print
(
"No"
);
US_Print
(
"
\n
Main: "
);
if
(
page
->
mainPage
!=
-
1
)
US_PrintUnsigned
(
page
->
mainPage
);
else
if
(
page
->
emsPage
!=
-
1
)
{
US_Print
(
"EMS "
);
US_PrintUnsigned
(
page
->
emsPage
);
}
else
US_Print
(
"No"
);
US_Print
(
"No"
);
US_Print
(
"
\n
Last hit: "
);
US_PrintUnsigned
(
page
->
lastHit
);
...
...
@@ -247,7 +234,6 @@ static char buf[10];
//
// draw the wall
//
bufferofs
+=
32
*
SCREENWIDTH
;
postx
=
128
;
postwidth
=
1
;
postsource
=
((
long
)((
unsigned
)
addr
))
<<
16
;
...
...
@@ -256,16 +242,13 @@ static char buf[10];
wallheight
[
postx
]
=
256
;
FarScalePost
();
}
bufferofs
-=
32
*
SCREENWIDTH
;
}
else
if
(
i
<
PMSoundStart
)
{
//
// draw the sprite
//
bufferofs
+=
32
*
SCREENWIDTH
;
SimpleScaleShape
(
160
,
i
-
PMSpriteStart
,
64
);
bufferofs
-=
32
*
SCREENWIDTH
;
}
else
if
(
i
==
ChunksInFile
-
1
)
{
...
...
@@ -283,7 +266,7 @@ static char buf[10];
}
else
{
byte
*
dp
=
(
byte
*
)
MK_FP
(
addr
,
0
)
;
byte
*
dp
=
addr
;
for
(
j
=
0
;
j
<
NumDigi
;
j
++
)
{
k
=
(
DigiList
[(
j
*
2
)
+
1
]
+
(
PMPageSize
-
1
))
/
PMPageSize
;
...
...
src/wl_def.h
View file @
d9003143
...
...
@@ -56,6 +56,8 @@
#define NUMBERCHARS 9
#define HEIGHTRATIO 0.50
//----------------
#define EXTRAPOINTS 40000
...
...
src/wl_draw.c
View file @
d9003143
...
...
@@ -75,7 +75,6 @@ void AsmRefresh (void);
=
========================
*/
#if 0
fixed
FixedByFrac
(
fixed
a
,
fixed
b
)
{
long
long
ra
=
a
;
...
...
@@ -86,7 +85,6 @@ fixed FixedByFrac (fixed a, fixed b)
r
>>=
16
;
return
(
fixed
)
r
;
}
#endif
//==========================================================================
...
...
src/wl_main.c
View file @
d9003143
This diff is collapsed.
Click to expand it.
src/wl_play.c
View file @
d9003143
/
/ WL_PLAY.C
/
* wl_play.c */
#include "WL_DEF.H"
#pragma hdrstop
#include "wl_def.h"
/*
...
...
@@ -67,7 +66,7 @@ int viewsize;
boolean
buttonheld
[
NUMBUTTONS
];
boolean
demorecord
,
demoplayback
;
char
far
*
demoptr
,
far
*
lastdemoptr
;
char
*
demoptr
,
*
lastdemoptr
;
memptr
demobuffer
;
//
...
...
@@ -374,11 +373,7 @@ void PollKeyboardMove (void)
void
PollMouseMove
(
void
)
{
int
mousexmove
,
mouseymove
;
Mouse
(
MDelta
);
mousexmove
=
_CX
;
mouseymove
=
_DX
;
int
mousexmove
=
0
,
mouseymove
=
0
;
controlx
+=
mousexmove
*
10
/
(
13
-
mouseadjustment
);
controly
+=
mouseymove
*
20
/
(
13
-
mouseadjustment
);
...
...
@@ -684,7 +679,6 @@ void CheckKeys (void)
STR_CHEATER5
);
UNCACHEGRCHUNK
(
STARTFONT
+
1
);
PM_CheckMainMem
();
IN_ClearKeysDown
();
IN_Ack
();
...
...
@@ -713,7 +707,6 @@ void CheckKeys (void)
Message
(
"Debugging keys are
\n
now available!"
);
UNCACHEGRCHUNK
(
STARTFONT
+
1
);
PM_CheckMainMem
();
IN_ClearKeysDown
();
IN_Ack
();
...
...
@@ -739,7 +732,6 @@ void CheckKeys (void)
"that - right, Cheatmeister?!"
);
UNCACHEGRCHUNK
(
STARTFONT
+
1
);
PM_CheckMainMem
();
IN_ClearKeysDown
();
IN_Ack
();
...
...
@@ -758,8 +750,6 @@ void CheckKeys (void)
IN_ClearKeysDown
();
SD_MusicOn
();
Paused
=
false
;
if
(
MousePresent
)
Mouse
(
MDelta
);
// Clear accumulated mouse movement
return
;
}
...
...
@@ -783,7 +773,6 @@ void CheckKeys (void)
if
(
scan
==
sc_F9
)
StartMusic
();
PM_CheckMainMem
();
SETFONTCOLOR
(
0
,
15
);
IN_ClearKeysDown
();
return
;
...
...
@@ -808,9 +797,6 @@ void CheckKeys (void)
if
(
loadedgame
)
playstate
=
ex_abort
;
lasttimecount
=
TimeCount
;
if
(
MousePresent
)
Mouse
(
MDelta
);
// Clear accumulated mouse movement
PM_CheckMainMem
();
return
;
}
...
...
@@ -823,8 +809,6 @@ void CheckKeys (void)
fontnumber
=
0
;
SETFONTCOLOR
(
0
,
15
);
DebugKeys
();
if
(
MousePresent
)
Mouse
(
MDelta
);
// Clear accumulated mouse movement
lasttimecount
=
TimeCount
;
return
;
}
...
...
@@ -1001,8 +985,8 @@ void StopMusic(void)
for
(
i
=
0
;
i
<
LASTMUSIC
;
i
++
)
if
(
audiosegs
[
STARTMUSIC
+
i
])
{
MM_SetPurge
(
&
((
memptr
)
audiosegs
[
STARTMUSIC
+
i
]),
3
);
MM_SetLock
(
&
((
memptr
)
audiosegs
[
STARTMUSIC
+
i
]),
false
);
MM_SetPurge
(
(
memptr
)
&
(
audiosegs
[
STARTMUSIC
+
i
]),
3
);
MM_SetLock
(
(
memptr
)
&
(
audiosegs
[
STARTMUSIC
+
i
]),
false
);
}
}
...
...
@@ -1030,13 +1014,8 @@ void StartMusic(void)
MM_BombOnError
(
false
);
CA_CacheAudioChunk
(
STARTMUSIC
+
chunk
);
MM_BombOnError
(
true
);
if
(
mmerror
)
mmerror
=
false
;
else
{
MM_SetLock
(
&
((
memptr
)
audiosegs
[
STARTMUSIC
+
chunk
]),
true
);
SD_StartMusic
((
MusicGroup
far
*
)
audiosegs
[
STARTMUSIC
+
chunk
]);
}
MM_SetLock
((
memptr
)
&
(
audiosegs
[
STARTMUSIC
+
chunk
]),
true
);
SD_StartMusic
((
MusicGroup
*
)
audiosegs
[
STARTMUSIC
+
chunk
]);
}
...
...
@@ -1056,13 +1035,13 @@ void StartMusic(void)
#define WHITETICS 6
byte
far
redshifts
[
NUMREDSHIFTS
][
768
];
byte
far
whiteshifts
[
NUMREDSHIFTS
][
768
];
byte
redshifts
[
NUMREDSHIFTS
][
768
];
byte
whiteshifts
[
NUMREDSHIFTS
][
768
];
int
damagecount
,
bonuscount
;
boolean
palshifted
;
extern
byte
far
gamepal
;
extern
byte
gamepal
;
/*
=====================
...
...
@@ -1074,7 +1053,7 @@ extern byte far gamepal;
void
InitRedShifts
(
void
)
{
byte
far
*
workptr
,
far
*
baseptr
;
byte
*
workptr
,
*
baseptr
;
int
i
,
j
,
delta
;
...
...
@@ -1083,7 +1062,7 @@ void InitRedShifts (void)
//
for
(
i
=
1
;
i
<=
NUMREDSHIFTS
;
i
++
)
{
workptr
=
(
byte
far
*
)
&
redshifts
[
i
-
1
][
0
];
workptr
=
(
byte
*
)
&
redshifts
[
i
-
1
][
0
];
baseptr
=
&
gamepal
;
for
(
j
=
0
;
j
<=
255
;
j
++
)
...
...
@@ -1099,7 +1078,7 @@ void InitRedShifts (void)
for
(
i
=
1
;
i
<=
NUMWHITESHIFTS
;
i
++
)
{
workptr
=
(
byte
far
*
)
&
whiteshifts
[
i
-
1
][
0
];
workptr
=
(
byte
*
)
&
whiteshifts
[
i
-
1
][
0
];
baseptr
=
&
gamepal
;
for
(
j
=
0
;
j
<=
255
;
j
++
)
...
...
@@ -1376,9 +1355,6 @@ void PlayLoop (void)
memset
(
buttonstate
,
0
,
sizeof
(
buttonstate
));
ClearPaletteShifts
();
if
(
MousePresent
)
Mouse
(
MDelta
);
// Clear accumulated mouse movement
if
(
demoplayback
)
IN_StartAck
();
...
...
@@ -1386,7 +1362,7 @@ void PlayLoop (void)
{
if
(
virtualreality
)
{
helmetangle
=
peek
(
0x40
,
0xf0
);
helmetangle
=
0
;
/* TODO: virtualreality can be removed */
player
->
angle
+=
helmetangle
;
if
(
player
->
angle
>=
ANGLES
)
player
->
angle
-=
ANGLES
;
...
...
src/wl_state.c
View file @
d9003143
/
/ WL_STATE.C
/
* wl_state.c */
#include "WL_DEF.H"
#pragma hdrstop
#include "wl_def.h"
/*
=============================================================================
...
...
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