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
4e05fcd2
Commit
4e05fcd2
authored
Apr 29, 2000
by
Steven Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed the EOF errors on shareware wolf3d (again, it was misnumbered
headers). Renamed most VWB_ functions to VW_.
parent
d2e486e1
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
100 additions
and
143 deletions
+100
-143
Makefile
src/Makefile
+2
-2
TODO
src/TODO
+1
-7
audiosdm.h
src/audiosdm.h
+0
-1
audiosod.h
src/audiosod.h
+0
-1
audiowl1.h
src/audiowl1.h
+7
-7
audiowl6.h
src/audiowl6.h
+0
-1
gfxv_wl1.h
src/gfxv_wl1.h
+1
-2
id_ca.c
src/id_ca.c
+18
-11
id_us.c
src/id_us.c
+2
-2
id_vh.c
src/id_vh.c
+1
-37
id_vh.h
src/id_vh.h
+2
-6
version.h
src/version.h
+1
-1
wl_debug.c
src/wl_debug.c
+2
-2
wl_game.c
src/wl_game.c
+11
-11
wl_inter.c
src/wl_inter.c
+10
-10
wl_menu.c
src/wl_menu.c
+36
-36
wl_menu.h
src/wl_menu.h
+1
-1
wl_text.c
src/wl_text.c
+5
-5
No files found.
src/Makefile
View file @
4e05fcd2
CC
=
gcc
CFLAGS
=
-Wall
-O6
-fomit-frame-pointer
-ffast-math
-funroll-loops
-mpentiumpro
-mcpu
=
pentiumpro
-march
=
pentiumpro
#
CFLAGS = -g -Wall
#
CFLAGS = -Wall -O6 -fomit-frame-pointer -ffast-math -funroll-loops -mpentiumpro -mcpu=pentiumpro -march=pentiumpro
CFLAGS
=
-g
-Wall
#CFLAGS = -g
#CFLAGS = -Os
OBJS
=
objs.o misc.o id_ca.o id_sd.o id_vh.o id_us.o
\
...
...
src/TODO
View file @
4e05fcd2
...
...
@@ -35,13 +35,7 @@ not leave any artifacts after a few screen redraws)
* and upload builds with lots of wl6 code anyway (sound references were just
ifndefed out)
* verify if the sounds and graphics are correctly numbered, once again...
* find out why shareware version produces these messages:
CA_FarRead only read 471 out of 1671
Trying to free null audio chunk 207!
CA_FarRead hit EOF?
CA_FarRead hit EOF?
CA_FarRead hit EOF?
* if possible fix/or at least add ViewMap?
* add a ViewMap?
* remove the #else at the end of each header since nothing is being doubly
included now (if ever)
* especially with the video functions, there are functions/defines which
...
...
src/audiosdm.h
View file @
4e05fcd2
...
...
@@ -101,7 +101,6 @@ typedef enum {
//
#define STARTPCSOUNDS 0
#define STARTADLIBSOUNDS 81
#define STARTDIGISOUNDS 162
#define STARTMUSIC 243
//
...
...
src/audiosod.h
View file @
4e05fcd2
...
...
@@ -101,7 +101,6 @@ typedef enum {
//
#define STARTPCSOUNDS 0
#define STARTADLIBSOUNDS 81
#define STARTDIGISOUNDS 162
#define STARTMUSIC 243
//
...
...
src/audiowl1.h
View file @
4e05fcd2
...
...
@@ -5,8 +5,8 @@
//
/////////////////////////////////////////////////
#define NUMSOUNDS
69
#define NUMSNDCHUNKS 2
34
#define NUMSOUNDS
87
#define NUMSNDCHUNKS 2
88
//
// Sound names & indexes
...
...
@@ -91,9 +91,8 @@ typedef enum {
// Base offsets
//
#define STARTPCSOUNDS 0
#define STARTADLIBSOUNDS 69
#define STARTDIGISOUNDS 138
#define STARTMUSIC 207
#define STARTADLIBSOUNDS 87
#define STARTMUSIC 261
//
// Music names & indexes
...
...
@@ -129,8 +128,9 @@ typedef enum {
LASTMUSIC
}
musicnames
;
#define WARMARCH_MUS GETOUT_MUS // TODO: correct?
#define PACMAN_MUS WARMRCH1_MUS // Just changed the values to correspond to wl6
/* TOD: correct? Just changed values to corresspond to wl6 */
#define WARMARCH_MUS GETOUT_MUS
#define PACMAN_MUS WARMRCH1_MUS
/////////////////////////////////////////////////
//
...
...
src/audiowl6.h
View file @
4e05fcd2
...
...
@@ -107,7 +107,6 @@ typedef enum {
//
#define STARTPCSOUNDS 0
#define STARTADLIBSOUNDS 87
#define STARTDIGISOUNDS 174
#define STARTMUSIC 261
//
...
...
src/gfxv_wl1.h
View file @
4e05fcd2
...
...
@@ -182,11 +182,10 @@ typedef enum {
#define LATCHPICS_LUMP_START 103
#define LATCHPICS_LUMP_END 146
//
// Amount of each data item
//
#define NUMCHUNKS
5
56
#define NUMCHUNKS
1
56
#define NUMFONT 2
#define NUMFONTM 0
#define NUMPICS 144
...
...
src/id_ca.c
View file @
4e05fcd2
...
...
@@ -603,7 +603,9 @@ void CAL_SetupMapFile (void)
length
=
filelength
(
handle
);
MM_GetPtr
((
memptr
)
&
tinf
,
length
);
CA_FarRead
(
handle
,
tinf
,
length
);
close
(
handle
);
//
...
...
@@ -655,7 +657,7 @@ void CAL_SetupMapFile (void)
void
CAL_SetupAudioFile
(
void
)
{
int
handle
;
int
handle
,
i
;
long
length
;
char
fname
[
13
];
...
...
@@ -670,10 +672,13 @@ void CAL_SetupAudioFile (void)
CA_CannotOpen
(
fname
);
length
=
filelength
(
handle
);
MM_GetPtr
((
memptr
)
&
audiostarts
,
length
);
MM_GetPtr
((
memptr
)
&
audiostarts
,
length
);
CA_FarRead
(
handle
,
(
byte
*
)
audiostarts
,
length
);
close
(
handle
);
for
(
i
=
0
;
i
<
length
/
4
;
i
++
)
printf
(
"chunk %03d: %08ld
\n
"
,
i
,
audiostarts
[
i
]);
//
// open the data file
//
...
...
@@ -741,7 +746,7 @@ void CA_Shutdown (void)
void
CA_CacheAudioChunk
(
int
chunk
)
{
long
pos
,
compressed
;
long
pos
,
length
;
if
(
audiosegs
[
chunk
])
{
...
...
@@ -754,13 +759,13 @@ void CA_CacheAudioChunk(int chunk)
// a larger buffer
//
pos
=
audiostarts
[
chunk
];
compressed
=
audiostarts
[
chunk
+
1
]
-
pos
;
length
=
audiostarts
[
chunk
+
1
]
-
pos
;
lseek
(
audiohandle
,
pos
,
SEEK_SET
);
lseek
(
audiohandle
,
pos
,
SEEK_SET
);
MM_GetPtr
((
memptr
)
&
audiosegs
[
chunk
],
compressed
);
MM_GetPtr
((
memptr
)
&
audiosegs
[
chunk
],
length
);
CA_FarRead
(
audiohandle
,
audiosegs
[
chunk
],
compressed
);
CA_FarRead
(
audiohandle
,
audiosegs
[
chunk
],
length
);
}
void
CA_UnCacheAudioChunk
(
int
chunk
)
...
...
@@ -997,7 +1002,9 @@ void CA_CacheScreen(int chunk)
MM_GetPtr
(
&
bigbufferseg
,
compressed
);
MM_SetLock
(
&
bigbufferseg
,
true
);
CA_FarRead
(
grhandle
,
bigbufferseg
,
compressed
);
source
=
bigbufferseg
;
expanded
=
*
(
long
*
)
source
;
...
...
@@ -1057,10 +1064,10 @@ void CA_CacheMap(int mapnum)
CA_FarRead
(
maphandle
,(
byte
*
)
source
,
compressed
);
/*
//
unhuffman, then unRLEW
//
The huffman'd chunk has a two byte expanded length first
//
The resulting RLEW chunk also does, even though it's not really
//
needed
unhuffman, then unRLEW
The huffman'd chunk has a two byte expanded length first
The resulting RLEW chunk also does, even though it's not really
needed
*/
expanded
=
*
source
;
source
++
;
...
...
src/id_us.c
View file @
4e05fcd2
...
...
@@ -12,7 +12,7 @@ word WindowX,WindowY,WindowW,WindowH;
static
boolean
US_Started
;
void
(
*
USL_MeasureString
)(
char
*
,
word
*
,
word
*
)
=
VW_MeasurePropString
,
(
*
USL_DrawString
)(
char
*
)
=
VW
B
_DrawPropString
;
(
*
USL_DrawString
)(
char
*
)
=
VW_DrawPropString
;
HighScore
Scores
[
MaxScores
]
=
{
{
"id software-'92"
,
10000
,
1
},
...
...
@@ -212,7 +212,7 @@ void US_CPrint(char *str)
///////////////////////////////////////////////////////////////////////////
void
US_ClearWindow
(
void
)
{
VW
B
_Bar
(
WindowX
,
WindowY
,
WindowW
,
WindowH
,
WHITE
);
VW_Bar
(
WindowX
,
WindowY
,
WindowW
,
WindowH
,
WHITE
);
PrintX
=
WindowX
;
PrintY
=
WindowY
;
}
...
...
src/id_vh.c
View file @
4e05fcd2
...
...
@@ -6,7 +6,7 @@
pictabletype
*
pictable
;
int
px
,
py
;
int
px
,
py
;
byte
fontcolor
,
backcolor
;
int
fontnumber
;
...
...
@@ -60,14 +60,6 @@ void VW_MeasurePropString (char *string, word *width, word *height)
VWL_MeasureString
(
string
,
width
,
height
,(
fontstruct
*
)
grsegs
[
STARTFONT
+
fontnumber
]);
}
/*
=============================================================================
Double buffer management routines
=============================================================================
*/
void
VWB_DrawTile8
(
int
x
,
int
y
,
int
tile
)
{
VL_MemToScreen
(
grsegs
[
STARTTILE8
]
+
(
tile
*
64
),
8
,
8
,
x
,
y
);
...
...
@@ -86,31 +78,6 @@ void VWB_DrawPic(int x, int y, int chunknum)
VL_MemToScreen
(
grsegs
[
chunknum
],
width
,
height
,
x
,
y
);
}
void
VWB_DrawPropString
(
char
*
string
)
{
VW_DrawPropString
(
string
);
}
void
VWB_Bar
(
int
x
,
int
y
,
int
width
,
int
height
,
int
color
)
{
VW_Bar
(
x
,
y
,
width
,
height
,
color
);
}
void
VWB_Plot
(
int
x
,
int
y
,
int
color
)
{
VW_Plot
(
x
,
y
,
color
);
}
void
VWB_Hlin
(
int
x1
,
int
x2
,
int
y
,
int
color
)
{
VW_Hlin
(
x1
,
x2
,
y
,
color
);
}
void
VWB_Vlin
(
int
y1
,
int
y2
,
int
x
,
int
color
)
{
VW_Vlin
(
y1
,
y2
,
x
,
color
);
}
/*
=====================
=
...
...
@@ -124,8 +91,6 @@ void LatchDrawPic(unsigned x, unsigned y, unsigned picnum)
VWB_DrawPic
(
x
*
8
,
y
+
160
,
picnum
);
}
/* ======================================================================== */
/*
===================
=
...
...
@@ -200,7 +165,6 @@ boolean FizzleFade(unsigned xx, unsigned yy, unsigned width,unsigned height, uns
}
while
(
1
);
}
/*
=================
=
...
...
src/id_vh.h
View file @
4e05fcd2
...
...
@@ -30,12 +30,6 @@ void VW_UpdateScreen (void);
void
VWB_DrawTile8
(
int
x
,
int
y
,
int
tile
);
void
VWB_DrawPic
(
int
x
,
int
y
,
int
chunknum
);
void
VWB_Bar
(
int
x
,
int
y
,
int
width
,
int
height
,
int
color
);
void
VWB_DrawPropString
(
char
*
string
);
void
VWB_Plot
(
int
x
,
int
y
,
int
color
);
void
VWB_Hlin
(
int
x1
,
int
x2
,
int
y
,
int
color
);
void
VWB_Vlin
(
int
y1
,
int
y2
,
int
x
,
int
color
);
extern
byte
gamepal
[];
extern
boolean
screenfaded
;
...
...
@@ -51,6 +45,8 @@ extern boolean screenfaded;
#define VW_FadeOut() VL_FadeOut(0,255,0,0,0,30);
void
VW_MeasurePropString
(
char
*
string
,
word
*
width
,
word
*
height
);
void
VW_DrawPropString
(
char
*
string
);
boolean
FizzleFade
(
unsigned
xoffset
,
unsigned
yoffset
,
unsigned
width
,
unsigned
height
,
unsigned
frames
,
boolean
abortable
);
void
VL_FadeOut
(
int
start
,
int
end
,
int
red
,
int
green
,
int
blue
,
int
steps
);
...
...
src/version.h
View file @
4e05fcd2
...
...
@@ -6,7 +6,7 @@
/* SDM = 2 */
/* SOD = 3 */
#ifndef WMODE
#define WMODE
1
#define WMODE
3
#endif
#if WMODE == 0
...
...
src/wl_debug.c
View file @
4e05fcd2
...
...
@@ -202,11 +202,11 @@ static char buf[10];
v2 -= 128;
v2 /= 4;
if (v2 < 0)
VW
B
_Vlin(WindowY + WindowH - 32 + v2,
VW_Vlin(WindowY + WindowH - 32 + v2,
WindowY + WindowH - 32,
WindowX + 8 + (j / 32),BLACK);
else
VW
B
_Vlin(WindowY + WindowH - 32,
VW_Vlin(WindowY + WindowH - 32,
WindowY + WindowH - 32 + v2,
WindowX + 8 + (j / 32),BLACK);
}
...
...
src/wl_game.c
View file @
4e05fcd2
...
...
@@ -737,11 +737,11 @@ void DrawPlayBorderSides (void)
xl
=
160
-
viewwidth
/
2
;
yl
=
(
200
-
STATUSLINES
-
viewheight
)
/
2
;
VW
B
_Bar
(
0
,
0
,
xl
-
1
,
200
-
STATUSLINES
,
127
);
VW
B
_Bar
(
xl
+
viewwidth
+
1
,
0
,
xl
-
2
,
200
-
STATUSLINES
,
127
);
VW_Bar
(
0
,
0
,
xl
-
1
,
200
-
STATUSLINES
,
127
);
VW_Bar
(
xl
+
viewwidth
+
1
,
0
,
xl
-
2
,
200
-
STATUSLINES
,
127
);
VW
B
_Vlin
(
yl
-
1
,
yl
+
viewheight
,
xl
-
1
,
0
);
VW
B
_Vlin
(
yl
-
1
,
yl
+
viewheight
,
xl
+
viewwidth
,
125
);
VW_Vlin
(
yl
-
1
,
yl
+
viewheight
,
xl
-
1
,
0
);
VW_Vlin
(
yl
-
1
,
yl
+
viewheight
,
xl
+
viewwidth
,
125
);
}
...
...
@@ -782,17 +782,17 @@ void DrawPlayBorder (void)
{
int
xl
,
yl
;
VW
B
_Bar
(
0
,
0
,
320
,
200
-
STATUSLINES
,
127
);
VW_Bar
(
0
,
0
,
320
,
200
-
STATUSLINES
,
127
);
xl
=
160
-
viewwidth
/
2
;
yl
=
(
200
-
STATUSLINES
-
viewheight
)
/
2
;
VW
B
_Bar
(
xl
,
yl
,
viewwidth
,
viewheight
,
0
);
VW_Bar
(
xl
,
yl
,
viewwidth
,
viewheight
,
0
);
VW
B
_Hlin
(
xl
-
1
,
xl
+
viewwidth
,
yl
-
1
,
0
);
VW
B
_Hlin
(
xl
-
1
,
xl
+
viewwidth
,
yl
+
viewheight
,
125
);
VW
B
_Vlin
(
yl
-
1
,
yl
+
viewheight
,
xl
-
1
,
0
);
VW
B
_Vlin
(
yl
-
1
,
yl
+
viewheight
,
xl
+
viewwidth
,
125
);
VW
B
_Plot
(
xl
-
1
,
yl
+
viewheight
,
124
);
VW_Hlin
(
xl
-
1
,
xl
+
viewwidth
,
yl
-
1
,
0
);
VW_Hlin
(
xl
-
1
,
xl
+
viewwidth
,
yl
+
viewheight
,
125
);
VW_Vlin
(
yl
-
1
,
yl
+
viewheight
,
xl
-
1
,
0
);
VW_Vlin
(
yl
-
1
,
yl
+
viewheight
,
xl
+
viewwidth
,
125
);
VW_Plot
(
xl
-
1
,
yl
+
viewheight
,
124
);
}
...
...
src/wl_inter.c
View file @
4e05fcd2
...
...
@@ -68,7 +68,7 @@ void EndSpear(void)
PrintX
=
0
;
PrintY
=
180
;
VW
B
_Bar
(
0
,
180
,
320
,
20
,
0
);
VW_Bar
(
0
,
180
,
320
,
20
,
0
);
US_CPrint
(
STR_ENDGAME3
"
\n
"
);
US_CPrint
(
STR_ENDGAME4
);
VW_UpdateScreen
();
...
...
@@ -123,7 +123,7 @@ void Victory (void)
CA_CacheGrChunk
(
BJCOLLAPSE3PIC
);
CA_CacheGrChunk
(
BJCOLLAPSE4PIC
);
VW
B
_Bar
(
0
,
0
,
320
,
200
,
VIEWCOLOR
);
VW_Bar
(
0
,
0
,
320
,
200
,
VIEWCOLOR
);
VWB_DrawPic
(
124
,
44
,
BJCOLLAPSE1PIC
);
VW_UpdateScreen
();
VW_FadeIn
();
...
...
@@ -150,7 +150,7 @@ void Victory (void)
CacheLump
(
LEVELEND_LUMP_START
,
LEVELEND_LUMP_END
);
CA_CacheGrChunk
(
STARTFONT
);
VW
B
_Bar
(
0
,
0
,
320
,
200
-
STATUSLINES
,
127
);
VW_Bar
(
0
,
0
,
320
,
200
-
STATUSLINES
,
127
);
Write
(
18
,
2
,
STR_YOUWIN
);
...
...
@@ -255,7 +255,7 @@ void Victory (void)
void
PG13
(
void
)
{
VW_FadeOut
();
VW
B
_Bar
(
0
,
0
,
320
,
200
,
0x82
);
// background
VW_Bar
(
0
,
0
,
320
,
200
,
0x82
);
// background
CA_CacheGrChunk
(
PG13PIC
);
VWB_DrawPic
(
216
,
110
,
PG13PIC
);
...
...
@@ -498,7 +498,7 @@ void LevelCompleted()
CacheLump
(
LEVELEND_LUMP_START
,
LEVELEND_LUMP_END
);
ClearSplitVWB
();
// set up for double buffering in split screen
VW
B
_Bar
(
0
,
0
,
320
,
200
-
STATUSLINES
,
127
);
VW_Bar
(
0
,
0
,
320
,
200
-
STATUSLINES
,
127
);
StartCPMusic
(
ENDLEVEL_MUS
);
//
...
...
@@ -862,11 +862,11 @@ boolean PreloadUpdate(unsigned current, unsigned total)
{
int
w
=
WindowW
-
10
;
VW
B
_Bar
(
WindowX
+
5
,
WindowY
+
WindowH
-
3
,
w
,
2
,
BLACK
);
VW_Bar
(
WindowX
+
5
,
WindowY
+
WindowH
-
3
,
w
,
2
,
BLACK
);
w
=
(
w
*
current
)
/
total
;
if
(
w
)
{
VW
B
_Bar
(
WindowX
+
5
,
WindowY
+
WindowH
-
3
,
w
,
2
,
0x37
);
VW
B
_Bar
(
WindowX
+
5
,
WindowY
+
WindowH
-
3
,
w
-
1
,
1
,
0x32
);
VW_Bar
(
WindowX
+
5
,
WindowY
+
WindowH
-
3
,
w
,
2
,
0x37
);
VW_Bar
(
WindowX
+
5
,
WindowY
+
WindowH
-
3
,
w
-
1
,
1
,
0x32
);
}
VW_UpdateScreen
();
...
...
@@ -878,7 +878,7 @@ void PreloadGraphics()
DrawLevel
();
ClearSplitVWB
();
VW
B
_Bar
(
0
,
0
,
320
,
200
-
STATUSLINES
,
127
);
VW_Bar
(
0
,
0
,
320
,
200
-
STATUSLINES
,
127
);
VWB_DrawPic
(
48
,
56
,
GETPSYCHEDPIC
);
...
...
@@ -1089,7 +1089,7 @@ void CheckHighScore (long score,word other)
#else
PrintX
=
16
;
fontnumber
=
1
;
VW
B_Bar
(
PrintX
-
2
,
PrintY
-
2
,
145
,
15
,
0x9c
);
VW
_Bar
(
PrintX
-
2
,
PrintY
-
2
,
145
,
15
,
0x9c
);
VW_UpdateScreen
();
backcolor
=
0x9c
;
fontcolor
=
15
;
...
...
src/wl_menu.c
View file @
4e05fcd2
...
...
@@ -1388,7 +1388,7 @@ int CP_SaveGame(int quick)
fontnumber
=
0
;
if
(
!
SaveGamesAvail
[
which
])
VW
B
_Bar
(
LSM_X
+
LSItems
.
indent
+
1
,
LSM_Y
+
which
*
13
+
1
,
LSM_W
-
LSItems
.
indent
-
16
,
10
,
BKGDCOLOR
);
VW_Bar
(
LSM_X
+
LSItems
.
indent
+
1
,
LSM_Y
+
which
*
13
+
1
,
LSM_W
-
LSItems
.
indent
-
16
,
10
,
BKGDCOLOR
);
VW_UpdateScreen
();
if
(
US_LineInput
(
LSM_X
+
LSItems
.
indent
+
2
,
LSM_Y
+
which
*
13
+
1
,
input
,
input
,
true
,
31
,
LSM_W
-
LSItems
.
indent
-
30
))
...
...
@@ -1411,7 +1411,7 @@ int CP_SaveGame(int quick)
}
else
{
VW
B
_Bar
(
LSM_X
+
LSItems
.
indent
+
1
,
LSM_Y
+
which
*
13
+
1
,
LSM_W
-
LSItems
.
indent
-
16
,
10
,
BKGDCOLOR
);
VW_Bar
(
LSM_X
+
LSItems
.
indent
+
1
,
LSM_Y
+
which
*
13
+
1
,
LSM_W
-
LSItems
.
indent
-
16
,
10
,
BKGDCOLOR
);
PrintLSEntry
(
which
,
HIGHLIGHT
);
VW_UpdateScreen
();
SD_PlaySound
(
ESCPRESSEDSND
);
...
...
@@ -1614,10 +1614,10 @@ void DrawMouseSens(void)
PrintX
=
269
;
US_Print
(
STR_FAST
);
VW
B
_Bar
(
60
,
97
,
200
,
10
,
TEXTCOLOR
);
VW_Bar
(
60
,
97
,
200
,
10
,
TEXTCOLOR
);
DrawOutline
(
60
,
97
,
200
,
10
,
0
,
HIGHLIGHT
);
DrawOutline
(
60
+
20
*
mouseadjustment
,
97
,
20
,
10
,
0
,
READCOLOR
);
VW
B
_Bar
(
61
+
20
*
mouseadjustment
,
98
,
19
,
9
,
READHCOLOR
);
VW_Bar
(
61
+
20
*
mouseadjustment
,
98
,
19
,
9
,
READHCOLOR
);
VW_UpdateScreen
();
MenuFadeIn
();
...
...
@@ -1646,10 +1646,10 @@ void MouseSensitivity(void)
if
(
mouseadjustment
)
{
mouseadjustment
--
;
VW
B
_Bar
(
60
,
97
,
200
,
10
,
TEXTCOLOR
);
VW_Bar
(
60
,
97
,
200
,
10
,
TEXTCOLOR
);
DrawOutline
(
60
,
97
,
200
,
10
,
0
,
HIGHLIGHT
);
DrawOutline
(
60
+
20
*
mouseadjustment
,
97
,
20
,
10
,
0
,
READCOLOR
);
VW
B
_Bar
(
61
+
20
*
mouseadjustment
,
98
,
19
,
9
,
READHCOLOR
);
VW_Bar
(
61
+
20
*
mouseadjustment
,
98
,
19
,
9
,
READHCOLOR
);
VW_UpdateScreen
();
SD_PlaySound
(
MOVEGUN1SND
);
while
(
Keyboard
[
sc_LeftArrow
])
IN_CheckAck
();
...
...
@@ -1662,10 +1662,10 @@ void MouseSensitivity(void)
if
(
mouseadjustment
<
9
)
{
mouseadjustment
++
;
VW
B
_Bar
(
60
,
97
,
200
,
10
,
TEXTCOLOR
);
VW_Bar
(
60
,
97
,
200
,
10
,
TEXTCOLOR
);
DrawOutline
(
60
,
97
,
200
,
10
,
0
,
HIGHLIGHT
);
DrawOutline
(
60
+
20
*
mouseadjustment
,
97
,
20
,
10
,
0
,
READCOLOR
);
VW
B
_Bar
(
61
+
20
*
mouseadjustment
,
98
,
19
,
9
,
READHCOLOR
);
VW_Bar
(
61
+
20
*
mouseadjustment
,
98
,
19
,
9
,
READHCOLOR
);
VW_UpdateScreen
();
SD_PlaySound
(
MOVEGUN1SND
);
while
(
Keyboard
[
sc_RightArrow
])
IN_CheckAck
();
...
...
@@ -1950,7 +1950,7 @@ void EnterCtrlData(int index,CustomCtrls *cust,void (*DrawRtn)(int),void (*Print
switch
(
tick
)
{
case
0
:
VW
B
_Bar
(
x
,
PrintY
+
1
,
CST_SPC
-
2
,
10
,
TEXTCOLOR
);
VW_Bar
(
x
,
PrintY
+
1
,
CST_SPC
-
2
,
10
,
TEXTCOLOR
);
break
;
case
1
:
PrintX
=
x
;
...
...
@@ -2116,14 +2116,14 @@ void FixupCustom(int w)
int
y
=
CST_Y
+
26
+
w
*
13
;
VW
B
_Hlin
(
7
,
32
,
y
-
1
,
DEACTIVE
);
VW
B
_Hlin
(
7
,
32
,
y
+
12
,
BORD2COLOR
);
VW_Hlin
(
7
,
32
,
y
-
1
,
DEACTIVE
);
VW_Hlin
(
7
,
32
,
y
+
12
,
BORD2COLOR
);
#ifndef SPEAR
VW
B
_Hlin
(
7
,
32
,
y
-
2
,
BORDCOLOR
);
VW
B
_Hlin
(
7
,
32
,
y
+
13
,
BORDCOLOR
);
VW_Hlin
(
7
,
32
,
y
-
2
,
BORDCOLOR
);
VW_Hlin
(
7
,
32
,
y
+
13
,
BORDCOLOR
);
#else
VW
B
_Hlin
(
7
,
32
,
y
-
2
,
BORD2COLOR
);
VW
B
_Hlin
(
7
,
32
,
y
+
13
,
BORD2COLOR
);
VW_Hlin
(
7
,
32
,
y
-
2
,
BORD2COLOR
);
VW_Hlin
(
7
,
32
,
y
+
13
,
BORD2COLOR
);
#endif
switch
(
w
)
...
...
@@ -2138,14 +2138,14 @@ void FixupCustom(int w)
if
(
lastwhich
>=
0
)
{
y
=
CST_Y
+
26
+
lastwhich
*
13
;
VW
B
_Hlin
(
7
,
32
,
y
-
1
,
DEACTIVE
);
VW
B
_Hlin
(
7
,
32
,
y
+
12
,
BORD2COLOR
);
VW_Hlin
(
7
,
32
,
y
-
1
,
DEACTIVE
);
VW_Hlin
(
7
,
32
,
y
+
12
,
BORD2COLOR
);
#ifndef SPEAR
VW
B
_Hlin
(
7
,
32
,
y
-
2
,
BORDCOLOR
);
VW
B
_Hlin
(
7
,
32
,
y
+
13
,
BORDCOLOR
);
VW_Hlin
(
7
,
32
,
y
-
2
,
BORDCOLOR
);
VW_Hlin
(
7
,
32
,
y
+
13
,
BORDCOLOR
);
#else
VW
B
_Hlin
(
7
,
32
,
y
-
2
,
BORD2COLOR
);
VW
B
_Hlin
(
7
,
32
,
y
+
13
,
BORD2COLOR
);
VW_Hlin
(
7
,
32
,
y
-
2
,
BORD2COLOR
);
VW_Hlin
(
7
,
32
,
y
+
13
,
BORD2COLOR
);
#endif
if
(
lastwhich
!=
w
)
...
...
@@ -2493,7 +2493,7 @@ void CP_ChangeView(void)
//
void
DrawChangeView
(
int
view
)
{
VW
B
_Bar
(
0
,
160
,
320
,
40
,
VIEWCOLOR
);
VW_Bar
(
0
,
160
,
320
,
40
,
VIEWCOLOR
);
ShowViewSize
(
view
);
PrintY
=
161
;
...
...
@@ -2546,7 +2546,7 @@ void CP_Quit(void)
void
ClearMScreen
(
void
)
{
#ifndef SPEAR
VW
B
_Bar
(
0
,
0
,
320
,
200
,
BORDCOLOR
);
VW_Bar
(
0
,
0
,
320
,
200
,
BORDCOLOR
);
#else
VWB_DrawPic
(
0
,
0
,
C_BACKDROPPIC
);
#endif
...
...
@@ -2583,16 +2583,16 @@ void UnCacheLump(int lumpstart, int lumpend)
////////////////////////////////////////////////////////////////////
void
DrawWindow
(
int
x
,
int
y
,
int
w
,
int
h
,
int
wcolor
)
{
VW
B
_Bar
(
x
,
y
,
w
,
h
,
wcolor
);
VW_Bar
(
x
,
y
,
w
,
h
,
wcolor
);
DrawOutline
(
x
,
y
,
w
,
h
,
BORD2COLOR
,
DEACTIVE
);
}
void
DrawOutline
(
int
x
,
int
y
,
int
w
,
int
h
,
int
color1
,
int
color2
)
{
VW
B
_Hlin
(
x
,
x
+
w
,
y
,
color2
);
VW
B
_Vlin
(
y
,
y
+
h
,
x
,
color2
);
VW
B
_Hlin
(
x
,
x
+
w
,
y
+
h
,
color1
);
VW
B
_Vlin
(
y
,
y
+
h
,
x
+
w
,
color1
);
VW_Hlin
(
x
,
x
+
w
,
y
,
color2
);
VW_Vlin
(
y
,
y
+
h
,
x
,
color2
);
VW_Hlin
(
x
,
x
+
w
,
y
+
h
,
color1
);
VW_Vlin
(
y
,
y
+
h
,
x
+
w
,
color1
);
}
...
...
@@ -2916,7 +2916,7 @@ int HandleMenu(CP_iteminfo *item_i,CP_itemtype *items,void (*routine)(int w))
//
if
(
lastitem
!=
which
)
{
VW
B
_Bar
(
x
-
1
,
y
,
25
,
16
,
BKGDCOLOR
);
VW_Bar
(
x
-
1
,
y
,
25
,
16
,
BKGDCOLOR
);
PrintX
=
item_i
->
x
+
item_i
->
indent
;
PrintY
=
item_i
->
y
+
which
*
13
;
US_Print
((
items
+
which
)
->
string
);
...
...
@@ -2960,7 +2960,7 @@ int HandleMenu(CP_iteminfo *item_i,CP_itemtype *items,void (*routine)(int w))
//
void
EraseGun
(
CP_iteminfo
*
item_i
,
CP_itemtype
*
items
,
int
x
,
int
y
,
int
which
)
{
VW
B
_Bar
(
x
-
1
,
y
,
25
,
16
,
BKGDCOLOR
);
VW_Bar
(
x
-
1
,
y
,
25
,
16
,
BKGDCOLOR
);
SetMenuTextColor
(
items
+
which
,
0
);
PrintX
=
item_i
->
x
+
item_i
->
indent
;
...
...
@@ -2988,7 +2988,7 @@ void DrawHalfStep(int x,int y)
//
void
DrawGun
(
CP_iteminfo
*
item_i
,
CP_itemtype
*
items
,
int
x
,
int
*
y
,
int
which
,
int
basey
,
void
(
*
routine
)(
int
w
))
{
VW
B
_Bar
(
x
-
1
,
*
y
,
25
,
16
,
BKGDCOLOR
);
VW_Bar
(
x
-
1
,
*
y
,
25
,
16
,
BKGDCOLOR
);
*
y
=
basey
+
which
*
13
;
VWB_DrawPic
(
x
,
*
y
,
C_CURSOR1PIC
);
SetMenuTextColor
(
items
+
which
,
1
);
...
...
@@ -3137,7 +3137,7 @@ int Confirm(char *string)
switch
(
tick
)
{
case
0
:
VW
B
_Bar
(
x
,
y
,
8
,
13
,
TEXTCOLOR
);
VW_Bar
(
x
,
y
,
8
,
13
,
TEXTCOLOR
);
break
;
case
1
:
PrintX
=
x
;
...
...
@@ -3301,11 +3301,11 @@ void DrawMenuGun(CP_iteminfo *iteminfo)
void
DrawStripes
(
int
y
)
{
#ifndef SPEAR
VW
B
_Bar
(
0
,
y
,
320
,
24
,
0
);
VW
B
_Hlin
(
0
,
319
,
y
+
22
,
STRIPE
);
VW_Bar
(
0
,
y
,
320
,
24
,
0
);
VW_Hlin
(
0
,
319
,
y
+
22
,
STRIPE
);
#else
VW
B
_Bar
(
0
,
y
,
320
,
22
,
0
);
VW
B
_Hlin
(
0
,
319
,
y
+
23
,
0
);
VW_Bar
(
0
,
y
,
320
,
22
,
0
);
VW_Hlin
(
0
,
319
,
y
+
23
,
0
);
#endif
}
...
...
src/wl_menu.h
View file @
4e05fcd2
...
...
@@ -45,7 +45,7 @@
#define MENU_X 76
#define MENU_Y 55
#define MENU_W 178
#if
ndef SPEAR
#if
defined(UPLOAD) || (!defined(GOODTIMES) && !defined(SPEAR))
#define MENU_H 13*10+6
#else
#define MENU_H 13*9+6
...
...
src/wl_text.c
View file @
4e05fcd2
...
...
@@ -193,7 +193,7 @@ void HandleCommand (void)
picx
=
ParseNumber
();
picwidth
=
ParseNumber
();
picheight
=
ParseNumber
();
VW
B
_Bar
(
picx
,
picy
,
picwidth
,
picheight
,
BACKCOLOR
);
VW_Bar
(
picx
,
picy
,
picwidth
,
picheight
,
BACKCOLOR
);
RipToEOL
();
break
;
case
';'
:
// comment
...
...
@@ -382,7 +382,7 @@ void HandleWord()
// print it
//
newpos
=
px
+
wwidth
;
VW
B
_DrawPropString
(
words
);
VW_DrawPropString
(
words
);
px
=
newpos
;
//
...
...
@@ -418,7 +418,7 @@ void PageLayout (boolean shownumber)
//
// clear the screen
//
VW
B
_Bar
(
0
,
0
,
320
,
200
,
BACKCOLOR
);
VW_Bar
(
0
,
0
,
320
,
200
,
BACKCOLOR
);
VWB_DrawPic
(
0
,
0
,
H_TOPWINDOWPIC
);
VWB_DrawPic
(
0
,
8
,
H_LEFTWINDOWPIC
);
VWB_DrawPic
(
312
,
8
,
H_RIGHTWINDOWPIC
);
...
...
@@ -485,7 +485,7 @@ void PageLayout (boolean shownumber)
strcat
(
str
,
str2
);
fontcolor
=
0x4f
;
//12^BACKCOLOR;
VW
B
_DrawPropString
(
str
);
VW_DrawPropString
(
str
);
}
fontcolor
=
oldfontcolor
;
...
...
@@ -601,7 +601,7 @@ void ShowArticle(char *article)
fontnumber
=
0
;
/* CA_MarkGrChunk(STARTFONT); */
CA_CacheGrChunk
(
STARTFONT
);
VW
B
_Bar
(
0
,
0
,
320
,
200
,
BACKCOLOR
);
VW_Bar
(
0
,
0
,
320
,
200
,
BACKCOLOR
);
CacheLayoutGraphics
();
newpage
=
true
;
...
...
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