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
cb67569f
Commit
cb67569f
authored
Dec 14, 2000
by
Steven Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mainly cleanups.
id_ca.c, id_vh.c: Moved CA_CacheScreen to VL_CacheScreen
parent
7b103fdd
Changes
23
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
131 additions
and
233 deletions
+131
-233
NOTES
src/NOTES
+9
-0
foreign.h
src/foreign.h
+12
-3
id_ca.c
src/id_ca.c
+0
-19
id_ca.h
src/id_ca.h
+0
-2
id_us.c
src/id_us.c
+4
-10
id_us.h
src/id_us.h
+6
-7
id_vh.c
src/id_vh.c
+7
-2
id_vh.h
src/id_vh.h
+4
-2
sd_null.c
src/sd_null.c
+0
-14
vi_null.c
src/vi_null.c
+0
-2
wl_act1.c
src/wl_act1.c
+2
-21
wl_act2.c
src/wl_act2.c
+8
-13
wl_agent.c
src/wl_agent.c
+0
-2
wl_debug.c
src/wl_debug.c
+0
-2
wl_def.h
src/wl_def.h
+0
-1
wl_draw.c
src/wl_draw.c
+8
-2
wl_game.c
src/wl_game.c
+4
-17
wl_inter.c
src/wl_inter.c
+20
-22
wl_main.c
src/wl_main.c
+2
-4
wl_menu.c
src/wl_menu.c
+24
-39
wl_play.c
src/wl_play.c
+0
-2
wl_state.c
src/wl_state.c
+7
-29
wl_text.c
src/wl_text.c
+14
-18
No files found.
src/NOTES
View file @
cb67569f
...
@@ -18,17 +18,26 @@ Just some random facts/thoughts/ideas/musings:
...
@@ -18,17 +18,26 @@ Just some random facts/thoughts/ideas/musings:
* Unofficial ports:
* Unofficial ports:
- Linux (this, xwolf, wolfgl)
- Linux (this, xwolf, wolfgl)
XWolf: http://www.sirius.demon.co.uk/xwolf/
- Amiga (port of my first pc wolf3d linux port)
- Amiga (port of my first pc wolf3d linux port)
[http://www.silab.dsi.unimi.it/~cs556770/wolf3d/]
- Windows (wolfgl) [http://www.sourceforge.net/projects/wolfgl/]
- Windows (wolfgl) [http://www.sourceforge.net/projects/wolfgl/]
- Acorn/Archemedes
- Acorn/Archemedes
* PC source released on:
* PC source released on:
- now many ports, projects, etc
- now many ports, projects, etc
- urls
- urls
- http://www.abraxis.com/brucel/wolf3d.html
- http://www.wolf3dbunker.com
* Macintosh source released January 22(?), 2000
* Macintosh source released January 22(?), 2000
- url
- url
* TED source (editor used for tons of games including wolf3d)
* TED source (editor used for tons of games including wolf3d)
* Games which used the Wolfenstein 3D Engine:
- Blake Stone
- Corridor 7
- Operation Body Count
Wolfenstein 3D was originally planned to be a much more complex game. ...
Wolfenstein 3D was originally planned to be a much more complex game. ...
... lots of unused code ... possibly from previous projects and incarnations
... lots of unused code ... possibly from previous projects and incarnations
of wolf3d.
of wolf3d.
...
...
src/foreign.h
View file @
cb67569f
#ifndef __FOREIGN_H__
#ifndef __FOREIGN_H__
#define __FOREIGN_H__
#define __FOREIGN_H__
#define QUITSUR "Are you sure you want\n"\
"to quit this great game?"
#define CURGAME "You are currently in\n"\
#define CURGAME "You are currently in\n"\
"a game. Continuing will\n"\
"a game. Continuing will\n"\
"erase old game. Ok?"
"erase old game. Ok?"
...
@@ -126,6 +123,18 @@
...
@@ -126,6 +123,18 @@
#define STR_ENDGAME2 "You have served your country well."
#define STR_ENDGAME2 "You have served your country well."
#define STR_ENDGAME3 "With the spear gone, the Allies will finally"
#define STR_ENDGAME3 "With the spear gone, the Allies will finally"
#define STR_ENDGAME4 "by able to destroy Hitler..."
#define STR_ENDGAME4 "by able to destroy Hitler..."
#else
#define ENDSTR1 "Dost thou wish to\nleave with such hasty\nabandon?"
#define ENDSTR2 "Chickening out...\nalready?"
#define ENDSTR3 "Press N for more carnage.\nPress Y to be a weenie."
#define ENDSTR4 "So, you think you can\nquit this easily, huh?"
#define ENDSTR5 "Press N to save the world.\nPress Y to abandon it in\nits hour of need."
#define ENDSTR6 "Press N if you are brave.\nPress Y to cower in shame."
#define ENDSTR7 "Heroes, press N.\nWimps, press Y."
#define ENDSTR8 "You are at an intersection.\nA sign says, 'Press Y to quit.'\n>"
#define ENDSTR9 "For guns and glory, press N.\nFor work and worry, press Y."
#endif
#endif
#endif
#endif
src/id_ca.c
View file @
cb67569f
...
@@ -726,23 +726,6 @@ void CA_UnCacheGrChunk(int chunk)
...
@@ -726,23 +726,6 @@ void CA_UnCacheGrChunk(int chunk)
grsegs
[
chunk
]
=
0
;
grsegs
[
chunk
]
=
0
;
}
}
/*
======================
=
= CA_CacheScreen
=
= Decompresses a chunk from disk straight onto the screen
=
======================
*/
void
CA_CacheScreen
(
int
chunk
)
{
CA_CacheGrChunk
(
chunk
);
VL_MemToScreen
(
grsegs
[
chunk
],
320
,
200
,
0
,
0
);
CA_UnCacheGrChunk
(
chunk
);
}
/* ======================================================================== */
/* ======================================================================== */
/*
/*
...
@@ -750,8 +733,6 @@ void CA_CacheScreen(int chunk)
...
@@ -750,8 +733,6 @@ void CA_CacheScreen(int chunk)
=
=
= CA_CacheMap
= CA_CacheMap
=
=
= WOLF: This is specialized for a 64*64 map size
=
======================
======================
*/
*/
...
...
src/id_ca.h
View file @
cb67569f
...
@@ -48,8 +48,6 @@ void CA_UnCacheGrChunk(int chunk);
...
@@ -48,8 +48,6 @@ void CA_UnCacheGrChunk(int chunk);
void
CA_UpLevel
();
void
CA_UpLevel
();
void
CA_DownLevel
();
void
CA_DownLevel
();
void
CA_CacheScreen
(
int
chunk
);
/* ======================================================================= */
/* ======================================================================= */
void
MM_Startup
();
void
MM_Startup
();
...
...
src/id_us.c
View file @
cb67569f
/* id_us.c */
#include "id_heads.h"
#include "id_heads.h"
// Global variables
// Global variables
...
@@ -11,9 +9,6 @@ word WindowX,WindowY,WindowW,WindowH;
...
@@ -11,9 +9,6 @@ word WindowX,WindowY,WindowW,WindowH;
static
boolean
US_Started
;
static
boolean
US_Started
;
void
(
*
USL_MeasureString
)(
char
*
,
word
*
,
word
*
)
=
VW_MeasurePropString
,
(
*
USL_DrawString
)(
char
*
)
=
VW_DrawPropString
;
HighScore
Scores
[
MaxScores
]
=
{
HighScore
Scores
[
MaxScores
]
=
{
{
"id software-'92"
,
10000
,
1
},
{
"id software-'92"
,
10000
,
1
},
{
"Adrian Carmack"
,
10000
,
1
},
{
"Adrian Carmack"
,
10000
,
1
},
...
@@ -50,7 +45,7 @@ void US_Startup()
...
@@ -50,7 +45,7 @@ void US_Startup()
// US_Shutdown() - Shuts down the User Mgr
// US_Shutdown() - Shuts down the User Mgr
//
//
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
void
US_Shutdown
(
void
)
void
US_Shutdown
()
{
{
if
(
!
US_Started
)
if
(
!
US_Started
)
return
;
return
;
...
@@ -210,7 +205,7 @@ void US_CPrint(char *str)
...
@@ -210,7 +205,7 @@ void US_CPrint(char *str)
// cursor
// cursor
//
//
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
void
US_ClearWindow
(
void
)
void
US_ClearWindow
()
{
{
VW_Bar
(
WindowX
,
WindowY
,
WindowW
,
WindowH
,
WHITE
);
VW_Bar
(
WindowX
,
WindowY
,
WindowW
,
WindowH
,
WHITE
);
PrintX
=
WindowX
;
PrintX
=
WindowX
;
...
@@ -318,7 +313,7 @@ boolean US_LineInput(int x,int y,char *buf,char *def,boolean escok,
...
@@ -318,7 +313,7 @@ boolean US_LineInput(int x,int y,char *buf,char *def,boolean escok,
if
(
cursorvis
)
if
(
cursorvis
)
USL_XORICursor
(
x
,
y
,
s
,
cursor
);
USL_XORICursor
(
x
,
y
,
s
,
cursor
);
IN_CheckAck
();
/* TODO: handle events */
IN_CheckAck
();
sc
=
LastScan
;
sc
=
LastScan
;
LastScan
=
sc_None
;
LastScan
=
sc_None
;
...
@@ -465,7 +460,7 @@ boolean US_LineInput(int x,int y,char *buf,char *def,boolean escok,
...
@@ -465,7 +460,7 @@ boolean US_LineInput(int x,int y,char *buf,char *def,boolean escok,
return
(
result
);
return
(
result
);
}
}
static
const
int
rndtable
[]
=
{
static
const
int
rndtable
[
256
]
=
{
0
,
8
,
109
,
220
,
222
,
241
,
149
,
107
,
75
,
248
,
254
,
140
,
16
,
66
,
0
,
8
,
109
,
220
,
222
,
241
,
149
,
107
,
75
,
248
,
254
,
140
,
16
,
66
,
74
,
21
,
211
,
47
,
80
,
242
,
154
,
27
,
205
,
128
,
161
,
89
,
77
,
36
,
74
,
21
,
211
,
47
,
80
,
242
,
154
,
27
,
205
,
128
,
161
,
89
,
77
,
36
,
95
,
110
,
85
,
48
,
212
,
140
,
211
,
249
,
22
,
79
,
200
,
50
,
28
,
188
,
95
,
110
,
85
,
48
,
212
,
140
,
211
,
249
,
22
,
79
,
200
,
50
,
28
,
188
,
...
@@ -485,7 +480,6 @@ static const int rndtable[] ={
...
@@ -485,7 +480,6 @@ static const int rndtable[] ={
17
,
46
,
52
,
231
,
232
,
76
,
31
,
221
,
84
,
37
,
216
,
165
,
212
,
106
,
17
,
46
,
52
,
231
,
232
,
76
,
31
,
221
,
84
,
37
,
216
,
165
,
212
,
106
,
197
,
242
,
98
,
43
,
39
,
175
,
254
,
145
,
190
,
84
,
118
,
222
,
187
,
136
,
197
,
242
,
98
,
43
,
39
,
175
,
254
,
145
,
190
,
84
,
118
,
222
,
187
,
136
,
120
,
163
,
236
,
249
120
,
163
,
236
,
249
};
};
static
int
rndindex
=
0
;
static
int
rndindex
=
0
;
...
...
src/id_us.h
View file @
cb67569f
...
@@ -14,20 +14,19 @@ typedef struct {
...
@@ -14,20 +14,19 @@ typedef struct {
#define MaxString 128 // Maximum input string size
#define MaxString 128 // Maximum input string size
extern
boolean
ingame
,
// Set by game code if a game is in progress
extern
boolean
NoWait
;
loadedgame
,
// Set if the current game was loaded
NoWait
;
extern
word
PrintX
,
PrintY
;
// Current printing location in the window
extern
word
PrintX
,
PrintY
;
// Current printing location in the window
extern
word
WindowX
,
WindowY
,
// Current location of window
extern
word
WindowX
,
WindowY
,
// Current location of window
WindowW
,
WindowH
;
// Current size of window
WindowW
,
WindowH
;
// Current size of window
extern
void
(
*
USL_MeasureString
)(
char
*
,
word
*
,
word
*
),
#define USL_MeasureString VW_MeasurePropString
(
*
USL_DrawString
)(
char
*
);
#define USL_DrawString VW_DrawPropString
extern
HighScore
Scores
[];
extern
HighScore
Scores
[];
void
US_Startup
(
void
),
void
US_Startup
(),
US_Shutdown
(
void
),
US_Shutdown
(),
US_InitRndT
(
boolean
randomize
),
US_InitRndT
(
boolean
randomize
),
US_DrawWindow
(
word
x
,
word
y
,
word
w
,
word
h
),
US_DrawWindow
(
word
x
,
word
y
,
word
w
,
word
h
),
US_ClearWindow
(
void
),
US_ClearWindow
(
void
),
...
...
src/id_vh.c
View file @
cb67569f
/* id_vh.c */
#include "id_heads.h"
#include "id_heads.h"
/* ======================================================================== */
/* ======================================================================== */
...
@@ -254,3 +252,10 @@ void VL_FadeIn(int start, int end, const byte *palette, int steps)
...
@@ -254,3 +252,10 @@ void VL_FadeIn(int start, int end, const byte *palette, int steps)
VL_SetPalette
(
palette
);
VL_SetPalette
(
palette
);
screenfaded
=
false
;
screenfaded
=
false
;
}
}
void
VL_CacheScreen
(
int
chunk
)
{
CA_CacheGrChunk
(
chunk
);
VL_MemToScreen
(
grsegs
[
chunk
],
320
,
200
,
0
,
0
);
CA_UnCacheGrChunk
(
chunk
);
}
src/id_vh.h
View file @
cb67569f
...
@@ -26,7 +26,7 @@ extern byte fontcolor;
...
@@ -26,7 +26,7 @@ extern byte fontcolor;
extern
int
fontnumber
;
extern
int
fontnumber
;
extern
int
px
,
py
;
extern
int
px
,
py
;
void
VW_UpdateScreen
(
void
);
void
VW_UpdateScreen
(
);
void
VWB_DrawTile8
(
int
x
,
int
y
,
int
tile
);
void
VWB_DrawTile8
(
int
x
,
int
y
,
int
tile
);
void
VWB_DrawPic
(
int
x
,
int
y
,
int
chunknum
);
void
VWB_DrawPic
(
int
x
,
int
y
,
int
chunknum
);
...
@@ -52,6 +52,8 @@ void VL_FadeOut(int start, int end, int red, int green, int blue, int steps);
...
@@ -52,6 +52,8 @@ void VL_FadeOut(int start, int end, int red, int green, int blue, int steps);
void
VL_FadeIn
(
int
start
,
int
end
,
const
byte
*
palette
,
int
steps
);
void
VL_FadeIn
(
int
start
,
int
end
,
const
byte
*
palette
,
int
steps
);
void
LatchDrawPic
(
unsigned
x
,
unsigned
y
,
unsigned
picnum
);
void
LatchDrawPic
(
unsigned
x
,
unsigned
y
,
unsigned
picnum
);
void
LoadLatchMem
(
void
);
void
LoadLatchMem
();
void
VL_CacheScreen
(
int
chunk
);
#endif
#endif
src/sd_null.c
View file @
cb67569f
/* id_sd.c */
#include "id_heads.h"
#include "id_heads.h"
boolean
SoundSourcePresent
,
AdLibPresent
,
SoundBlasterPresent
;
boolean
SoundSourcePresent
,
AdLibPresent
,
SoundBlasterPresent
;
...
@@ -159,18 +157,6 @@ boolean SD_MusicPlaying()
...
@@ -159,18 +157,6 @@ boolean SD_MusicPlaying()
return
false
;
return
false
;
}
}
//===========================================================================
/*
==========================
=
= SetSoundLocGlobal - Sets up globalsoundx & globalsoundy and then calls
= UpdateSoundLoc() to transform that into relative channel volumes. Those
= values are then passed to the Sound Manager so that they'll be used for
= the next sound played (if possible).
=
==========================
*/
void
PlaySoundLocGlobal
(
word
s
,
fixed
gx
,
fixed
gy
)
void
PlaySoundLocGlobal
(
word
s
,
fixed
gx
,
fixed
gy
)
{
{
SD_PlaySound
(
s
);
SD_PlaySound
(
s
);
...
...
src/vi_null.c
View file @
cb67569f
/* id_vl.c */
/* input/video output "/dev/null" support */
/* input/video output "/dev/null" support */
/* this file does nothing but sit there and look pretty dumb */
/* this file does nothing but sit there and look pretty dumb */
...
...
src/wl_act1.c
View file @
cb67569f
/* wl_act1.c */
#include "wl_def.h"
#include "wl_def.h"
/*
/*
...
@@ -182,7 +180,6 @@ void SpawnStatic(int tilex, int tiley, int type)
...
@@ -182,7 +180,6 @@ void SpawnStatic(int tilex, int tiley, int type)
Quit
(
"Too many static objects!
\n
"
);
Quit
(
"Too many static objects!
\n
"
);
}
}
/*
/*
===============
===============
=
=
...
@@ -238,8 +235,6 @@ void PlaceItemType(int itemtype, int tilex, int tiley)
...
@@ -238,8 +235,6 @@ void PlaceItemType(int itemtype, int tilex, int tiley)
spot
->
itemnumber
=
statinfo
[
type
].
type
;
spot
->
itemnumber
=
statinfo
[
type
].
type
;
}
}
/*
/*
=============================================================================
=============================================================================
...
@@ -265,7 +260,6 @@ Every time a door opens or closes the areabyplayer matrix gets recalculated.
...
@@ -265,7 +260,6 @@ Every time a door opens or closes the areabyplayer matrix gets recalculated.
=============================================================================
=============================================================================
*/
*/
#define DOORWIDTH 0x7800
#define OPENTICS 300
#define OPENTICS 300
doorobj_t
doorobjlist
[
MAXDOORS
],
*
lastdoorobj
;
doorobj_t
doorobjlist
[
MAXDOORS
],
*
lastdoorobj
;
...
@@ -303,7 +297,6 @@ void RecursiveConnect(int areanumber)
...
@@ -303,7 +297,6 @@ void RecursiveConnect(int areanumber)
}
}
}
}
void
ConnectAreas
()
void
ConnectAreas
()
{
{
memset
(
areabyplayer
,
0
,
sizeof
(
areabyplayer
));
memset
(
areabyplayer
,
0
,
sizeof
(
areabyplayer
));
...
@@ -311,15 +304,12 @@ void ConnectAreas()
...
@@ -311,15 +304,12 @@ void ConnectAreas()
RecursiveConnect
(
player
->
areanumber
);
RecursiveConnect
(
player
->
areanumber
);
}
}
void
InitAreas
()
void
InitAreas
()
{
{
memset
(
areabyplayer
,
0
,
sizeof
(
areabyplayer
));
memset
(
areabyplayer
,
0
,
sizeof
(
areabyplayer
));
areabyplayer
[
player
->
areanumber
]
=
true
;
areabyplayer
[
player
->
areanumber
]
=
true
;
}
}
/*
/*
===============
===============
=
=
...
@@ -330,14 +320,13 @@ void InitAreas()
...
@@ -330,14 +320,13 @@ void InitAreas()
void
InitDoorList
()
void
InitDoorList
()
{
{
memset
(
areabyplayer
,
0
,
sizeof
(
areabyplayer
));
memset
(
areabyplayer
,
0
,
sizeof
(
areabyplayer
));
memset
(
areaconnect
,
0
,
sizeof
(
areaconnect
));
memset
(
areaconnect
,
0
,
sizeof
(
areaconnect
));
lastdoorobj
=
&
doorobjlist
[
0
];
lastdoorobj
=
&
doorobjlist
[
0
];
doornum
=
0
;
doornum
=
0
;
}
}
/*
/*
===============
===============
=
=
...
@@ -385,8 +374,6 @@ void SpawnDoor(int tilex, int tiley, boolean vertical, int lock)
...
@@ -385,8 +374,6 @@ void SpawnDoor(int tilex, int tiley, boolean vertical, int lock)
lastdoorobj
++
;
lastdoorobj
++
;
}
}
//===========================================================================
/*
/*
=====================
=====================
=
=
...
@@ -403,7 +390,6 @@ void OpenDoor(int door)
...
@@ -403,7 +390,6 @@ void OpenDoor(int door)
doorobjlist
[
door
].
action
=
dr_opening
;
// start it opening
doorobjlist
[
door
].
action
=
dr_opening
;
// start it opening
}
}
/*
/*
=====================
=====================
=
=
...
@@ -481,8 +467,6 @@ void CloseDoor(int door)
...
@@ -481,8 +467,6 @@ void CloseDoor(int door)
=
door
|
0x80
;
=
door
|
0x80
;
}
}
/*
/*
=====================
=====================
=
=
...
@@ -520,9 +504,6 @@ void OperateDoor(int door)
...
@@ -520,9 +504,6 @@ void OperateDoor(int door)
}
}
}
}
//===========================================================================
/*
/*
===============
===============
=
=
...
...
src/wl_act2.c
View file @
cb67569f
/* wl_act2.c */
#include "wl_def.h"
#include "wl_def.h"
/*
/*
...
@@ -193,15 +191,15 @@ statetype s_hboom3 = {false,SPR_HBOOM_3,6,NULL,NULL,NULL};
...
@@ -193,15 +191,15 @@ statetype s_hboom3 = {false,SPR_HBOOM_3,6,NULL,NULL,NULL};
#endif
#endif
void
T_Schabb
(
objtype
*
ob
);
void
T_Schabb
(
objtype
*
ob
);
void
T_SchabbThrow
(
objtype
*
ob
);
void
T_SchabbThrow
(
objtype
*
ob
);
void
T_Fake
(
objtype
*
ob
);
void
T_Fake
(
objtype
*
ob
);
void
T_FakeFire
(
objtype
*
ob
);
void
T_FakeFire
(
objtype
*
ob
);
void
T_Ghosts
(
objtype
*
ob
);
void
T_Ghosts
(
objtype
*
ob
);
void
A_Slurpie
(
objtype
*
ob
);
void
A_Slurpie
(
objtype
*
ob
);
void
A_HitlerMorph
(
objtype
*
ob
);
void
A_HitlerMorph
(
objtype
*
ob
);
void
A_MechaSound
(
objtype
*
ob
);
void
A_MechaSound
(
objtype
*
ob
);
/*
/*
=================
=================
...
@@ -350,9 +348,6 @@ void T_Projectile (objtype *ob)
...
@@ -350,9 +348,6 @@ void T_Projectile (objtype *ob)
}
}
/*
/*
=============================================================================
=============================================================================
...
...
src/wl_agent.c
View file @
cb67569f
/* wl_agent.c */
#include "wl_def.h"
#include "wl_def.h"
/*
/*
...
...
src/wl_debug.c
View file @
cb67569f
/* wl_debug.c */
#include "wl_def.h"
#include "wl_def.h"
/*
/*
...
...
src/wl_def.h
View file @
cb67569f
...
@@ -1056,7 +1056,6 @@ void SpawnBJVictory(void);
...
@@ -1056,7 +1056,6 @@ void SpawnBJVictory(void);
void
SpawnStand
(
enemy_t
which
,
int
tilex
,
int
tiley
,
int
dir
);
void
SpawnStand
(
enemy_t
which
,
int
tilex
,
int
tiley
,
int
dir
);
void
SpawnPatrol
(
enemy_t
which
,
int
tilex
,
int
tiley
,
int
dir
);
void
SpawnPatrol
(
enemy_t
which
,
int
tilex
,
int
tiley
,
int
dir
);
void
KillActor
(
objtype
*
ob
);
void
US_ControlPanel
(
byte
);
void
US_ControlPanel
(
byte
);
...
...
src/wl_draw.c
View file @
cb67569f
...
@@ -266,7 +266,11 @@ static int CalcRotate(objtype *ob)
...
@@ -266,7 +266,11 @@ static int CalcRotate(objtype *ob)
=====================
=====================
*/
*/
#ifdef DUMBTEST
#define MAXVISABLE 640
#else
#define MAXVISABLE 64
#define MAXVISABLE 64
#endif
typedef
struct
{
typedef
struct
{
int
viewx
;
int
viewx
;
...
@@ -1252,5 +1256,7 @@ passhoriz:
...
@@ -1252,5 +1256,7 @@ passhoriz:
xintercept
+=
xstep
;
xintercept
+=
xstep
;
goto
horizcheck
;
goto
horizcheck
;
}
}
#ifdef DUMBTEST
memset
(
spotvis
,
1
,
sizeof
(
spotvis
));
#endif
}
}
src/wl_game.c
View file @
cb67569f
/* wl_game.c */
#include "wl_def.h"
#include "wl_def.h"
/*
/*
...
@@ -477,14 +475,14 @@ void SetupGameLevel()
...
@@ -477,14 +475,14 @@ void SetupGameLevel()
//
//
// load the level
// load the level
//
//
CA_CacheMap
(
gamestate
.
mapon
+
10
*
gamestate
.
episode
);
CA_CacheMap
(
gamestate
.
mapon
+
10
*
gamestate
.
episode
);
mapon
-=
gamestate
.
episode
*
10
;
mapon
-=
gamestate
.
episode
*
10
;
mapwidth
=
mapheaderseg
[
mapon
]
->
width
;
mapwidth
=
mapheaderseg
[
mapon
]
->
width
;
mapheight
=
mapheaderseg
[
mapon
]
->
height
;
mapheight
=
mapheaderseg
[
mapon
]
->
height
;
if
(
mapwidth
!=
64
||
mapheight
!=
64
)
if
(
mapwidth
!=
64
||
mapheight
!=
64
)
Quit
(
"Map not 64*64!"
);
Quit
(
"Map not 64*64!"
);
//
//
...
@@ -503,7 +501,7 @@ void SetupGameLevel()
...
@@ -503,7 +501,7 @@ void SetupGameLevel()
(
unsigned
)
actorat
[
x
][
y
]
=
tile
;
(
unsigned
)
actorat
[
x
][
y
]
=
tile
;
}
else
{
// area floor
}
else
{
// area floor
tilemap
[
x
][
y
]
=
0
;
tilemap
[
x
][
y
]
=
0
;
(
unsigned
)
actorat
[
x
][
y
]
=
0
;
actorat
[
x
][
y
]
=
NULL
;
}
}
}
}
...
@@ -547,7 +545,7 @@ void SetupGameLevel()
...
@@ -547,7 +545,7 @@ void SetupGameLevel()
//
//
// spawn actors
// spawn actors
//
//
ScanInfoPlane
();
ScanInfoPlane
();
//
//
// take out the ambush markers
// take out the ambush markers
...
@@ -576,14 +574,7 @@ void SetupGameLevel()
...
@@ -576,14 +574,7 @@ void SetupGameLevel()
}
}
}
}
//
// have the caching manager load and purge stuff to make sure all marks
// are in memory
//
CA_LoadAllSounds
();
CA_LoadAllSounds
();
}
}
...
@@ -740,8 +731,6 @@ void FinishDemoRecord()
...
@@ -740,8 +731,6 @@ void FinishDemoRecord()
MM_FreePtr
(
&
demobuffer
);
MM_FreePtr
(
&
demobuffer
);
}
}
//==========================================================================
/*
/*
==================
==================
=
=
...
@@ -806,8 +795,6 @@ void RecordDemo()
...
@@ -806,8 +795,6 @@ void RecordDemo()
FinishDemoRecord
();
FinishDemoRecord
();
}
}
//==========================================================================
/*
/*
==================
==================
=
=
...
...
src/wl_inter.c
View file @
cb67569f
/* wl_inter.c */
#include "wl_def.h"
#include "wl_def.h"
//==========================================================================
//==========================================================================
...
@@ -23,36 +21,37 @@ void ClearSplitVWB()
...
@@ -23,36 +21,37 @@ void ClearSplitVWB()
//==========================================================================
//==========================================================================
#ifdef SPEAR
#if defined(SPEAR) && !defined(SPEARDEMO)
#ifndef SPEARDEMO
////////////////////////////////////////////////////////
////////////////////////////////////////////////////////
//
//
// End of Spear of Destiny
// End of Spear of Destiny
//
//
////////////////////////////////////////////////////////
////////////////////////////////////////////////////////
void
EndScreen
(
int
palette
,
int
screen
)
void
EndScreen
(
int
palette
,
int
screen
)
{
{
CA_CacheScreen
(
screen
);
VL_CacheScreen
(
screen
);
VW_UpdateScreen
();
VW_UpdateScreen
();
CA_CacheGrChunk
(
palette
);
CA_CacheGrChunk
(
palette
);
VL_FadeIn
(
0
,
255
,
grsegs
[
palette
],
30
);
VL_FadeIn
(
0
,
255
,
grsegs
[
palette
],
30
);
CA_UnCacheGrChunk
(
palette
);
CA_UnCacheGrChunk
(
palette
);
IN_ClearKeysDown
();
IN_Ack
();
IN_ClearKeysDown
();
VW_FadeOut
();
IN_Ack
();
VW_FadeOut
();
}
}
void
EndSpear
(
void
)
void
EndSpear
()
{
{
EndScreen
(
END1PALETTE
,
ENDSCREEN11PIC
);
EndScreen
(
END1PALETTE
,
ENDSCREEN11PIC
);
VL_CacheScreen
(
ENDSCREEN3PIC
);
VW_UpdateScreen
();
CA_CacheGrChunk
(
END3PALETTE
);
VL_FadeIn
(
0
,
255
,
grsegs
[
END3PALETTE
],
30
);
CA_UnCacheGrChunk
(
END3PALETTE
);
CA_CacheScreen
(
ENDSCREEN3PIC
);
VW_UpdateScreen
();
CA_CacheGrChunk
(
END3PALETTE
);
VL_FadeIn
(
0
,
255
,
grsegs
[
END3PALETTE
],
30
);
CA_UnCacheGrChunk
(
END3PALETTE
);
fontnumber
=
0
;
fontnumber
=
0
;
fontcolor
=
0xd0
;
fontcolor
=
0xd0
;
WindowX
=
0
;
WindowX
=
0
;
...
@@ -90,7 +89,6 @@ void EndSpear(void)
...
@@ -90,7 +89,6 @@ void EndSpear(void)
MainMenu
[
savegame
].
active
=
0
;
MainMenu
[
savegame
].
active
=
0
;
}
}
#endif
#endif
#endif
//==========================================================================
//==========================================================================
...
@@ -116,7 +114,7 @@ void Victory()
...
@@ -116,7 +114,7 @@ void Victory()
#ifdef SPEAR
#ifdef SPEAR
StartCPMusic
(
XTHEEND_MUS
);
StartCPMusic
(
XTHEEND_MUS
);
CA_CacheGrChunk
(
BJCOLLAPSE1PIC
);
CA_CacheGrChunk
(
BJCOLLAPSE1PIC
);
CA_CacheGrChunk
(
BJCOLLAPSE2PIC
);
CA_CacheGrChunk
(
BJCOLLAPSE2PIC
);
...
...
src/wl_main.c
View file @
cb67569f
/* wl_main.c */
#include "wl_def.h"
#include "wl_def.h"
/*
/*
...
@@ -1214,7 +1212,7 @@ void DemoLoop()
...
@@ -1214,7 +1212,7 @@ void DemoLoop()
CA_UnCacheGrChunk
(
TITLEPALETTE
);
CA_UnCacheGrChunk
(
TITLEPALETTE
);
#else
#else
CA_CacheScreen
(
TITLEPIC
);
VL_CacheScreen
(
TITLEPIC
);
VW_UpdateScreen
();
VW_UpdateScreen
();
VW_FadeIn
();
VW_FadeIn
();
#endif
#endif
...
@@ -1224,7 +1222,7 @@ void DemoLoop()
...
@@ -1224,7 +1222,7 @@ void DemoLoop()
//
//
// credits page
// credits page
//
//
CA_CacheScreen
(
CREDITSPIC
);
VL_CacheScreen
(
CREDITSPIC
);
VW_UpdateScreen
();
VW_UpdateScreen
();
VW_FadeIn
();
VW_FadeIn
();
if
(
IN_UserInput
(
TickBase
*
10
))
if
(
IN_UserInput
(
TickBase
*
10
))
...
...
src/wl_menu.c
View file @
cb67569f
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
//
//
// PRIVATE PROTOTYPES
// PRIVATE PROTOTYPES
//
//
void
CP_ReadThis
(
void
);
void
CP_ReadThis
();
#ifdef UPLOAD
#ifdef UPLOAD
#define STARTITEM readthis
#define STARTITEM readthis
...
@@ -17,19 +17,8 @@ void CP_ReadThis(void);
...
@@ -17,19 +17,8 @@ void CP_ReadThis(void);
#define STARTITEM newgame
#define STARTITEM newgame
#endif
#endif
char
endStrings
[
9
][
80
]
=
static
char
endStrings
[
9
][
80
]
=
{
{
#ifndef SPEAR
{
"Dost thou wish to
\n
leave with such hasty
\n
abandon?"
},
{
"Chickening out...
\n
already?"
},
{
"Press N for more carnage.
\n
Press Y to be a weenie."
},
{
"So, you think you can
\n
quit this easily, huh?"
},
{
"Press N to save the world.
\n
Press Y to abandon it in
\n
its hour of need."
},
{
"Press N if you are brave.
\n
Press Y to cower in shame."
},
{
"Heroes, press N.
\n
Wimps, press Y."
},
{
"You are at an intersection.
\n
A sign says, 'Press Y to quit.'
\n
>"
},
{
"For guns and glory, press N.
\n
For work and worry, press Y."
}
#else
ENDSTR1
,
ENDSTR1
,
ENDSTR2
,
ENDSTR2
,
ENDSTR3
,
ENDSTR3
,
...
@@ -39,7 +28,6 @@ char endStrings[9][80]=
...
@@ -39,7 +28,6 @@ char endStrings[9][80]=
ENDSTR7
,
ENDSTR7
,
ENDSTR8
,
ENDSTR8
,
ENDSTR9
ENDSTR9
#endif
};
};
CP_iteminfo
CP_iteminfo
...
@@ -155,14 +143,13 @@ CusMenu[]=
...
@@ -155,14 +143,13 @@ CusMenu[]=
{
1
,
""
,
0
},
{
1
,
""
,
0
},
{
0
,
""
,
0
},
{
0
,
""
,
0
},
{
1
,
""
,
0
}
{
1
,
""
,
0
}
}
};
;
int
color_hlite
[]
=
{
DEACTIVE
,
HIGHLIGHT
,
READHCOLOR
,
0x67
};
static
int
color_hlite
[]
=
{
DEACTIVE
,
HIGHLIGHT
,
READHCOLOR
,
0x67
};
int
color_norml
[]
=
{
DEACTIVE
,
TEXTCOLOR
,
READCOLOR
,
0x6b
};
static
int
color_norml
[]
=
{
DEACTIVE
,
TEXTCOLOR
,
READCOLOR
,
0x6b
};
int
EpisodeSelect
[
6
]
=
{
1
};
static
int
EpisodeSelect
[
6
]
=
{
1
};
int
SaveGamesAvail
[
10
],
StartGame
,
SoundStatus
=
1
,
pickquick
;
int
SaveGamesAvail
[
10
],
StartGame
,
SoundStatus
=
1
,
pickquick
;
...
@@ -328,8 +315,7 @@ void US_ControlPanel(byte scancode)
...
@@ -328,8 +315,7 @@ void US_ControlPanel(byte scancode)
{
{
which
=
HandleMenu
(
&
MainItems
,
&
MainMenu
[
0
],
NULL
);
which
=
HandleMenu
(
&
MainItems
,
&
MainMenu
[
0
],
NULL
);
#ifdef SPEAR
#if defined(SPEAR) && !defined(SPEARDEMO)
#ifndef SPEARDEMO
//
//
// EASTER EGG FOR SPEAR OF DESTINY!
// EASTER EGG FOR SPEAR OF DESTINY!
//
//
...
@@ -351,8 +337,8 @@ void US_ControlPanel(byte scancode)
...
@@ -351,8 +337,8 @@ void US_ControlPanel(byte scancode)
VW_UpdateScreen
();
VW_UpdateScreen
();
CA_CacheGrChunk
(
IDGUYSPALETTE
);
CA_CacheGrChunk
(
IDGUYSPALETTE
);
VL_FadeIn
(
0
,
255
,
grsegs
[
IDGUYSPALETTE
],
30
);
VL_FadeIn
(
0
,
255
,
grsegs
[
IDGUYSPALETTE
],
30
);
CA_UnCacheGrChunk
(
IDGUYSPALETTE
);
CA_UnCacheGrChunk
(
IDGUYSPALETTE
);
while
(
IN_KeyDown
(
sc_I
)
||
IN_KeyDown
(
sc_D
))
IN_CheckAck
();
while
(
IN_KeyDown
(
sc_I
)
||
IN_KeyDown
(
sc_D
))
IN_CheckAck
();
...
@@ -369,7 +355,6 @@ void US_ControlPanel(byte scancode)
...
@@ -369,7 +355,6 @@ void US_ControlPanel(byte scancode)
MenuFadeIn
();
MenuFadeIn
();
}
}
#endif
#endif
#endif
switch
(
which
)
switch
(
which
)
{
{
...
@@ -463,7 +448,7 @@ void US_ControlPanel(byte scancode)
...
@@ -463,7 +448,7 @@ void US_ControlPanel(byte scancode)
//
//
// DRAW MAIN MENU SCREEN
// DRAW MAIN MENU SCREEN
//
//
void
DrawMainMenu
(
void
)
void
DrawMainMenu
()
{
{
ClearMScreen
();
ClearMScreen
();
...
@@ -500,7 +485,7 @@ void DrawMainMenu(void)
...
@@ -500,7 +485,7 @@ void DrawMainMenu(void)
// READ THIS!
// READ THIS!
//
//
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
void
CP_ReadThis
(
void
)
void
CP_ReadThis
()
{
{
StartCPMusic
(
CORNER_MUS
);
StartCPMusic
(
CORNER_MUS
);
HelpScreens
();
HelpScreens
();
...
@@ -512,7 +497,7 @@ void CP_ReadThis(void)
...
@@ -512,7 +497,7 @@ void CP_ReadThis(void)
// BOSS KEY
// BOSS KEY
//
//
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
void
BossKey
(
void
)
void
BossKey
()
{
{
}
}
#endif
#endif
...
@@ -709,7 +694,7 @@ int CP_CheckQuick(unsigned scancode)
...
@@ -709,7 +694,7 @@ int CP_CheckQuick(unsigned scancode)
// END THE CURRENT GAME
// END THE CURRENT GAME
//
//
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
int
CP_EndGame
(
void
)
int
CP_EndGame
()
{
{
if
(
!
Confirm
(
ENDGAMESTR
))
if
(
!
Confirm
(
ENDGAMESTR
))
return
0
;
return
0
;
...
@@ -730,19 +715,19 @@ int CP_EndGame(void)
...
@@ -730,19 +715,19 @@ int CP_EndGame(void)
// VIEW THE HIGH SCORES
// VIEW THE HIGH SCORES
//
//
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
void
CP_ViewScores
(
void
)
void
CP_ViewScores
()
{
{
fontnumber
=
0
;
fontnumber
=
0
;
#ifdef SPEAR
#ifdef SPEAR
UnCacheLump
(
OPTIONS_LUMP_START
,
OPTIONS_LUMP_END
);
UnCacheLump
(
OPTIONS_LUMP_START
,
OPTIONS_LUMP_END
);
StartCPMusic
(
XAWARD_MUS
);
StartCPMusic
(
XAWARD_MUS
);
#else
#else
StartCPMusic
(
ROSTER_MUS
);
StartCPMusic
(
ROSTER_MUS
);
#endif
#endif
DrawHighScores
();
DrawHighScores
();
VW_UpdateScreen
();
VW_UpdateScreen
();
MenuFadeIn
();
MenuFadeIn
();
fontnumber
=
1
;
fontnumber
=
1
;
...
@@ -763,7 +748,7 @@ void CP_ViewScores(void)
...
@@ -763,7 +748,7 @@ void CP_ViewScores(void)
// START A NEW GAME
// START A NEW GAME
//
//
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
void
CP_NewGame
(
void
)
void
CP_NewGame
()
{
{
int
which
,
episode
;
int
which
,
episode
;
...
@@ -1460,7 +1445,7 @@ int CP_SaveGame(int quick)
...
@@ -1460,7 +1445,7 @@ int CP_SaveGame(int quick)
// CALIBRATE JOYSTICK
// CALIBRATE JOYSTICK
//
//
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
int
CalibrateJoystick
(
void
)
int
CalibrateJoystick
()
{
{
#define CALX 85
#define CALX 85
#define CALY 40
#define CALY 40
...
@@ -1547,7 +1532,7 @@ int CalibrateJoystick(void)
...
@@ -1547,7 +1532,7 @@ int CalibrateJoystick(void)
// DEFINE CONTROLS
// DEFINE CONTROLS
//
//
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
void
CP_Control
(
void
)
void
CP_Control
()
{
{
enum
{
MOUSEENABLE
,
JOYENABLE
,
USEPORT2
,
PADENABLE
,
MOUSESENS
,
CUSTOMIZE
};
enum
{
MOUSEENABLE
,
JOYENABLE
,
USEPORT2
,
PADENABLE
,
MOUSESENS
,
CUSTOMIZE
};
int
which
;
int
which
;
...
@@ -1613,7 +1598,7 @@ void CP_Control(void)
...
@@ -1613,7 +1598,7 @@ void CP_Control(void)
//
//
// DRAW MOUSE SENSITIVITY SCREEN
// DRAW MOUSE SENSITIVITY SCREEN
//
//
void
DrawMouseSens
(
void
)
void
DrawMouseSens
()
{
{
ClearMScreen
();
ClearMScreen
();
VWB_DrawPic
(
112
,
184
,
C_MOUSELBACKPIC
);
VWB_DrawPic
(
112
,
184
,
C_MOUSELBACKPIC
);
...
@@ -1646,7 +1631,7 @@ void DrawMouseSens(void)
...
@@ -1646,7 +1631,7 @@ void DrawMouseSens(void)
//
//
// ADJUST MOUSE SENSITIVITY
// ADJUST MOUSE SENSITIVITY
//
//
void
MouseSensitivity
(
void
)
void
MouseSensitivity
()
{
{
ControlInfo
ci
;
ControlInfo
ci
;
int
exit
=
0
,
oldMA
;
int
exit
=
0
,
oldMA
;
...
...
src/wl_play.c
View file @
cb67569f
/* wl_play.c */
#include "wl_def.h"
#include "wl_def.h"
/*
/*
...
...
src/wl_state.c
View file @
cb67569f
/* wl_state.c */
#include "wl_def.h"
#include "wl_def.h"
/*
/*
...
@@ -27,19 +25,7 @@ static dirtype diagonal[9][9] =
...
@@ -27,19 +25,7 @@ static dirtype diagonal[9][9] =
{
nodir
,
nodir
,
nodir
,
nodir
,
nodir
,
nodir
,
nodir
,
nodir
,
nodir
}
{
nodir
,
nodir
,
nodir
,
nodir
,
nodir
,
nodir
,
nodir
,
nodir
,
nodir
}
};
};
void
SpawnNewObj
(
unsigned
tilex
,
unsigned
tiley
,
statetype
*
state
);
void
NewState
(
objtype
*
ob
,
statetype
*
state
);
boolean
TryWalk
(
objtype
*
ob
);
void
MoveObj
(
objtype
*
ob
,
long
move
);
void
KillActor
(
objtype
*
ob
);
void
DamageActor
(
objtype
*
ob
,
unsigned
damage
);
boolean
CheckLine
(
objtype
*
ob
);
void
FirstSighting
(
objtype
*
ob
);
void
FirstSighting
(
objtype
*
ob
);
boolean
CheckSight
(
objtype
*
ob
);
//===========================================================================
//===========================================================================
...
@@ -56,9 +42,10 @@ boolean CheckSight (objtype *ob);
...
@@ -56,9 +42,10 @@ boolean CheckSight (objtype *ob);
===================
===================
*/
*/
void
SpawnNewObj
(
unsigned
tilex
,
unsigned
tiley
,
statetype
*
state
)
void
SpawnNewObj
(
unsigned
tilex
,
unsigned
tiley
,
statetype
*
state
)
{
{
GetNewActor
();
GetNewActor
();
new
->
state
=
state
;
new
->
state
=
state
;
if
(
state
->
tictime
)
if
(
state
->
tictime
)
new
->
ticcount
=
US_RndT
()
%
state
->
tictime
;
new
->
ticcount
=
US_RndT
()
%
state
->
tictime
;
...
@@ -76,8 +63,6 @@ void SpawnNewObj (unsigned tilex, unsigned tiley, statetype *state)
...
@@ -76,8 +63,6 @@ void SpawnNewObj (unsigned tilex, unsigned tiley, statetype *state)
*
(
mapsegs
[
0
]
+
farmapylookup
[
new
->
tiley
]
+
new
->
tilex
)
-
AREATILE
;
*
(
mapsegs
[
0
]
+
farmapylookup
[
new
->
tiley
]
+
new
->
tilex
)
-
AREATILE
;
}
}
/*
/*
===================
===================
=
=
...
@@ -88,14 +73,12 @@ void SpawnNewObj (unsigned tilex, unsigned tiley, statetype *state)
...
@@ -88,14 +73,12 @@ void SpawnNewObj (unsigned tilex, unsigned tiley, statetype *state)
===================
===================
*/
*/
void
NewState
(
objtype
*
ob
,
statetype
*
state
)
void
NewState
(
objtype
*
ob
,
statetype
*
state
)
{
{
ob
->
state
=
state
;
ob
->
state
=
state
;
ob
->
ticcount
=
state
->
tictime
;
ob
->
ticcount
=
state
->
tictime
;
}
}
/*
/*
=============================================================================
=============================================================================
...
@@ -156,7 +139,7 @@ void NewState (objtype *ob, statetype *state)
...
@@ -156,7 +139,7 @@ void NewState (objtype *ob, statetype *state)
}
}
boolean
TryWalk
(
objtype
*
ob
)
boolean
TryWalk
(
objtype
*
ob
)
{
{
int
doornum
;
int
doornum
;
unsigned
temp
;
unsigned
temp
;
...
@@ -312,8 +295,6 @@ boolean TryWalk (objtype *ob)
...
@@ -312,8 +295,6 @@ boolean TryWalk (objtype *ob)
return
true
;
return
true
;
}
}
/*
/*
==================================
==================================
=
=
...
@@ -442,7 +423,6 @@ void SelectDodgeDir(objtype *ob)
...
@@ -442,7 +423,6 @@ void SelectDodgeDir(objtype *ob)
ob
->
dir
=
nodir
;
ob
->
dir
=
nodir
;
}
}
/*
/*
============================
============================
=
=
...
@@ -552,7 +532,6 @@ void SelectChaseDir(objtype *ob)
...
@@ -552,7 +532,6 @@ void SelectChaseDir(objtype *ob)
ob
->
dir
=
nodir
;
// can't move
ob
->
dir
=
nodir
;
// can't move
}
}
/*
/*
============================
============================
=
=
...
@@ -621,7 +600,6 @@ void SelectRunDir (objtype *ob)
...
@@ -621,7 +600,6 @@ void SelectRunDir (objtype *ob)
ob
->
dir
=
nodir
;
// can't move
ob
->
dir
=
nodir
;
// can't move
}
}
/*
/*
=================
=================
=
=
...
...
src/wl_text.c
View file @
cb67569f
/* wl_text.c */
#include "wl_def.h"
#include "wl_def.h"
#ifndef SPEAR
/*
/*
=============================================================================
=============================================================================
...
@@ -24,8 +24,6 @@ TEXT FORMATTING COMMANDS
...
@@ -24,8 +24,6 @@ TEXT FORMATTING COMMANDS
=============================================================================
=============================================================================
*/
*/
#ifndef SPEAR
#define BACKCOLOR 0x11
#define BACKCOLOR 0x11
#define WORDLIMIT 80
#define WORDLIMIT 80
...
@@ -151,7 +149,7 @@ void ParseTimedCommand()
...
@@ -151,7 +149,7 @@ void ParseTimedCommand()
=====================
=====================
*/
*/
void
TimedPicCommand
(
void
)
void
TimedPicCommand
(
)
{
{
ParseTimedCommand
();
ParseTimedCommand
();
...
@@ -181,7 +179,7 @@ void TimedPicCommand (void)
...
@@ -181,7 +179,7 @@ void TimedPicCommand (void)
=====================
=====================
*/
*/
void
HandleCommand
(
void
)
void
HandleCommand
(
)
{
{
int
i
,
margin
,
top
,
bottom
;
int
i
,
margin
,
top
,
bottom
;
int
picwidth
,
picheight
,
picmid
;
int
picwidth
,
picheight
,
picmid
;
...
@@ -284,7 +282,7 @@ void HandleCommand (void)
...
@@ -284,7 +282,7 @@ void HandleCommand (void)
=====================
=====================
*/
*/
void
NewLine
(
void
)
void
NewLine
(
)
{
{
char
ch
;
char
ch
;
...
@@ -324,7 +322,7 @@ void NewLine (void)
...
@@ -324,7 +322,7 @@ void NewLine (void)
=====================
=====================
*/
*/
void
HandleCtrls
(
void
)
void
HandleCtrls
(
)
{
{
char
ch
;
char
ch
;
...
@@ -406,7 +404,7 @@ void HandleWord()
...
@@ -406,7 +404,7 @@ void HandleWord()
=====================
=====================
*/
*/
void
PageLayout
(
boolean
shownumber
)
void
PageLayout
(
boolean
shownumber
)
{
{
int
i
,
oldfontcolor
;
int
i
,
oldfontcolor
;
char
ch
;
char
ch
;
...
@@ -418,11 +416,11 @@ void PageLayout (boolean shownumber)
...
@@ -418,11 +416,11 @@ void PageLayout (boolean shownumber)
//
//
// clear the screen
// clear the screen
//
//
VW_Bar
(
0
,
0
,
320
,
200
,
BACKCOLOR
);
VW_Bar
(
0
,
0
,
320
,
200
,
BACKCOLOR
);
VWB_DrawPic
(
0
,
0
,
H_TOPWINDOWPIC
);
VWB_DrawPic
(
0
,
0
,
H_TOPWINDOWPIC
);
VWB_DrawPic
(
0
,
8
,
H_LEFTWINDOWPIC
);
VWB_DrawPic
(
0
,
8
,
H_LEFTWINDOWPIC
);
VWB_DrawPic
(
312
,
8
,
H_RIGHTWINDOWPIC
);
VWB_DrawPic
(
312
,
8
,
H_RIGHTWINDOWPIC
);
VWB_DrawPic
(
8
,
176
,
H_BOTTOMINFOPIC
);
VWB_DrawPic
(
8
,
176
,
H_BOTTOMINFOPIC
);
for
(
i
=
0
;
i
<
TEXTROWS
;
i
++
)
for
(
i
=
0
;
i
<
TEXTROWS
;
i
++
)
...
@@ -503,7 +501,7 @@ void PageLayout (boolean shownumber)
...
@@ -503,7 +501,7 @@ void PageLayout (boolean shownumber)
=====================
=====================
*/
*/
void
BackPage
(
void
)
void
BackPage
(
)
{
{
pagenum
--
;
pagenum
--
;
do
do
...
@@ -528,7 +526,7 @@ void BackPage (void)
...
@@ -528,7 +526,7 @@ void BackPage (void)
=
=
=====================
=====================
*/
*/
void
CacheLayoutGraphics
(
void
)
void
CacheLayoutGraphics
(
)
{
{
char
*
bombpoint
,
*
textstart
;
char
*
bombpoint
,
*
textstart
;
char
ch
;
char
ch
;
...
@@ -652,9 +650,7 @@ void ShowArticle(char *article)
...
@@ -652,9 +650,7 @@ void ShowArticle(char *article)
//===========================================================================
//===========================================================================
int
endextern
=
T_ENDART1
;
int
endextern
=
T_ENDART1
;
#ifndef SPEAR
int
helpextern
=
T_HELPART
;
int
helpextern
=
T_HELPART
;
#endif
/*
/*
=================
=================
...
...
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