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
3be1f771
Commit
3be1f771
authored
Nov 23, 2000
by
Steven Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More code reformatting.
Made some functions/variables static.
parent
46f35dd2
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
189 additions
and
206 deletions
+189
-206
id_ca.c
src/id_ca.c
+16
-16
wl_debug.c
src/wl_debug.c
+1
-1
wl_def.h
src/wl_def.h
+0
-3
wl_draw.c
src/wl_draw.c
+129
-148
wl_play.c
src/wl_play.c
+32
-26
wl_scale.c
src/wl_scale.c
+11
-12
No files found.
src/id_ca.c
View file @
3be1f771
...
...
@@ -1379,19 +1379,19 @@ void MM_SetLock (memptr *baseptr, boolean locked)
=====================
*/
void
MM_SortMem
(
void
)
void
MM_SortMem
(
)
{
}
boolean
PMStarted
;
char
PageFileName
[
13
]
=
{
"vswap."
};
int
PageFile
=
-
1
;
word
ChunksInFile
;
word
PMSpriteStart
,
PMSoundStart
;
boolean
PMStarted
;
char
PageFileName
[
13
]
=
{
"vswap."
};
int
PageFile
=
-
1
;
word
ChunksInFile
;
word
PMSpriteStart
,
PMSoundStart
;
word
PMNumBlocks
;
long
PMFrameCount
;
PageListStruct
*
PMPages
,
*
PMSegPages
;
word
PMNumBlocks
;
long
PMFrameCount
;
PageListStruct
*
PMPages
,
*
PMSegPages
;
/////////////////////////////////////////////////////////////////////////////
//
...
...
@@ -1402,13 +1402,13 @@ void MM_SortMem (void)
//
// PML_ReadFromFile() - Reads some data in from the page file
//
void
PML_ReadFromFile
(
byte
*
buf
,
long
offset
,
word
length
)
static
void
PML_ReadFromFile
(
byte
*
buf
,
long
offset
,
word
length
)
{
if
(
!
buf
)
Quit
(
"PML_ReadFromFile: Null pointer"
);
if
(
!
offset
)
Quit
(
"PML_ReadFromFile: Zero offset"
);
if
(
lseek
(
PageFile
,
offset
,
SEEK_SET
)
!=
offset
)
if
(
lseek
(
PageFile
,
offset
,
SEEK_SET
)
!=
offset
)
Quit
(
"PML_ReadFromFile: Seek failed"
);
if
(
!
CA_FarRead
(
PageFile
,
buf
,
length
))
Quit
(
"PML_ReadFromFile: Read failed"
);
...
...
@@ -1417,7 +1417,7 @@ void PML_ReadFromFile(byte *buf, long offset, word length)
//
// PML_OpenPageFile() - Opens the page file and sets up the page info
//
void
PML_OpenPageFile
(
void
)
static
void
PML_OpenPageFile
(
)
{
int
i
;
long
size
;
...
...
@@ -1465,7 +1465,7 @@ void PML_OpenPageFile(void)
//
// PML_ClosePageFile() - Closes the page file
//
void
PML_ClosePageFile
(
void
)
static
void
PML_ClosePageFile
(
)
{
if
(
PageFile
!=
-
1
)
close
(
PageFile
);
...
...
@@ -1534,7 +1534,7 @@ void PM_Preload(boolean (*update)(word current,word total))
//
// PM_NextFrame() - Increments the frame counter
//
void
PM_NextFrame
(
void
)
void
PM_NextFrame
()
{
int
i
;
...
...
@@ -1566,7 +1566,7 @@ void PM_Reset()
//
// PM_Startup() - Start up the Page Mgr
//
void
PM_Startup
(
void
)
void
PM_Startup
()
{
if
(
PMStarted
)
return
;
...
...
@@ -1581,7 +1581,7 @@ void PM_Startup(void)
//
// PM_Shutdown() - Shut down the Page Mgr
//
void
PM_Shutdown
(
void
)
void
PM_Shutdown
()
{
if
(
!
PMStarted
)
return
;
...
...
src/wl_debug.c
View file @
3be1f771
...
...
@@ -94,7 +94,7 @@ void PicturePause (void)
================
*/
void
ShapeTest
(
void
)
void
ShapeTest
(
)
{
#if 0 /* TODO: this code want to access the raycasting renderer directly */
extern word NumDigi;
...
...
src/wl_def.h
View file @
3be1f771
...
...
@@ -898,10 +898,7 @@ extern unsigned pwallpos;
fixed
FixedByFrac
(
fixed
a
,
fixed
b
);
void
TransformActor
(
objtype
*
ob
);
void
BuildTables
(
void
);
int
CalcRotate
(
objtype
*
ob
);
void
DrawScaleds
(
void
);
void
CalcTics
(
void
);
void
ThreeDRefresh
(
void
);
...
...
src/wl_draw.c
View file @
3be1f771
This diff is collapsed.
Click to expand it.
src/wl_play.c
View file @
3be1f771
...
...
@@ -14,7 +14,7 @@ boolean madenoise; // true when shooting or screaming
exit_t
playstate
;
int
DebugOk
;
int
DebugOk
;
objtype
objlist
[
MAXACTORS
],
*
new
,
*
obj
,
*
player
,
*
lastobj
,
*
objfreelist
,
*
killerobj
;
...
...
@@ -418,41 +418,47 @@ void PollJoystickMove (void)
===================
*/
void
PollControls
(
void
)
void
PollControls
(
)
{
int
max
,
min
,
i
;
int
max
,
min
,
i
;
byte
buttonbits
;
//
// get timing info for last frame
//
if
(
demoplayback
)
{
while
(
get_TimeCount
()
<
(
lasttimecount
+
DEMOTICS
)
)
;
set_TimeCount
(
lasttimecount
+
DEMOTICS
);
lasttimecount
+=
DEMOTICS
;
tics
=
DEMOTICS
;
}
else
if
(
demorecord
)
// demo recording and playback needs
{
// to be constant
if
(
demoplayback
)
{
#if 0
if (1 /* (TEMP) TODO: TimeDemo */) {
set_TimeCount(lasttimecount + DEMOTICS);
lasttimecount += DEMOTICS;
tics = DEMOTICS;
} else
#endif
{
while
(
get_TimeCount
()
<
(
lasttimecount
+
DEMOTICS
)
)
;
set_TimeCount
(
lasttimecount
+
DEMOTICS
);
lasttimecount
+=
DEMOTICS
;
tics
=
DEMOTICS
;
}
}
else
if
(
demorecord
)
{
// demo recording and playback needs
// to be constant
//
// take DEMOTICS or more tics, and modify Timecount to reflect time taken
//
while
(
get_TimeCount
()
<
(
lasttimecount
+
DEMOTICS
)
)
;
while
(
get_TimeCount
()
<
(
lasttimecount
+
DEMOTICS
)
)
;
set_TimeCount
(
lasttimecount
+
DEMOTICS
);
lasttimecount
+=
DEMOTICS
;
tics
=
DEMOTICS
;
}
else
}
else
CalcTics
();
controlx
=
0
;
controly
=
0
;
memcpy
(
buttonheld
,
buttonstate
,
sizeof
(
buttonstate
));
memset
(
buttonstate
,
0
,
sizeof
(
buttonstate
));
memcpy
(
buttonheld
,
buttonstate
,
sizeof
(
buttonstate
));
memset
(
buttonstate
,
0
,
sizeof
(
buttonstate
));
if
(
demoplayback
)
{
if
(
demoplayback
)
{
//
// read commands from demo buffer
//
...
...
@@ -481,26 +487,26 @@ void PollControls (void)
//
/* Update keys */
IN_CheckAck
();
/* TODO: better name */
IN_CheckAck
();
PollKeyboardButtons
();
PollKeyboardButtons
();
if
(
mouseenabled
)
PollMouseButtons
();
PollMouseButtons
();
if
(
joystickenabled
)
PollJoystickButtons
();
PollJoystickButtons
();
//
// get movements
//
PollKeyboardMove
();
PollKeyboardMove
();
if
(
mouseenabled
)
PollMouseMove
();
PollMouseMove
();
if
(
joystickenabled
)
PollJoystickMove
();
PollJoystickMove
();
//
// bound movement to a maximum
...
...
src/wl_scale.c
View file @
3be1f771
...
...
@@ -20,11 +20,10 @@ typedef struct {
short
desty
[
65
];
}
t_scaledata
;
t_scaledata
scaledata
[
MAXSCALEHEIGHT
+
1
];
static
t_scaledata
scaledata
[
MAXSCALEHEIGHT
+
1
];
static
int
maxscale
;
int
maxscale
;
void
BuildCompScale
(
int
height
)
static
void
BuildCompScale
(
int
height
)
{
long
fix
,
step
;
unsigned
src
;
...
...
@@ -79,7 +78,7 @@ void SetupScaling(int maxscaleheight)
//
for
(
i
=
1
;
i
<=
maxscaleheight
;
i
++
)
{
BuildCompScale
(
i
);
BuildCompScale
(
i
);
}
}
...
...
@@ -141,10 +140,10 @@ void xBuildCompScale(unsigned int height, byte *source, int x)
=======================
*/
int
slinex
,
slinewidth
;
short
*
linecmds
;
int
linescale
;
t_compshape
*
shapeptr
;
static
int
slinex
,
slinewidth
;
s
tatic
s
hort
*
linecmds
;
static
int
linescale
;
static
t_compshape
*
shapeptr
;
/*
linecmds - points to line segment data
...
...
@@ -152,7 +151,7 @@ t_compshape *shapeptr;
slinex - screen coord of first column
*/
void
ScaleLine
()
static
void
ScaleLine
()
{
int
x
,
y
,
ys
;
int
n
,
ny
;
...
...
@@ -445,7 +444,7 @@ void SimpleScaleShape(int xcenter, int shapenum, unsigned height)
if
(
!
(
slinewidth
=
scaledata
[
scale
].
count
[
srcx
])
)
continue
;
ScaleLine
();
slinex
+=
slinewidth
;
ScaleLine
();
slinex
+=
slinewidth
;
}
}
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