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
220fe6fd
Commit
220fe6fd
authored
Apr 23, 2000
by
Steven Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some more cleanups to id_ca
parent
d1c2ee26
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
29 deletions
+25
-29
IDEAS
src/IDEAS
+2
-0
id_ca.c
src/id_ca.c
+23
-29
No files found.
src/IDEAS
View file @
220fe6fd
...
...
@@ -19,3 +19,5 @@
* Empty TODO File (TODO states a list of things which need to/should be done
regardless of future plans [IDEAS]) and no TODO/FIXME/XXXs in the source
code
* Have some sort of way of playing both digital and adlib sounds on all
platforms...
src/id_ca.c
View file @
220fe6fd
...
...
@@ -63,23 +63,13 @@ long *audiostarts; /* array of offsets in audio / audiot */
huffnode
grhuffman
[
255
];
huffnode
audiohuffman
[
255
];
int
grhandle
;
/* handle to VGAGRAPH */
int
maphandle
;
/* handle to MAPTEMP / GAMEMAPS */
int
audiohandle
;
/* handle to AUDIOT / AUDIO */
long
chunkcomplen
,
chunkexplen
;
SDMode
oldsoundmode
;
void
CAL_CarmackExpand
(
word
*
source
,
word
*
dest
,
word
length
);
#define FILEPOSSIZE 3
/*
#define GRFILEPOS(c) (*(long *)(((byte *)grstarts)+(c)*3)&0xffffff)
*/
long
GRFILEPOS
(
int
c
)
{
long
value
;
...
...
@@ -105,24 +95,6 @@ long GRFILEPOS(int c)
=============================================================================
*/
/*
============================
=
= CAL_GetGrChunkLength
=
= Gets the length of an explicit length chunk (not tiles)
= The file pointer is positioned so the compressed data can be read in next.
=
============================
*/
void
CAL_GetGrChunkLength
(
int
chunk
)
{
lseek
(
grhandle
,
GRFILEPOS
(
chunk
),
SEEK_SET
);
read
(
grhandle
,
&
chunkexplen
,
sizeof
(
chunkexplen
));
chunkcomplen
=
GRFILEPOS
(
chunk
+
1
)
-
GRFILEPOS
(
chunk
)
-
4
;
}
void
CA_CannotOpen
(
char
*
string
)
{
/* TODO Ow, string must be a small one else boom */
...
...
@@ -516,6 +488,27 @@ void CA_RLEWexpand(word *source, word *dest, long length, word rlewtag)
=============================================================================
*/
/*
============================
=
= CAL_GetGrChunkLength
=
= Gets the length of an explicit length chunk (not tiles)
= The file pointer is positioned so the compressed data can be read in next.
=
============================
*/
long
CAL_GetGrChunkLength
(
int
chunk
)
{
long
chunkexplen
;
/* temp var */
lseek
(
grhandle
,
GRFILEPOS
(
chunk
),
SEEK_SET
);
read
(
grhandle
,
&
chunkexplen
,
sizeof
(
chunkexplen
));
return
GRFILEPOS
(
chunk
+
1
)
-
GRFILEPOS
(
chunk
)
-
4
;
}
/*
======================
=
...
...
@@ -530,6 +523,7 @@ void CAL_SetupGrFile (void)
int
handle
;
memptr
compseg
;
long
chunkcomplen
;
//
// load ???dict.ext (huffman dictionary for graphics files)
//
...
...
@@ -575,7 +569,7 @@ void CAL_SetupGrFile (void)
// load the pic and sprite headers into the arrays in the data segment
//
MM_GetPtr
((
memptr
)
&
pictable
,
NUMPICS
*
sizeof
(
pictabletype
));
CAL_GetGrChunkLength
(
STRUCTPIC
);
// position file pointer
chunkcomplen
=
CAL_GetGrChunkLength
(
STRUCTPIC
);
MM_GetPtr
(
&
compseg
,
chunkcomplen
);
CA_FarRead
(
grhandle
,
compseg
,
chunkcomplen
);
CAL_HuffExpand
(
compseg
,
(
byte
*
)
pictable
,
NUMPICS
*
sizeof
(
pictabletype
),
grhuffman
);
...
...
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