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
aa0e3710
Commit
aa0e3710
authored
Jun 14, 2000
by
Steven Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved some functions around
parent
5ca1ed61
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
108 additions
and
93 deletions
+108
-93
SaveLoad.c
macsrc/SaveLoad.c
+71
-0
SoftDraw2.c
macsrc/SoftDraw2.c
+30
-0
TODO
macsrc/TODO
+7
-5
stub.c
macsrc/stub.c
+0
-88
No files found.
macsrc/SaveLoad.c
View file @
aa0e3710
...
...
@@ -20,6 +20,33 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "wolfdef.h"
/*
Utility functions
*/
unsigned
short
int
sMSB
(
unsigned
short
int
x
)
{
int
x1
=
(
x
&
0x00FF
)
<<
8
;
int
x2
=
(
x
&
0xFF00
)
>>
8
;
return
x1
|
x2
;
}
unsigned
long
lMSB
(
unsigned
long
x
)
{
int
x1
=
(
x
&
0x000000FF
)
<<
24
;
int
x2
=
(
x
&
0x0000FF00
)
<<
8
;
int
x3
=
(
x
&
0x00FF0000
)
>>
8
;
int
x4
=
(
x
&
0xFF000000
)
>>
24
;
return
x1
|
x2
|
x3
|
x4
;
}
/*
Save and load save games
These functions must be updated if the saved structures are ever changed!
*/
Boolean
SaveGame
(
char
*
file
)
{
return
FALSE
;
...
...
@@ -29,3 +56,47 @@ Boolean LoadGame(char *file)
{
return
FALSE
;
}
void
FinishLoadGame
(
void
)
{
}
/*
Load initial game data
*/
void
FixMapList
(
maplist_t
*
m
)
{
int
i
;
m
->
MaxMap
=
sMSB
(
m
->
MaxMap
);
m
->
MapRezNum
=
sMSB
(
m
->
MapRezNum
);
for
(
i
=
0
;
i
<
m
->
MaxMap
;
i
++
)
{
m
->
InfoArray
[
i
].
NextLevel
=
sMSB
(
m
->
InfoArray
[
i
].
NextLevel
);
m
->
InfoArray
[
i
].
SecretLevel
=
sMSB
(
m
->
InfoArray
[
i
].
SecretLevel
);
m
->
InfoArray
[
i
].
ParTime
=
sMSB
(
m
->
InfoArray
[
i
].
ParTime
);
m
->
InfoArray
[
i
].
ScenarioNum
=
sMSB
(
m
->
InfoArray
[
i
].
ScenarioNum
);
m
->
InfoArray
[
i
].
FloorNum
=
sMSB
(
m
->
InfoArray
[
i
].
FloorNum
);
}
}
void
InitData
()
{
/*
InitSoundMusicSystem(8,8,5, 11025);
SoundListPtr = (Word *) LoadAResource(MySoundList);
RegisterSounds(SoundListPtr,FALSE);
ReleaseAResource(MySoundList);
*/
GetTableMemory
();
MapListPtr
=
(
maplist_t
*
)
LoadAResource
(
rMapList
);
FixMapList
(
MapListPtr
);
SongListPtr
=
(
unsigned
short
*
)
LoadAResource
(
rSongList
);
WallListPtr
=
(
unsigned
short
*
)
LoadAResource
(
MyWallList
);
}
macsrc/SoftDraw2.c
View file @
aa0e3710
...
...
@@ -30,6 +30,36 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
LongWord
pow10
[]
=
{
1
,
10
,
100
,
1000
,
10000
,
100000
,
1000000
};
Word
NumberIndex
=
36
;
/* First number in the shape list... */
extern
int
VidSize
;
Word
ScaleX
(
Word
x
)
{
switch
(
VidSize
)
{
case
1
:
return
x
*
8
/
5
;
case
2
:
case
3
:
return
x
*
2
;
}
return
x
;
}
Word
ScaleY
(
Word
y
)
{
switch
(
VidSize
)
{
case
1
:
y
=
(
y
*
8
/
5
)
+
64
;
if
(
y
==
217
)
y
++
;
return
y
;
case
2
:
return
y
*
2
;
case
3
:
return
y
*
2
+
80
;
}
return
y
;
}
void
SetNumber
(
LongWord
number
,
Word
x
,
Word
y
,
Word
digits
)
{
LongWord
val
;
...
...
macsrc/TODO
View file @
aa0e3710
...
...
@@ -56,6 +56,8 @@ TODO:
* Mouse
* Psyched bar
* Finish GTK+ code
* vi_glx.c will probably be the most updated of the frontends. Be sure to
update the others later.
BUGS:
* Software Drawing seems like its imprecise, stationary sprites move back and
...
...
@@ -66,15 +68,15 @@ BUGS:
IDEAS:
* Menu Keys
- ESC: Quit
- ESC: Quit
(?)
- F1: Help
- XXX: Load Game
- F2: Save Game
- F3: Load Game
- F4: Options
- XXX: Load Previously Loaded Game
- XXX: Save Game
- XXX: Save Game to Previously used File
-
XXX: Options
-
F10: Quit
* How about adding red/white shifts (from PC wolf3d)? So screen changes
color when you are hit or pick up items.
* when saving/loading games, run them through htons/etc.
MISC:
macsrc/stub.c
View file @
aa0e3710
...
...
@@ -81,90 +81,6 @@ void PrintTimeCounter(TimeCounter *t, char *header)
printf
(
"Min: %lu, max:%lu
\n
"
,
t
->
mintime
,
t
->
maxtime
);
}
unsigned
short
int
sMSB
(
unsigned
short
int
x
)
{
int
x1
=
(
x
&
0x00FF
)
<<
8
;
int
x2
=
(
x
&
0xFF00
)
>>
8
;
return
x1
|
x2
;
}
unsigned
long
lMSB
(
unsigned
long
x
)
{
int
x1
=
(
x
&
0x000000FF
)
<<
24
;
int
x2
=
(
x
&
0x0000FF00
)
<<
8
;
int
x3
=
(
x
&
0x00FF0000
)
>>
8
;
int
x4
=
(
x
&
0xFF000000
)
>>
24
;
return
x1
|
x2
|
x3
|
x4
;
}
void
FixMapList
(
maplist_t
*
m
)
{
int
i
;
m
->
MaxMap
=
sMSB
(
m
->
MaxMap
);
m
->
MapRezNum
=
sMSB
(
m
->
MapRezNum
);
for
(
i
=
0
;
i
<
m
->
MaxMap
;
i
++
)
{
m
->
InfoArray
[
i
].
NextLevel
=
sMSB
(
m
->
InfoArray
[
i
].
NextLevel
);
m
->
InfoArray
[
i
].
SecretLevel
=
sMSB
(
m
->
InfoArray
[
i
].
SecretLevel
);
m
->
InfoArray
[
i
].
ParTime
=
sMSB
(
m
->
InfoArray
[
i
].
ParTime
);
m
->
InfoArray
[
i
].
ScenarioNum
=
sMSB
(
m
->
InfoArray
[
i
].
ScenarioNum
);
m
->
InfoArray
[
i
].
FloorNum
=
sMSB
(
m
->
InfoArray
[
i
].
FloorNum
);
}
}
void
InitData
()
{
/*
InitSoundMusicSystem(8,8,5, 11025);
SoundListPtr = (Word *) LoadAResource(MySoundList);
RegisterSounds(SoundListPtr,FALSE);
ReleaseAResource(MySoundList);
*/
GetTableMemory
();
MapListPtr
=
(
maplist_t
*
)
LoadAResource
(
rMapList
);
FixMapList
(
MapListPtr
);
SongListPtr
=
(
unsigned
short
*
)
LoadAResource
(
rSongList
);
WallListPtr
=
(
unsigned
short
*
)
LoadAResource
(
MyWallList
);
}
extern
int
VidSize
;
Word
ScaleX
(
Word
x
)
{
switch
(
VidSize
)
{
case
1
:
return
x
*
8
/
5
;
case
2
:
case
3
:
return
x
*
2
;
}
return
x
;
}
Word
ScaleY
(
Word
y
)
{
switch
(
VidSize
)
{
case
1
:
y
=
(
y
*
8
/
5
)
+
64
;
if
(
y
==
217
)
y
++
;
return
y
;
case
2
:
return
y
*
2
;
case
3
:
return
y
*
2
+
80
;
}
return
y
;
}
Boolean
SetupScalers
()
{
return
TRUE
;
...
...
@@ -291,7 +207,3 @@ Word WaitTicksEvent(Word Time)
}
return
RetVal
;
}
void
FinishLoadGame
(
void
)
{
}
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