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
9fe175e9
Commit
9fe175e9
authored
Dec 20, 2000
by
Steven Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vi_sdl.c, Makefile: Added vi_sdl.c (SDL target) from Dan Olson
parent
250feebc
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
905 additions
and
27 deletions
+905
-27
Makefile
src/Makefile
+9
-1
TODO
src/TODO
+1
-0
vi_sdl.c
src/vi_sdl.c
+884
-0
wl_inter.c
src/wl_inter.c
+0
-2
wl_main.c
src/wl_main.c
+11
-24
No files found.
src/Makefile
View file @
9fe175e9
...
@@ -13,6 +13,7 @@ OBJS = objs.o misc.o id_ca.o id_vh.o id_us.o \
...
@@ -13,6 +13,7 @@ OBJS = objs.o misc.o id_ca.o id_vh.o id_us.o \
ROBJS
=
wl_draw.o
ROBJS
=
wl_draw.o
SOBJS
=
$(OBJS)
$(ROBJS)
vi_svga.o
SOBJS
=
$(OBJS)
$(ROBJS)
vi_svga.o
XOBJS
=
$(OBJS)
$(ROBJS)
vi_xlib.o
XOBJS
=
$(OBJS)
$(ROBJS)
vi_xlib.o
DOBJS
=
$(OBJS)
$(ROBJS)
vi_sdl.o
LFLAGS
=
-lm
LFLAGS
=
-lm
...
@@ -22,17 +23,21 @@ OBJS += sd_null.o
...
@@ -22,17 +23,21 @@ OBJS += sd_null.o
#LFLAGS += -lpthread
#LFLAGS += -lpthread
CFLAGS
+=
`
sdl-config
--cflags
`
SLFLAGS
=
$(LFLAGS)
-lvga
SLFLAGS
=
$(LFLAGS)
-lvga
XLFLAGS
=
$(LFLAGS)
-L
/usr/X11R6/lib
-lX11
-lXext
-lXxf86vm
-lXxf86dga
XLFLAGS
=
$(LFLAGS)
-L
/usr/X11R6/lib
-lX11
-lXext
-lXxf86vm
-lXxf86dga
DLFLAGS
=
$(LFLAGS)
`
sdl-config
--libs
`
-L
/usr/X11R6/lib
-lX11
-lXext
NASM
=
nasm
NASM
=
nasm
.SUFFIXES
:
.asm
.SUFFIXES
:
.asm
all
:
swolf3d xwolf3d
all
:
swolf3d xwolf3d
sdlwolf3d
$(SOBJS)
:
version.h id_heads.h wl_def.h
$(SOBJS)
:
version.h id_heads.h wl_def.h
$(XOBJS)
:
version.h id_heads.h wl_def.h
$(XOBJS)
:
version.h id_heads.h wl_def.h
$(DOBJS)
:
version.h id_heads.h wl_def.h
.asm.o
:
.asm.o
:
$(NASM)
-f
elf
-o
$@
$<
$(NASM)
-f
elf
-o
$@
$<
...
@@ -43,6 +48,9 @@ swolf3d: $(SOBJS)
...
@@ -43,6 +48,9 @@ swolf3d: $(SOBJS)
xwolf3d
:
$(XOBJS)
xwolf3d
:
$(XOBJS)
gcc
-o
xwolf3d
$(XOBJS)
$(XLFLAGS)
gcc
-o
xwolf3d
$(XOBJS)
$(XLFLAGS)
sdlwolf3d
:
$(DOBJS)
gcc
-o
sdlwolf3d
$(DOBJS)
$(DLFLAGS)
clean
:
clean
:
rm
-rf
swolf3d xwolf3d
*
.o
rm
-rf
swolf3d xwolf3d
*
.o
...
...
src/TODO
View file @
9fe175e9
...
@@ -65,6 +65,7 @@ SD_StartMusic((MusicGroup *)audiosegs[STARTMUSIC + chunk]);
...
@@ -65,6 +65,7 @@ SD_StartMusic((MusicGroup *)audiosegs[STARTMUSIC + chunk]);
=>
=>
SD_StartMusic(chunk);
SD_StartMusic(chunk);
------------------------------------------------------------------------------
------------------------------------------------------------------------------
* remove farmapylookup?
* would be nice if Quit() used vsnprintf, etc
* would be nice if Quit() used vsnprintf, etc
* actor walking through door is drawn in front of door: near end of E1M1 for
* actor walking through door is drawn in front of door: near end of E1M1 for
example
example
...
...
src/vi_sdl.c
0 → 100644
View file @
9fe175e9
This diff is collapsed.
Click to expand it.
src/wl_inter.c
View file @
9fe175e9
#include "wl_def.h"
#include "wl_def.h"
//==========================================================================
/*
/*
==================
==================
=
=
...
...
src/wl_main.c
View file @
9fe175e9
...
@@ -69,10 +69,9 @@ char **_argv;
...
@@ -69,10 +69,9 @@ char **_argv;
/*
/*
========================
========================
=
=
= FixedByFrac
= FixedByFrac
(FixedMul)
=
=
= multiply a 16/16 bit, 2's complement fixed point number by a 16 bit
= multiply two 16/16 bit, 2's complement fixed point numbers
= fraction
=
=
========================
========================
*/
*/
...
@@ -280,19 +279,19 @@ void NewGame(int difficulty, int episode)
...
@@ -280,19 +279,19 @@ void NewGame(int difficulty, int episode)
gamestate
.
ammo
=
STARTAMMO
;
gamestate
.
ammo
=
STARTAMMO
;
gamestate
.
lives
=
3
;
gamestate
.
lives
=
3
;
gamestate
.
nextextra
=
EXTRAPOINTS
;
gamestate
.
nextextra
=
EXTRAPOINTS
;
gamestate
.
episode
=
episode
;
gamestate
.
episode
=
episode
;
startgame
=
true
;
startgame
=
true
;
}
}
void
DiskFlopAnim
(
int
x
,
int
y
)
void
DiskFlopAnim
(
int
x
,
int
y
)
{
{
static
char
which
=
0
;
static
char
which
=
0
;
if
(
!
x
&&
!
y
)
if
(
!
x
&&
!
y
)
return
;
return
;
VWB_DrawPic
(
x
,
y
,
C_DISKLOADING1PIC
+
which
);
VWB_DrawPic
(
x
,
y
,
C_DISKLOADING1PIC
+
which
);
VW_UpdateScreen
();
VW_UpdateScreen
();
which
^=
1
;
which
^=
1
;
...
@@ -427,14 +426,14 @@ boolean LoadTheGame(int file,int x,int y)
...
@@ -427,14 +426,14 @@ boolean LoadTheGame(int file,int x,int y)
CA_FarRead
(
file
,(
void
*
)
tilemap
,
sizeof
(
tilemap
));
CA_FarRead
(
file
,(
void
*
)
tilemap
,
sizeof
(
tilemap
));
checksum
=
DoChecksum
((
byte
*
)
tilemap
,
sizeof
(
tilemap
),
checksum
);
checksum
=
DoChecksum
((
byte
*
)
tilemap
,
sizeof
(
tilemap
),
checksum
);
DiskFlopAnim
(
x
,
y
);
DiskFlopAnim
(
x
,
y
);
CA_FarRead
(
file
,(
void
*
)
actorat
,
sizeof
(
actorat
));
CA_FarRead
(
file
,(
void
*
)
actorat
,
sizeof
(
actorat
));
checksum
=
DoChecksum
((
byte
*
)
actorat
,
sizeof
(
actorat
),
checksum
);
checksum
=
DoChecksum
((
byte
*
)
actorat
,
sizeof
(
actorat
),
checksum
);
CA_FarRead
(
file
,(
void
*
)
areaconnect
,
sizeof
(
areaconnect
));
CA_FarRead
(
file
,(
void
*
)
areaconnect
,
sizeof
(
areaconnect
));
CA_FarRead
(
file
,(
void
*
)
areabyplayer
,
sizeof
(
areabyplayer
));
CA_FarRead
(
file
,(
void
*
)
areabyplayer
,
sizeof
(
areabyplayer
));
InitActorList
();
InitActorList
();
DiskFlopAnim
(
x
,
y
);
DiskFlopAnim
(
x
,
y
);
CA_FarRead
(
file
,(
void
*
)
player
,
sizeof
(
*
player
));
CA_FarRead
(
file
,(
void
*
)
player
,
sizeof
(
*
player
));
...
@@ -540,7 +539,7 @@ void ShutdownId()
...
@@ -540,7 +539,7 @@ void ShutdownId()
==================
==================
*/
*/
const
float
radtoint
=
(
float
)
FINEANGLES
/
2
.
0
f
/
PI
;
static
const
float
radtoint
=
(
float
)
FINEANGLES
/
2
.
0
f
/
PI
;
void
BuildTables
()
void
BuildTables
()
{
{
...
@@ -564,9 +563,6 @@ void BuildTables()
...
@@ -564,9 +563,6 @@ void BuildTables()
//
//
// costable overlays sintable with a quarter phase shift
// costable overlays sintable with a quarter phase shift
// ANGLES is assumed to be divisable by four
// ANGLES is assumed to be divisable by four
//
// The low word of the value is the fraction, the high bit is the sign bit,
// bits 16-30 should be 0
//
//
angle
=
0
;
angle
=
0
;
...
@@ -584,9 +580,6 @@ void BuildTables()
...
@@ -584,9 +580,6 @@ void BuildTables()
}
}
//===========================================================================
/*
/*
====================
====================
=
=
...
@@ -637,10 +630,6 @@ void CalcProjection(long focal)
...
@@ -637,10 +630,6 @@ void CalcProjection(long focal)
}
}
}
}
//===========================================================================
/*
/*
===================
===================
=
=
...
@@ -964,7 +953,7 @@ void DoJukebox()
...
@@ -964,7 +953,7 @@ void DoJukebox()
MenuFadeOut
();
MenuFadeOut
();
#if !defined(SPEAR) || !defined(UPLOAD)
#if !defined(SPEAR) || !defined(UPLOAD)
start
=
(
rand
()
%
3
)
*
6
;
start
=
(
US_RndT
()
%
3
)
*
6
;
#else
#else
start
=
0
;
start
=
0
;
#endif
#endif
...
@@ -1287,8 +1276,6 @@ int WolfMain(int argc, char *argv[])
...
@@ -1287,8 +1276,6 @@ int WolfMain(int argc, char *argv[])
printf
(
"Now Loading %s
\n
"
,
GAMENAME
);
printf
(
"Now Loading %s
\n
"
,
GAMENAME
);
srand
(
time
(
NULL
));
CheckForEpisodes
();
CheckForEpisodes
();
InitGame
();
InitGame
();
...
...
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