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
d5ae0bf8
Commit
d5ae0bf8
authored
Apr 29, 2000
by
Steven Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pretty much resolved the "latch" issue.
parent
a69bba1d
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
46 additions
and
128 deletions
+46
-128
TODO
src/TODO
+1
-3
gfxv_sdm.h
src/gfxv_sdm.h
+1
-1
gfxv_sod.h
src/gfxv_sod.h
+1
-1
gfxv_wl1.h
src/gfxv_wl1.h
+1
-1
gfxv_wl6.h
src/gfxv_wl6.h
+1
-1
id_ca.c
src/id_ca.c
+26
-20
id_ca.h
src/id_ca.h
+0
-3
id_vh.c
src/id_vh.c
+5
-60
id_vh.h
src/id_vh.h
+0
-9
vi_comm.h
src/vi_comm.h
+0
-1
vi_glx.c
src/vi_glx.c
+1
-5
wl_debug.c
src/wl_debug.c
+2
-0
wl_game.c
src/wl_game.c
+1
-17
wl_menu.c
src/wl_menu.c
+5
-5
wl_menu.h
src/wl_menu.h
+1
-1
No files found.
src/TODO
View file @
d5ae0bf8
...
@@ -45,9 +45,6 @@ CA_FarRead hit EOF?
...
@@ -45,9 +45,6 @@ CA_FarRead hit EOF?
* if possible fix/or at least add ViewMap?
* if possible fix/or at least add ViewMap?
* remove the #else at the end of each header since nothing is being doubly
* remove the #else at the end of each header since nothing is being doubly
included now (if ever)
included now (if ever)
* fix those tiles that do not wish to be extracted (latches or whathaveyou)
* i don't like this latch nonsense. i think it was for originally storing
data in vga memory. so figure it out, fix it, and remove
* especially with the video functions, there are functions/defines which
* especially with the video functions, there are functions/defines which
just call a different function (most are left from the update block code)
just call a different function (most are left from the update block code)
rename/remove them
rename/remove them
...
@@ -86,6 +83,7 @@ screen update
...
@@ -86,6 +83,7 @@ screen update
* dga 1 and 2
* dga 1 and 2
* make sure none of the code tries to handle gfx/sound data directly
* make sure none of the code tries to handle gfx/sound data directly
* GL_shared_texture_palette for opengl
* GL_shared_texture_palette for opengl
* if window looses focus, should it clear the keys ?
Specific:
Specific:
* memory/sound intro screen goes
* memory/sound intro screen goes
...
...
src/gfxv_sdm.h
View file @
d5ae0bf8
...
@@ -194,7 +194,7 @@ typedef enum {
...
@@ -194,7 +194,7 @@ typedef enum {
#define NUMPICS 125
#define NUMPICS 125
#define NUMPICM 0
#define NUMPICM 0
#define NUMSPRITES 0
#define NUMSPRITES 0
#define NUMTILE8
72
#define NUMTILE8
35
#define NUMTILE8M 0
#define NUMTILE8M 0
#define NUMTILE16 0
#define NUMTILE16 0
#define NUMTILE16M 0
#define NUMTILE16M 0
...
...
src/gfxv_sod.h
View file @
d5ae0bf8
...
@@ -250,7 +250,7 @@ typedef enum {
...
@@ -250,7 +250,7 @@ typedef enum {
#define NUMPICS 147
#define NUMPICS 147
#define NUMPICM 0
#define NUMPICM 0
#define NUMSPRITES 0
#define NUMSPRITES 0
#define NUMTILE8
72
#define NUMTILE8
35
#define NUMTILE8M 0
#define NUMTILE8M 0
#define NUMTILE16 0
#define NUMTILE16 0
#define NUMTILE16M 0
#define NUMTILE16M 0
...
...
src/gfxv_wl1.h
View file @
d5ae0bf8
...
@@ -192,7 +192,7 @@ typedef enum {
...
@@ -192,7 +192,7 @@ typedef enum {
#define NUMPICS 144
#define NUMPICS 144
#define NUMPICM 0
#define NUMPICM 0
#define NUMSPRITES 0
#define NUMSPRITES 0
#define NUMTILE8
72
#define NUMTILE8
35
#define NUMTILE8M 0
#define NUMTILE8M 0
#define NUMTILE16 0
#define NUMTILE16 0
#define NUMTILE16M 0
#define NUMTILE16M 0
...
...
src/gfxv_wl6.h
View file @
d5ae0bf8
...
@@ -186,7 +186,7 @@ typedef enum {
...
@@ -186,7 +186,7 @@ typedef enum {
#define NUMPICS 132
#define NUMPICS 132
#define NUMPICM 0
#define NUMPICM 0
#define NUMSPRITES 0
#define NUMSPRITES 0
#define NUMTILE8
72
#define NUMTILE8
35
#define NUMTILE8M 0
#define NUMTILE8M 0
#define NUMTILE16 0
#define NUMTILE16 0
#define NUMTILE16M 0
#define NUMTILE16M 0
...
...
src/id_ca.c
View file @
d5ae0bf8
...
@@ -54,7 +54,6 @@ char extension[5],
...
@@ -54,7 +54,6 @@ char extension[5],
gfilename
[
10
]
=
"vgagraph."
,
gfilename
[
10
]
=
"vgagraph."
,
gdictname
[
10
]
=
"vgadict."
,
gdictname
[
10
]
=
"vgadict."
,
mheadname
[
10
]
=
"maphead."
,
mheadname
[
10
]
=
"maphead."
,
mfilename
[
10
]
=
"maptemp."
,
aheadname
[
10
]
=
"audiohed."
,
aheadname
[
10
]
=
"audiohed."
,
afilename
[
10
]
=
"audiot."
;
afilename
[
10
]
=
"audiot."
;
...
@@ -111,7 +110,7 @@ void CA_CannotOpen(char *string)
...
@@ -111,7 +110,7 @@ void CA_CannotOpen(char *string)
=
=
= CA_FarRead
= CA_FarRead
=
=
= Read from a file to a
far
pointer
= Read from a file to a pointer
=
=
==========================
==========================
*/
*/
...
@@ -140,7 +139,7 @@ boolean CA_FarRead(int handle, byte *dest, long length)
...
@@ -140,7 +139,7 @@ boolean CA_FarRead(int handle, byte *dest, long length)
=
=
= CA_FarWrite
= CA_FarWrite
=
=
= Write from a file to a
far
pointer
= Write from a file to a pointer
=
=
==========================
==========================
*/
*/
...
@@ -266,8 +265,9 @@ boolean CA_LoadFile (char *filename, memptr *ptr)
...
@@ -266,8 +265,9 @@ boolean CA_LoadFile (char *filename, memptr *ptr)
=
=
======================
======================
*/
*/
/* From Ryan C. Gordon -- ryan_gordon@hotmail.com */
#if 1
#if 1
/* From Ryan C. Gordon -- ryan_gordon@hotmail.com */
void
CAL_HuffExpand
(
byte
*
source
,
byte
*
dest
,
long
length
,
huffnode
*
htable
)
void
CAL_HuffExpand
(
byte
*
source
,
byte
*
dest
,
long
length
,
huffnode
*
htable
)
{
{
huffnode
*
headptr
;
huffnode
*
headptr
;
...
@@ -308,7 +308,7 @@ void CAL_HuffExpand(byte *source, byte *dest, long length, huffnode *hufftable)
...
@@ -308,7 +308,7 @@ void CAL_HuffExpand(byte *source, byte *dest, long length, huffnode *hufftable)
ptrd
=
dest
;
ptrd
=
dest
;
headptr
=
hufftable
+
254
;
/* head node is al
l
ways node 254 */
headptr
=
hufftable
+
254
;
/* head node is always node 254 */
nodeon
=
headptr
;
nodeon
=
headptr
;
ptr
=
source
;
ptr
=
source
;
...
@@ -339,6 +339,7 @@ void CAL_HuffExpand(byte *source, byte *dest, long length, huffnode *hufftable)
...
@@ -339,6 +339,7 @@ void CAL_HuffExpand(byte *source, byte *dest, long length, huffnode *hufftable)
}
}
}
}
#endif
#endif
/*
/*
======================
======================
=
=
...
@@ -352,7 +353,6 @@ void CAL_HuffExpand(byte *source, byte *dest, long length, huffnode *hufftable)
...
@@ -352,7 +353,6 @@ void CAL_HuffExpand(byte *source, byte *dest, long length, huffnode *hufftable)
#define NEARTAG 0xa7
#define NEARTAG 0xa7
#define FARTAG 0xa8
#define FARTAG 0xa8
/* TODO: verify correctness of byteinc */
void
CAL_CarmackExpand
(
word
*
source
,
word
*
dest
,
word
length
)
void
CAL_CarmackExpand
(
word
*
source
,
word
*
dest
,
word
length
)
{
{
word
ch
,
chhigh
,
count
,
offset
;
word
ch
,
chhigh
,
count
,
offset
;
...
@@ -373,13 +373,11 @@ void CAL_CarmackExpand(word *source, word *dest, word length)
...
@@ -373,13 +373,11 @@ void CAL_CarmackExpand(word *source, word *dest, word length)
/* have to insert a word containing the tag byte */
/* have to insert a word containing the tag byte */
ch
|=
**
byteinc
;
ch
|=
**
byteinc
;
(
*
byteinc
)
++
;
(
*
byteinc
)
++
;
/* ch |= *((unsigned char *)inptr)++; */
*
outptr
++
=
ch
;
*
outptr
++
=
ch
;
length
--
;
length
--
;
}
else
{
}
else
{
offset
=
**
byteinc
;
offset
=
**
byteinc
;
(
*
byteinc
)
++
;
(
*
byteinc
)
++
;
/* offset = *((unsigned char *)inptr)++; */
copyptr
=
outptr
-
offset
;
copyptr
=
outptr
-
offset
;
length
-=
count
;
length
-=
count
;
while
(
count
--
)
while
(
count
--
)
...
@@ -391,7 +389,6 @@ void CAL_CarmackExpand(word *source, word *dest, word length)
...
@@ -391,7 +389,6 @@ void CAL_CarmackExpand(word *source, word *dest, word length)
/* have to insert a word containing the tag byte */
/* have to insert a word containing the tag byte */
ch
|=
**
byteinc
;
ch
|=
**
byteinc
;
(
*
byteinc
)
++
;
(
*
byteinc
)
++
;
/* ch |= *((unsigned char *)inptr)++; */
*
outptr
++
=
ch
;
*
outptr
++
=
ch
;
length
--
;
length
--
;
}
else
{
}
else
{
...
@@ -502,7 +499,7 @@ void CA_RLEWexpand(word *source, word *dest, long length, word rlewtag)
...
@@ -502,7 +499,7 @@ void CA_RLEWexpand(word *source, word *dest, long length, word rlewtag)
long
CAL_GetGrChunkLength
(
int
chunk
)
long
CAL_GetGrChunkLength
(
int
chunk
)
{
{
long
chunkexplen
;
/* temp var */
long
chunkexplen
;
lseek
(
grhandle
,
GRFILEPOS
(
chunk
),
SEEK_SET
);
lseek
(
grhandle
,
GRFILEPOS
(
chunk
),
SEEK_SET
);
read
(
grhandle
,
&
chunkexplen
,
sizeof
(
chunkexplen
));
read
(
grhandle
,
&
chunkexplen
,
sizeof
(
chunkexplen
));
...
@@ -572,7 +569,7 @@ void CAL_SetupGrFile (void)
...
@@ -572,7 +569,7 @@ void CAL_SetupGrFile (void)
chunkcomplen
=
CAL_GetGrChunkLength
(
STRUCTPIC
);
chunkcomplen
=
CAL_GetGrChunkLength
(
STRUCTPIC
);
MM_GetPtr
(
&
compseg
,
chunkcomplen
);
MM_GetPtr
(
&
compseg
,
chunkcomplen
);
CA_FarRead
(
grhandle
,
compseg
,
chunkcomplen
);
CA_FarRead
(
grhandle
,
compseg
,
chunkcomplen
);
CAL_HuffExpand
(
compseg
,
(
byte
*
)
pictable
,
NUMPICS
*
sizeof
(
pictabletype
),
grhuffman
);
CAL_HuffExpand
(
compseg
,
(
byte
*
)
pictable
,
NUMPICS
*
sizeof
(
pictabletype
),
grhuffman
);
MM_FreePtr
(
&
compseg
);
MM_FreePtr
(
&
compseg
);
}
}
...
@@ -846,6 +843,7 @@ cachein:
...
@@ -846,6 +843,7 @@ cachein:
void
CAL_ExpandGrChunk
(
int
chunk
,
byte
*
source
)
void
CAL_ExpandGrChunk
(
int
chunk
,
byte
*
source
)
{
{
int
tilecount
=
0
;
long
expanded
;
long
expanded
;
int
width
=
0
,
height
=
0
;
int
width
=
0
,
height
=
0
;
...
@@ -855,13 +853,15 @@ void CAL_ExpandGrChunk(int chunk, byte *source)
...
@@ -855,13 +853,15 @@ void CAL_ExpandGrChunk(int chunk, byte *source)
//
//
// expanded sizes of tile8/16/32 are implicit
// expanded sizes of tile8/16/32 are implicit
//
//
#define BLOCK 64
#define BLOCK 64
#define MASKBLOCK 128
#define MASKBLOCK 128
if
(
chunk
<
STARTTILE8M
)
// tile 8s are all in one chunk!
if
(
chunk
<
STARTTILE8M
)
{
/* tile 8s are all in one chunk! */
expanded
=
BLOCK
*
NUMTILE8
/
4
;
/* hmm */
expanded
=
BLOCK
*
NUMTILE8
;
else
if
(
chunk
<
STARTTILE16
)
width
=
8
;
height
=
8
;
tilecount
=
NUMTILE8
;
}
else
if
(
chunk
<
STARTTILE16
)
/* TODO: This is removable */
expanded
=
MASKBLOCK
*
NUMTILE8M
;
expanded
=
MASKBLOCK
*
NUMTILE8M
;
else
if
(
chunk
<
STARTTILE16M
)
// all other tiles are one/chunk
else
if
(
chunk
<
STARTTILE16M
)
// all other tiles are one/chunk
expanded
=
BLOCK
*
4
;
expanded
=
BLOCK
*
4
;
...
@@ -871,6 +871,7 @@ void CAL_ExpandGrChunk(int chunk, byte *source)
...
@@ -871,6 +871,7 @@ void CAL_ExpandGrChunk(int chunk, byte *source)
expanded
=
BLOCK
*
16
;
expanded
=
BLOCK
*
16
;
else
else
expanded
=
MASKBLOCK
*
16
;
expanded
=
MASKBLOCK
*
16
;
}
else
if
(
chunk
>=
STARTPICS
&&
chunk
<
STARTSPRITES
)
{
}
else
if
(
chunk
>=
STARTPICS
&&
chunk
<
STARTSPRITES
)
{
width
=
pictable
[
chunk
-
STARTPICS
].
width
;
width
=
pictable
[
chunk
-
STARTPICS
].
width
;
height
=
pictable
[
chunk
-
STARTPICS
].
height
;
height
=
pictable
[
chunk
-
STARTPICS
].
height
;
...
@@ -889,8 +890,14 @@ void CAL_ExpandGrChunk(int chunk, byte *source)
...
@@ -889,8 +890,14 @@ void CAL_ExpandGrChunk(int chunk, byte *source)
//
//
MM_GetPtr
(
&
grsegs
[
chunk
],
expanded
);
MM_GetPtr
(
&
grsegs
[
chunk
],
expanded
);
CAL_HuffExpand
(
source
,
grsegs
[
chunk
],
expanded
,
grhuffman
);
CAL_HuffExpand
(
source
,
grsegs
[
chunk
],
expanded
,
grhuffman
);
if
(
width
&&
height
)
if
(
width
&&
height
)
{
VL_DeModeXize
(
grsegs
[
chunk
],
width
,
height
);
if
(
tilecount
)
{
int
i
;
for
(
i
=
0
;
i
<
tilecount
;
i
++
)
VL_DeModeXize
(
grsegs
[
chunk
]
+
(
width
*
height
)
*
i
,
width
,
height
);
}
else
VL_DeModeXize
(
grsegs
[
chunk
],
width
,
height
);
}
}
}
...
@@ -922,8 +929,7 @@ void CA_CacheGrChunk(int chunk)
...
@@ -922,8 +929,7 @@ void CA_CacheGrChunk(int chunk)
}
}
//
//
// load the chunk into a buffer, either the miscbuffer if it fits, or allocate
// load the chunk into a buffer
// a larger buffer
//
//
pos
=
GRFILEPOS
(
chunk
);
pos
=
GRFILEPOS
(
chunk
);
if
(
pos
<
0
)
/* $FFFFFFFF start is a sparse tile */
if
(
pos
<
0
)
/* $FFFFFFFF start is a sparse tile */
...
@@ -941,7 +947,7 @@ void CA_CacheGrChunk(int chunk)
...
@@ -941,7 +947,7 @@ void CA_CacheGrChunk(int chunk)
CA_FarRead
(
grhandle
,
source
,
compressed
);
CA_FarRead
(
grhandle
,
source
,
compressed
);
CAL_ExpandGrChunk
(
chunk
,
source
);
CAL_ExpandGrChunk
(
chunk
,
source
);
MM_FreePtr
((
memptr
)
&
source
);
MM_FreePtr
((
memptr
)
&
source
);
}
}
...
...
src/id_ca.h
View file @
d5ae0bf8
...
@@ -31,14 +31,11 @@ extern void *grsegs[NUMCHUNKS];
...
@@ -31,14 +31,11 @@ extern void *grsegs[NUMCHUNKS];
extern
byte
grneeded
[
NUMCHUNKS
];
extern
byte
grneeded
[
NUMCHUNKS
];
extern
byte
ca_levelbit
,
ca_levelnum
;
extern
byte
ca_levelbit
,
ca_levelnum
;
extern
char
*
titleptr
[
8
];
extern
char
extension
[
5
],
extern
char
extension
[
5
],
gheadname
[
10
],
gheadname
[
10
],
gfilename
[
10
],
gfilename
[
10
],
gdictname
[
10
],
gdictname
[
10
],
mheadname
[
10
],
mheadname
[
10
],
mfilename
[
10
],
aheadname
[
10
],
aheadname
[
10
],
afilename
[
10
];
afilename
[
10
];
...
...
src/id_vh.c
View file @
d5ae0bf8
...
@@ -10,11 +10,6 @@ int px,py;
...
@@ -10,11 +10,6 @@ int px,py;
byte
fontcolor
,
backcolor
;
byte
fontcolor
,
backcolor
;
int
fontnumber
;
int
fontnumber
;
/* TODO: more latch nonsense
unsigned freelatch;
unsigned latchpics[NUMLATCHPICS];
*/
boolean
screenfaded
;
boolean
screenfaded
;
byte
palette1
[
256
][
3
],
palette2
[
256
][
3
];
byte
palette1
[
256
][
3
],
palette2
[
256
][
3
];
...
@@ -75,8 +70,7 @@ void VW_MeasurePropString (char *string, word *width, word *height)
...
@@ -75,8 +70,7 @@ void VW_MeasurePropString (char *string, word *width, word *height)
void
VWB_DrawTile8
(
int
x
,
int
y
,
int
tile
)
void
VWB_DrawTile8
(
int
x
,
int
y
,
int
tile
)
{
{
/* TODO: 'latches' do not work */
VL_MemToScreen
(
grsegs
[
STARTTILE8
]
+
(
tile
*
64
),
8
,
8
,
x
,
y
);
/* LatchDrawChar(x,y,tile); */
}
}
void
VWB_DrawPic
(
int
x
,
int
y
,
int
chunknum
)
void
VWB_DrawPic
(
int
x
,
int
y
,
int
chunknum
)
...
@@ -142,64 +136,15 @@ void LatchDrawPic(unsigned x, unsigned y, unsigned picnum)
...
@@ -142,64 +136,15 @@ void LatchDrawPic(unsigned x, unsigned y, unsigned picnum)
void
LoadLatchMem
(
void
)
void
LoadLatchMem
(
void
)
{
{
int
i
,
j
,
p
,
m
,
width
,
height
,
start
,
end
;
int
i
;
byte
*
src
;
word
destoff
;
/*
/* tile 8s */
tile 8s
*/
#if 0 /* I can't get these to extract, if at all */
latchpics[0] = freelatch;
CA_CacheGrChunk
(
STARTTILE8
);
CA_CacheGrChunk
(
STARTTILE8
);
src = (byte *)grsegs[STARTTILE8];
destoff = freelatch;
for (i=0;i<NUMTILE8;i++)
/* pics */
{
for
(
i
=
LATCHPICS_LUMP_START
;
i
<=
LATCHPICS_LUMP_END
;
i
++
)
{
VL_MemToLatch (src,8,8,destoff);
src += 64;
destoff +=16;
}
UNCACHEGRCHUNK (STARTTILE8);
#endif
#if 0
/*
tile 16s
*/
src = (byte *)grsegs[STARTTILE16];
latchpics[1] = destoff;
for (i=0;i<NUMTILE16;i++)
{
CA_CacheGrChunk (STARTTILE16+i);
src = (byte *)grsegs[STARTTILE16+i];
VL_MemToLatch (src,16,16,destoff);
destoff+=64;
if (src)
UNCACHEGRCHUNK (STARTTILE16+i);
}
#endif
/*
pics
*/
start
=
LATCHPICS_LUMP_START
;
end
=
LATCHPICS_LUMP_END
;
for
(
i
=
start
;
i
<=
end
;
i
++
)
{
/* TODO: this just caches them for eternity */
/* TODO: this just caches them for eternity */
CA_CacheGrChunk
(
i
);
CA_CacheGrChunk
(
i
);
#if 0
latchpics[2+i-start] = destoff;
width = pictable[i-STARTPICS].width;
height = pictable[i-STARTPICS].height;
VL_MemToLatch (grsegs[i],width,height,destoff);
destoff += width/4 *height;
UNCACHEGRCHUNK(i);
#endif
}
}
}
}
...
...
src/id_vh.h
View file @
d5ae0bf8
...
@@ -59,15 +59,6 @@ void VL_FadeIn(int start, int end, byte *palette, int steps);
...
@@ -59,15 +59,6 @@ void VL_FadeIn(int start, int end, 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
);
#if 0 /* TODO: find some way to remove this ... */
#define LatchDrawChar(x,y,p) VL_LatchToScreen(latchpics[0]+(p)*16,2,8,x,y)
#define LatchDrawTile(x,y,p) VL_LatchToScreen(latchpics[1]+(p)*64,4,16,x,y)
#define NUMLATCHPICS 100
extern unsigned latchpics[NUMLATCHPICS];
extern unsigned freelatch;
#endif
#else
#else
#error "fix me: TODO"
#error "fix me: TODO"
#endif
#endif
src/vi_comm.h
View file @
d5ae0bf8
...
@@ -22,7 +22,6 @@ void VL_Hlin(unsigned x, unsigned y, unsigned width, unsigned color);
...
@@ -22,7 +22,6 @@ void VL_Hlin(unsigned x, unsigned y, unsigned width, unsigned color);
void
VL_Vlin
(
int
x
,
int
y
,
int
height
,
int
color
);
void
VL_Vlin
(
int
x
,
int
y
,
int
height
,
int
color
);
void
VL_Bar
(
int
x
,
int
y
,
int
width
,
int
height
,
int
color
);
void
VL_Bar
(
int
x
,
int
y
,
int
width
,
int
height
,
int
color
);
void
VL_MemToLatch
(
byte
*
source
,
int
width
,
int
height
,
word
dest
);
void
VL_MemToScreen
(
byte
*
source
,
int
width
,
int
height
,
int
x
,
int
y
);
void
VL_MemToScreen
(
byte
*
source
,
int
width
,
int
height
,
int
x
,
int
y
);
void
VL_DeModeXize
(
byte
*
buf
,
int
width
,
int
height
);
void
VL_DeModeXize
(
byte
*
buf
,
int
width
,
int
height
);
...
...
src/vi_glx.c
View file @
d5ae0bf8
...
@@ -20,7 +20,6 @@ Display *dpy;
...
@@ -20,7 +20,6 @@ Display *dpy;
int
screen
;
int
screen
;
Window
root
,
win
;
Window
root
,
win
;
XVisualInfo
*
vi
;
XVisualInfo
*
vi
;
XImage
*
img
;
Colormap
cmap
;
Colormap
cmap
;
Atom
wmDeleteWindow
;
Atom
wmDeleteWindow
;
GLXContext
ctx
;
GLXContext
ctx
;
...
@@ -171,10 +170,7 @@ void VL_Startup()
...
@@ -171,10 +170,7 @@ void VL_Startup()
{
{
if
(
gfxbuf
==
NULL
)
if
(
gfxbuf
==
NULL
)
gfxbuf
=
malloc
(
320
*
200
*
1
);
gfxbuf
=
malloc
(
320
*
200
*
1
);
img
=
XCreateImage
(
dpy
,
vi
->
visual
,
8
,
ZPixmap
,
0
,
(
char
*
)
gfxbuf
,
320
,
200
,
8
,
320
);
XMapWindow
(
dpy
,
win
);
XMapWindow
(
dpy
,
win
);
glClearColor
(
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
);
glClearColor
(
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
);
...
...
src/wl_debug.c
View file @
d5ae0bf8
...
@@ -520,6 +520,8 @@ void OverheadRefresh (void)
...
@@ -520,6 +520,8 @@ void OverheadRefresh (void)
tile = (unsigned)actorat[x][y];
tile = (unsigned)actorat[x][y];
break;
break;
}
}
#define LatchDrawChar(x,y,p) VL_LatchToScreen(latchpics[0]+(p)*16,2,8,x,y)
#define LatchDrawTile(x,y,p) VL_LatchToScreen(latchpics[1]+(p)*64,4,16,x,y)
if (tile<MAXWALLTILES)
if (tile<MAXWALLTILES)
LatchDrawTile(sx,sy,tile);
LatchDrawTile(sx,sy,tile);
...
...
src/wl_game.c
View file @
d5ae0bf8
...
@@ -2,15 +2,6 @@
...
@@ -2,15 +2,6 @@
#include "wl_def.h"
#include "wl_def.h"
/*
=============================================================================
LOCAL CONSTANTS
=============================================================================
*/
/*
/*
=============================================================================
=============================================================================
...
@@ -33,12 +24,6 @@ boolean spearflag;
...
@@ -33,12 +24,6 @@ boolean spearflag;
//
//
int
ElevatorBackTo
[]
=
{
1
,
1
,
7
,
3
,
5
,
3
};
int
ElevatorBackTo
[]
=
{
1
,
1
,
7
,
3
,
5
,
3
};
void
ScanInfoPlane
(
void
);
void
SetupGameLevel
(
void
);
void
DrawPlayScreen
(
void
);
void
LoadLatchMem
(
void
);
void
GameLoop
(
void
);
/*
/*
=============================================================================
=============================================================================
...
@@ -104,8 +89,7 @@ byte lefttable[ATABLEMAX][ATABLEMAX * 2] = {
...
@@ -104,8 +89,7 @@ byte lefttable[ATABLEMAX][ATABLEMAX * 2] = {
{
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
}
{
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
,
8
}
};
};
void
void
SetSoundLoc
(
fixed
gx
,
fixed
gy
)
SetSoundLoc
(
fixed
gx
,
fixed
gy
)
{
{
fixed
xt
,
yt
;
fixed
xt
,
yt
;
int
x
,
y
;
int
x
,
y
;
...
...
src/wl_menu.c
View file @
d5ae0bf8
...
@@ -2738,7 +2738,7 @@ int HandleMenu(CP_iteminfo *item_i,CP_itemtype *items,void (*routine)(int w))
...
@@ -2738,7 +2738,7 @@ int HandleMenu(CP_iteminfo *item_i,CP_itemtype *items,void (*routine)(int w))
y
=
basey
+
which
*
13
;
y
=
basey
+
which
*
13
;
VWB_DrawPic
(
x
,
y
,
C_CURSOR1PIC
);
VWB_DrawPic
(
x
,
y
,
C_CURSOR1PIC
);
SetTextColor
(
items
+
which
,
1
);
Set
Menu
TextColor
(
items
+
which
,
1
);
if
(
redrawitem
)
if
(
redrawitem
)
{
{
PrintX
=
item_i
->
x
+
item_i
->
indent
;
PrintX
=
item_i
->
x
+
item_i
->
indent
;
...
@@ -2973,7 +2973,7 @@ int HandleMenu(CP_iteminfo *item_i,CP_itemtype *items,void (*routine)(int w))
...
@@ -2973,7 +2973,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
)
void
EraseGun
(
CP_iteminfo
*
item_i
,
CP_itemtype
*
items
,
int
x
,
int
y
,
int
which
)
{
{
VWB_Bar
(
x
-
1
,
y
,
25
,
16
,
BKGDCOLOR
);
VWB_Bar
(
x
-
1
,
y
,
25
,
16
,
BKGDCOLOR
);
SetTextColor
(
items
+
which
,
0
);
Set
Menu
TextColor
(
items
+
which
,
0
);
PrintX
=
item_i
->
x
+
item_i
->
indent
;
PrintX
=
item_i
->
x
+
item_i
->
indent
;
PrintY
=
item_i
->
y
+
which
*
13
;
PrintY
=
item_i
->
y
+
which
*
13
;
...
@@ -3003,7 +3003,7 @@ void DrawGun(CP_iteminfo *item_i,CP_itemtype *items,int x,int *y,int which,int b
...
@@ -3003,7 +3003,7 @@ void DrawGun(CP_iteminfo *item_i,CP_itemtype *items,int x,int *y,int which,int b
VWB_Bar
(
x
-
1
,
*
y
,
25
,
16
,
BKGDCOLOR
);
VWB_Bar
(
x
-
1
,
*
y
,
25
,
16
,
BKGDCOLOR
);
*
y
=
basey
+
which
*
13
;
*
y
=
basey
+
which
*
13
;
VWB_DrawPic
(
x
,
*
y
,
C_CURSOR1PIC
);
VWB_DrawPic
(
x
,
*
y
,
C_CURSOR1PIC
);
SetTextColor
(
items
+
which
,
1
);
Set
Menu
TextColor
(
items
+
which
,
1
);
PrintX
=
item_i
->
x
+
item_i
->
indent
;
PrintX
=
item_i
->
x
+
item_i
->
indent
;
PrintY
=
item_i
->
y
+
which
*
13
;
PrintY
=
item_i
->
y
+
which
*
13
;
...
@@ -3051,7 +3051,7 @@ void DrawMenu(CP_iteminfo *item_i,CP_itemtype *items)
...
@@ -3051,7 +3051,7 @@ void DrawMenu(CP_iteminfo *item_i,CP_itemtype *items)
for
(
i
=
0
;
i
<
item_i
->
amount
;
i
++
)
for
(
i
=
0
;
i
<
item_i
->
amount
;
i
++
)
{
{
SetTextColor
(
items
+
i
,
which
==
i
);
Set
Menu
TextColor
(
items
+
i
,
which
==
i
);
PrintY
=
item_i
->
y
+
i
*
13
;
PrintY
=
item_i
->
y
+
i
*
13
;
if
((
items
+
i
)
->
active
)
if
((
items
+
i
)
->
active
)
...
@@ -3073,7 +3073,7 @@ void DrawMenu(CP_iteminfo *item_i,CP_itemtype *items)
...
@@ -3073,7 +3073,7 @@ void DrawMenu(CP_iteminfo *item_i,CP_itemtype *items)
// SET TEXT COLOR (HIGHLIGHT OR NO)
// SET TEXT COLOR (HIGHLIGHT OR NO)
//
//
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
void
SetTextColor
(
CP_itemtype
*
items
,
int
hlight
)
void
Set
Menu
TextColor
(
CP_itemtype
*
items
,
int
hlight
)
{
{
if
(
hlight
)
if
(
hlight
)
{
SETFONTCOLOR
(
color_hlite
[
items
->
active
],
BKGDCOLOR
);}
{
SETFONTCOLOR
(
color_hlite
[
items
->
active
],
BKGDCOLOR
);}
...
...
src/wl_menu.h
View file @
d5ae0bf8
...
@@ -136,7 +136,7 @@ void BossKey(void);
...
@@ -136,7 +136,7 @@ void BossKey(void);
void
DrawGun
(
CP_iteminfo
*
item_i
,
CP_itemtype
*
items
,
int
x
,
int
*
y
,
int
which
,
int
basey
,
void
(
*
routine
)(
int
w
));
void
DrawGun
(
CP_iteminfo
*
item_i
,
CP_itemtype
*
items
,
int
x
,
int
*
y
,
int
which
,
int
basey
,
void
(
*
routine
)(
int
w
));
void
DrawHalfStep
(
int
x
,
int
y
);
void
DrawHalfStep
(
int
x
,
int
y
);
void
EraseGun
(
CP_iteminfo
*
item_i
,
CP_itemtype
*
items
,
int
x
,
int
y
,
int
which
);
void
EraseGun
(
CP_iteminfo
*
item_i
,
CP_itemtype
*
items
,
int
x
,
int
y
,
int
which
);
void
SetTextColor
(
CP_itemtype
*
items
,
int
hlight
);
void
Set
Menu
TextColor
(
CP_itemtype
*
items
,
int
hlight
);
void
DrawMenuGun
(
CP_iteminfo
*
iteminfo
);
void
DrawMenuGun
(
CP_iteminfo
*
iteminfo
);
void
DrawStripes
(
int
y
);
void
DrawStripes
(
int
y
);
...
...
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