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
e80ce60d
Commit
e80ce60d
authored
May 20, 2000
by
Steven Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Readded the DrawSmall stuff (for automap), and moved some things to start
implementing input
parent
4007cb34
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
105 additions
and
20 deletions
+105
-20
TODO
macsrc/TODO
+1
-0
WolfIO.c
macsrc/WolfIO.c
+1
-1
stub.c
macsrc/stub.c
+81
-18
vi_svga.c
macsrc/vi_svga.c
+22
-1
No files found.
macsrc/TODO
View file @
e80ce60d
* WaitTick only called in nonplay modes and ReadSystemJoystick in playmode
macsrc/WolfIO.c
View file @
e80ce60d
...
@@ -38,7 +38,7 @@ void SetNumber(LongWord number,Word x,Word y,Word digits)
...
@@ -38,7 +38,7 @@ void SetNumber(LongWord number,Word x,Word y,Word digits)
/**********************************
/**********************************
Read
from the Mac's keyboard/mouse system
Read
the keyboard/mouse
**********************************/
**********************************/
...
...
macsrc/stub.c
View file @
e80ce60d
...
@@ -22,17 +22,82 @@ unsigned long lMSB(unsigned long x)
...
@@ -22,17 +22,82 @@ unsigned long lMSB(unsigned long x)
return
x1
|
x2
|
x3
|
x4
;
return
x1
|
x2
|
x3
|
x4
;
}
}
Byte
*
SmallFontPtr
;
void
MakeSmallFont
(
void
)
void
MakeSmallFont
(
void
)
{
{
Word
i
,
j
,
Width
,
Height
;
Byte
*
DestPtr
,
*
ArtStart
;
Byte
*
TempPtr
;
SmallFontPtr
=
AllocSomeMem
(
16
*
16
*
65
);
if
(
!
SmallFontPtr
)
{
return
;
}
memset
(
SmallFontPtr
,
0
,
16
*
16
*
65
);
i
=
0
;
DestPtr
=
SmallFontPtr
;
do
{
ArtStart
=
&
ArtData
[
i
][
0
];
if
(
!
ArtStart
)
{
DestPtr
+=
(
16
*
16
);
}
else
{
Height
=
0
;
do
{
Width
=
16
;
j
=
Height
*
8
;
do
{
DestPtr
[
0
]
=
ArtStart
[
j
];
++
DestPtr
;
j
+=
(
WALLHEIGHT
*
8
);
}
while
(
--
Width
);
}
while
(
++
Height
<
16
);
}
}
while
(
++
i
<
64
);
TempPtr
=
LoadAResource
(
MyBJFace
);
memcpy
(
DestPtr
,
TempPtr
,
16
*
16
);
ReleaseAResource
(
MyBJFace
);
}
}
void
KillSmallFont
(
void
)
void
KillSmallFont
(
void
)
{
{
if
(
SmallFontPtr
)
{
FreeSomeMem
(
SmallFontPtr
);
SmallFontPtr
=
0
;
}
}
}
void
DrawSmall
(
Word
x
,
Word
y
,
Word
tile
)
void
DrawSmall
(
Word
x
,
Word
y
,
Word
tile
)
{
{
Byte
*
Screenad
;
Byte
*
ArtStart
;
Word
Width
,
Height
;
if
(
!
SmallFontPtr
)
{
return
;
}
x
*=
16
;
y
*=
16
;
Screenad
=
&
VideoPointer
[
YTable
[
y
]
+
x
];
ArtStart
=
&
SmallFontPtr
[
tile
*
(
16
*
16
)];
Height
=
0
;
do
{
Width
=
16
;
do
{
Screenad
[
0
]
=
ArtStart
[
0
];
++
Screenad
;
++
ArtStart
;
}
while
(
--
Width
);
Screenad
+=
VideoWidth
-
16
;
}
while
(
++
Height
<
16
);
}
}
void
ShowGetPsyched
(
void
)
void
ShowGetPsyched
(
void
)
...
@@ -48,7 +113,7 @@ void ShowGetPsyched(void)
...
@@ -48,7 +113,7 @@ void ShowGetPsyched(void)
PackLength
=
lMSB
(
PackPtr
[
0
]);
PackLength
=
lMSB
(
PackPtr
[
0
]);
ShapePtr
=
AllocSomeMem
(
PackLength
);
ShapePtr
=
AllocSomeMem
(
PackLength
);
DLZSS
(
ShapePtr
,(
Byte
*
)
&
PackPtr
[
1
],
PackLength
);
DLZSS
(
ShapePtr
,(
Byte
*
)
&
PackPtr
[
1
],
PackLength
);
X
=
10
0
;
/* TODO */
X
=
10
;
/* TODO */
Y
=
100
;
Y
=
100
;
DrawShape
(
X
,
Y
,
ShapePtr
);
DrawShape
(
X
,
Y
,
ShapePtr
);
FreeSomeMem
(
ShapePtr
);
FreeSomeMem
(
ShapePtr
);
...
@@ -68,16 +133,6 @@ void EndGetPsyched(void)
...
@@ -68,16 +133,6 @@ void EndGetPsyched(void)
SetAPalette
(
rBlackPal
);
SetAPalette
(
rBlackPal
);
}
}
void
FlushKeys
(
void
)
{
/* TODO: read all keys in keyboard buffer */
}
void
ReadSystemJoystick
(
void
)
{
/* TODO: do key stuff here */
}
void
ShareWareEnd
(
void
)
void
ShareWareEnd
(
void
)
{
{
SetAPalette
(
rGamePal
);
SetAPalette
(
rGamePal
);
...
@@ -87,7 +142,8 @@ void ShareWareEnd(void)
...
@@ -87,7 +142,8 @@ void ShareWareEnd(void)
Word
WaitEvent
(
void
)
Word
WaitEvent
(
void
)
{
{
WaitTicks
(
240
);
while
(
DoEvents
()
==
0
)
;
return
0
;
return
0
;
}
}
...
@@ -119,7 +175,7 @@ LongWord ReadTick()
...
@@ -119,7 +175,7 @@ LongWord ReadTick()
void
WaitTick
()
void
WaitTick
()
{
{
do
{
do
{
/* TODO: get events */
DoEvents
();
}
while
(
ReadTick
()
==
LastTick
);
}
while
(
ReadTick
()
==
LastTick
);
LastTick
=
ReadTick
();
LastTick
=
ReadTick
();
}
}
...
@@ -129,7 +185,7 @@ void WaitTicks(Word Count)
...
@@ -129,7 +185,7 @@ void WaitTicks(Word Count)
LongWord
TickMark
;
LongWord
TickMark
;
do
{
do
{
/* TODO: get events */
DoEvents
();
TickMark
=
ReadTick
();
TickMark
=
ReadTick
();
}
while
((
TickMark
-
LastTick
)
<=
Count
);
}
while
((
TickMark
-
LastTick
)
<=
Count
);
LastTick
=
TickMark
;
LastTick
=
TickMark
;
...
@@ -139,18 +195,23 @@ Word WaitTicksEvent(Word Time)
...
@@ -139,18 +195,23 @@ Word WaitTicksEvent(Word Time)
{
{
LongWord
TickMark
;
LongWord
TickMark
;
LongWord
NewMark
;
LongWord
NewMark
;
Word
RetVal
;
TickMark
=
ReadTick
();
TickMark
=
ReadTick
();
for
(;;)
{
for
(;;)
{
/* TODO: get events */
RetVal
=
DoEvents
();
if
(
RetVal
)
break
;
NewMark
=
ReadTick
();
NewMark
=
ReadTick
();
//
if (Time) {
if
(
Time
)
{
if
((
NewMark
-
TickMark
)
>=
Time
)
{
if
((
NewMark
-
TickMark
)
>=
Time
)
{
RetVal
=
0
;
break
;
break
;
}
}
//
}
}
}
}
return
0
;
return
RetVal
;
}
}
void
FreeSong
()
void
FreeSong
()
...
@@ -189,6 +250,8 @@ void BailOut()
...
@@ -189,6 +250,8 @@ void BailOut()
Word
ChooseGameDiff
(
void
)
Word
ChooseGameDiff
(
void
)
{
{
/* 0 = easy, 1 = normal, 2 = hard, 3 = death incarnate */
difficulty
=
1
;
SetAPalette
(
rGamePal
);
SetAPalette
(
rGamePal
);
}
}
...
...
macsrc/vi_svga.c
View file @
e80ce60d
...
@@ -161,4 +161,25 @@ Boolean SetupScalers(void)
...
@@ -161,4 +161,25 @@ Boolean SetupScalers(void)
void
ReleaseScalers
()
void
ReleaseScalers
()
{
{
}
}
\ No newline at end of file
void
FlushKeys
(
void
)
{
/* TODO: read all keys in keyboard buffer */
}
void
ReadSystemJoystick
(
void
)
{
/* TODO: do key stuff here */
}
/*
Handle events, and return:
last keypress (if any)
mouse button events == 1
zero means none of the above
*/
int
DoEvents
()
{
return
0
;
}
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