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
cadd1aa5
Commit
cadd1aa5
authored
Apr 29, 2000
by
Steven Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Few misc cleanups (specifically US_CheckParm has been removed)
parent
d5ae0bf8
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
38 additions
and
113 deletions
+38
-113
TODO
src/TODO
+2
-1
id_ca.c
src/id_ca.c
+1
-1
id_heads.h
src/id_heads.h
+4
-7
id_us.c
src/id_us.c
+4
-47
id_us.h
src/id_us.h
+2
-3
version.h
src/version.h
+1
-1
vi_glx.c
src/vi_glx.c
+6
-15
vi_svga.c
src/vi_svga.c
+6
-15
vi_xlib.c
src/vi_xlib.c
+6
-15
wl_def.h
src/wl_def.h
+0
-2
wl_inter.c
src/wl_inter.c
+6
-6
No files found.
src/TODO
View file @
cadd1aa5
...
...
@@ -30,7 +30,6 @@ and right (happens at any view basically, except this version of source does
not leave any artifacts after a few screen redraws)
* remove GOODTIMES (the piracy message is somewhat worthless)
* then consider removing the SOD manual check
* Use either US_CheckParm or MS_CheckParm.
* perhaps rename UPLOAD
* TOO MANY #IFDEFs
* and upload builds with lots of wl6 code anyway (sound references were just
...
...
@@ -70,10 +69,12 @@ PlayDemoFromFile specifically
* make sure all infinite loops are found (looping around Keyboard)
* deathcam went by too fast, and right before the fizzlefade was being done
on the border
same with the spear of destiny animation part of ending
* move all references to gfxbuf to vi_* only (gl will need this anyway,
since it deprecates: id_vh, wl_draw, wl_scale)
by putting in code from id_vh (either by using Plot or just copying it in)
we can stop the large conversion before each UpdateScreen
but palette fades will still need it!
* pause key
* what are special keys... ?
* no fizzlefade in 15-24bit
...
...
src/id_ca.c
View file @
cadd1aa5
...
...
@@ -1535,7 +1535,7 @@ void PML_ClosePageFile(void)
//
// PM_GetPageAddress() - Returns the address of a given page
// Returns
nil
if block is not loaded
// Returns
NULL
if block is not loaded
//
memptr
PM_GetPageAddress
(
int
pagenum
)
{
...
...
src/id_heads.h
View file @
cadd1aa5
...
...
@@ -24,8 +24,6 @@
#define O_BINARY 0
#endif
int
WolfMain
(
int
argc
,
char
*
argv
[]);
/* ------------------------------------------------------------------------ */
#ifndef SPEAR
...
...
@@ -54,9 +52,8 @@ int WolfMain(int argc, char *argv[]);
typedef
enum
{
false
,
true
}
boolean
;
typedef
unsigned
char
byte
;
typedef
unsigned
short
int
word
;
typedef
unsigned
short
int
word
;
typedef
unsigned
long
longword
;
typedef
byte
*
Ptr
;
typedef
void
*
memptr
;
...
...
@@ -69,8 +66,6 @@ typedef struct
Point
ul
,
lr
;
}
Rect
;
#define nil ((void *)0)
#include "vi_comm.h"
#include "id_ca.h"
...
...
@@ -82,7 +77,9 @@ extern byte signon[];
#define introscn signon
void
Quit
(
char
*
error
);
// defined in user program
int
MS_CheckParm
(
char
*
string
);
int
WolfMain
(
int
argc
,
char
*
argv
[]);
void
Quit
(
char
*
error
);
#define MAXTICS 10
#define DEMOTICS 4
...
...
src/id_us.c
View file @
cadd1aa5
...
...
@@ -9,7 +9,6 @@ word WindowX,WindowY,WindowW,WindowH;
// Internal variables
static
char
*
ParmStrings
[]
=
{
"nowait"
};
static
boolean
US_Started
;
void
(
*
USL_MeasureString
)(
char
*
,
word
*
,
word
*
)
=
VW_MeasurePropString
,
...
...
@@ -32,25 +31,17 @@ HighScore Scores[MaxScores] = {
// US_Startup() - Starts the User Mgr
//
///////////////////////////////////////////////////////////////////////////
void
US_Startup
(
void
)
void
US_Startup
()
{
int
i
,
n
;
if
(
US_Started
)
return
;
US_InitRndT
(
true
);
// Initialize the random number generator
US_InitRndT
(
true
);
for
(
i
=
1
;
i
<
_argc
;
i
++
)
{
n
=
US_CheckParm
(
_argv
[
i
],
ParmStrings
);
switch
(
n
)
{
case
0
:
NoWait
=
true
;
break
;
}
}
if
(
MS_CheckParm
(
"nowait"
))
NoWait
=
true
;
US_Started
=
true
;
}
...
...
@@ -69,40 +60,6 @@ void US_Shutdown(void)
US_Started
=
false
;
}
///////////////////////////////////////////////////////////////////////////
//
// US_CheckParm() - checks to see if a string matches one of a set of
// strings. The check is case insensitive. The routine returns the
// index of the string that matched, or -1 if no matches were found
//
///////////////////////////////////////////////////////////////////////////
int
US_CheckParm
(
char
*
parm
,
char
**
strings
)
{
char
cp
,
cs
,
*
p
,
*
s
;
int
i
;
while
(
!
isalpha
(
*
parm
))
// Skip non-alphas
parm
++
;
for
(
i
=
0
;
*
strings
&&
**
strings
;
i
++
)
{
for
(
s
=
*
strings
++
,
p
=
parm
,
cs
=
cp
=
0
;
cs
==
cp
;)
{
cs
=
*
s
++
;
if
(
!
cs
)
return
(
i
);
cp
=
*
p
++
;
if
(
isupper
(
cs
))
cs
=
tolower
(
cs
);
if
(
isupper
(
cp
))
cp
=
tolower
(
cp
);
}
}
return
-
1
;
}
// Window/Printing routines
///////////////////////////////////////////////////////////////////////////
...
...
src/id_us.h
View file @
cadd1aa5
...
...
@@ -38,10 +38,9 @@ void US_Startup(void),
US_PrintUnsigned
(
longword
n
);
boolean
US_LineInput
(
int
x
,
int
y
,
char
*
buf
,
char
*
def
,
boolean
escok
,
int
maxchars
,
int
maxwidth
);
int
US_CheckParm
(
char
*
parm
,
char
**
strings
),
US_RndT
(
void
);
int
US_RndT
();
void
USL_PrintInCenter
(
char
*
s
,
Rect
r
);
void
USL_PrintInCenter
(
char
*
s
,
Rect
r
);
#else
#error "fix me: TODO"
...
...
src/version.h
View file @
cadd1aa5
...
...
@@ -6,7 +6,7 @@
/* SDM = 2 */
/* SOD = 3 */
#ifndef WMODE
#define WMODE
3
#define WMODE
0
#endif
#if WMODE == 0
...
...
src/vi_glx.c
View file @
cadd1aa5
...
...
@@ -478,8 +478,6 @@ static Direction DirTable[] = // Quick lookup for total direction
dir_SouthWest
,
dir_South
,
dir_SouthEast
};
static
char
*
ParmStrings
[]
=
{
"nojoys"
,
"nomouse"
,
nil
};
// Internal routines
int
XKeysymToScancode
(
unsigned
int
keysym
)
...
...
@@ -722,19 +720,12 @@ void IN_Startup(void)
checkjoys
=
true
;
checkmouse
=
true
;
for
(
i
=
1
;
i
<
_argc
;
i
++
)
{
switch
(
US_CheckParm
(
_argv
[
i
],
ParmStrings
))
{
case
0
:
checkjoys
=
false
;
break
;
case
1
:
checkmouse
=
false
;
break
;
}
}
if
(
MS_CheckParm
(
"nojoy"
))
checkjoys
=
false
;
if
(
MS_CheckParm
(
"nomouse"
))
checkmouse
=
false
;
INL_StartKbd
();
MousePresent
=
checkmouse
?
INL_StartMouse
()
:
false
;
...
...
src/vi_svga.c
View file @
cadd1aa5
...
...
@@ -347,8 +347,6 @@ static Direction DirTable[] = // Quick lookup for total direction
dir_SouthWest
,
dir_South
,
dir_SouthEast
};
static
char
*
ParmStrings
[]
=
{
"nojoys"
,
"nomouse"
,
nil
};
// Internal routines
void
keyboard_handler
(
int
code
,
int
press
)
...
...
@@ -552,19 +550,12 @@ void IN_Startup(void)
checkjoys
=
true
;
checkmouse
=
true
;
for
(
i
=
1
;
i
<
_argc
;
i
++
)
{
switch
(
US_CheckParm
(
_argv
[
i
],
ParmStrings
))
{
case
0
:
checkjoys
=
false
;
break
;
case
1
:
checkmouse
=
false
;
break
;
}
}
if
(
MS_CheckParm
(
"nojoy"
))
checkjoys
=
false
;
if
(
MS_CheckParm
(
"nomouse"
))
checkmouse
=
false
;
INL_StartKbd
();
MousePresent
=
checkmouse
?
INL_StartMouse
()
:
false
;
...
...
src/vi_xlib.c
View file @
cadd1aa5
...
...
@@ -723,8 +723,6 @@ static Direction DirTable[] = // Quick lookup for total direction
dir_SouthWest
,
dir_South
,
dir_SouthEast
};
static
char
*
ParmStrings
[]
=
{
"nojoys"
,
"nomouse"
,
nil
};
// Internal routines
int
XKeysymToScancode
(
unsigned
int
keysym
)
...
...
@@ -967,19 +965,12 @@ void IN_Startup(void)
checkjoys
=
true
;
checkmouse
=
true
;
for
(
i
=
1
;
i
<
_argc
;
i
++
)
{
switch
(
US_CheckParm
(
_argv
[
i
],
ParmStrings
))
{
case
0
:
checkjoys
=
false
;
break
;
case
1
:
checkmouse
=
false
;
break
;
}
}
if
(
MS_CheckParm
(
"nojoy"
))
checkjoys
=
false
;
if
(
MS_CheckParm
(
"nomouse"
))
checkmouse
=
false
;
INL_StartKbd
();
MousePresent
=
checkmouse
?
INL_StartMouse
()
:
false
;
...
...
src/wl_def.h
View file @
cadd1aa5
...
...
@@ -702,8 +702,6 @@ typedef enum {
=============================================================================
*/
int
MS_CheckParm
(
char
*
string
);
extern
char
str
[
80
],
str2
[
20
];
extern
fixed
focallength
;
...
...
src/wl_inter.c
View file @
cadd1aa5
...
...
@@ -1119,7 +1119,7 @@ void CheckHighScore (long score,word other)
PrintX
=
4
*
8
;
backcolor
=
BORDCOLOR
;
fontcolor
=
15
;
US_LineInput
(
PrintX
,
PrintY
,
Scores
[
n
].
name
,
nil
,
true
,
MaxHighName
,
100
);
US_LineInput
(
PrintX
,
PrintY
,
Scores
[
n
].
name
,
NULL
,
true
,
MaxHighName
,
100
);
#else
PrintX
=
16
;
fontnumber
=
1
;
...
...
@@ -1127,7 +1127,7 @@ void CheckHighScore (long score,word other)
VW_UpdateScreen
();
backcolor
=
0x9c
;
fontcolor
=
15
;
US_LineInput
(
PrintX
,
PrintY
,
Scores
[
n
].
name
,
nil
,
true
,
MaxHighName
,
130
);
US_LineInput
(
PrintX
,
PrintY
,
Scores
[
n
].
name
,
NULL
,
true
,
MaxHighName
,
130
);
#endif
}
else
...
...
@@ -1376,7 +1376,7 @@ void CopyProtection(void)
inputbuffer
[
0
]
=
0
;
PrintY
=
TYPEBOX_Y
;
fontnumber
=
1
;
US_LineInput
(
PrintX
,
PrintY
,
inputbuffer
,
nil
,
true
,
20
,
100
);
US_LineInput
(
PrintX
,
PrintY
,
inputbuffer
,
NULL
,
true
,
20
,
100
);
match
=
0
;
for
(
i
=
0
;
i
<
strlen
(
bossstrs
[
whichboss
]);
i
++
)
...
...
@@ -1410,7 +1410,7 @@ void CopyProtection(void)
backcolor
=
TYPEBOX_BKGD
;
inputbuffer
[
0
]
=
0
;
PrintY
=
TYPEBOX_Y
;
US_LineInput
(
PrintX
,
PrintY
,
inputbuffer
,
nil
,
true
,
6
,
100
);
US_LineInput
(
PrintX
,
PrintY
,
inputbuffer
,
NULL
,
true
,
6
,
100
);
strlwr
(
inputbuffer
);
match
=
1
-
(
strcmp
(
inputbuffer
,
WordCorrect
[
whichword
])
!=
0
);
...
...
@@ -1436,7 +1436,7 @@ void CopyProtection(void)
backcolor
=
TYPEBOX_BKGD
;
inputbuffer
[
0
]
=
0
;
PrintY
=
TYPEBOX_Y
;
US_LineInput
(
PrintX
,
PrintY
,
inputbuffer
,
nil
,
true
,
20
,
120
);
US_LineInput
(
PrintX
,
PrintY
,
inputbuffer
,
NULL
,
true
,
20
,
120
);
strlwr
(
inputbuffer
);
match
=
0
;
...
...
@@ -1467,7 +1467,7 @@ void CopyProtection(void)
backcolor
=
TYPEBOX_BKGD
;
inputbuffer
[
0
]
=
0
;
PrintY
=
TYPEBOX_Y
;
US_LineInput
(
PrintX
,
PrintY
,
inputbuffer
,
nil
,
true
,
6
,
100
);
US_LineInput
(
PrintX
,
PrintY
,
inputbuffer
,
NULL
,
true
,
6
,
100
);
strlwr
(
inputbuffer
);
match
=
1
-
(
strcmp
(
inputbuffer
,
MiscCorrect
[
whichone
])
!=
0
);
...
...
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