Commit 9fe175e9 authored by Steven Fuller's avatar Steven Fuller

vi_sdl.c, Makefile: Added vi_sdl.c (SDL target) from Dan Olson

parent 250feebc
......@@ -13,6 +13,7 @@ OBJS = objs.o misc.o id_ca.o id_vh.o id_us.o \
ROBJS = wl_draw.o
SOBJS = $(OBJS) $(ROBJS) vi_svga.o
XOBJS = $(OBJS) $(ROBJS) vi_xlib.o
DOBJS = $(OBJS) $(ROBJS) vi_sdl.o
LFLAGS = -lm
......@@ -22,17 +23,21 @@ OBJS += sd_null.o
#LFLAGS += -lpthread
CFLAGS += `sdl-config --cflags`
SLFLAGS = $(LFLAGS) -lvga
XLFLAGS = $(LFLAGS) -L/usr/X11R6/lib -lX11 -lXext -lXxf86vm -lXxf86dga
DLFLAGS = $(LFLAGS) `sdl-config --libs` -L/usr/X11R6/lib -lX11 -lXext
NASM = nasm
.SUFFIXES: .asm
all: swolf3d xwolf3d
all: swolf3d xwolf3d sdlwolf3d
$(SOBJS): 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:
$(NASM) -f elf -o $@ $<
......@@ -43,6 +48,9 @@ swolf3d: $(SOBJS)
xwolf3d: $(XOBJS)
gcc -o xwolf3d $(XOBJS) $(XLFLAGS)
sdlwolf3d: $(DOBJS)
gcc -o sdlwolf3d $(DOBJS) $(DLFLAGS)
clean:
rm -rf swolf3d xwolf3d *.o
......
......@@ -65,6 +65,7 @@ SD_StartMusic((MusicGroup *)audiosegs[STARTMUSIC + chunk]);
=>
SD_StartMusic(chunk);
------------------------------------------------------------------------------
* remove farmapylookup?
* would be nice if Quit() used vsnprintf, etc
* actor walking through door is drawn in front of door: near end of E1M1 for
example
......
This diff is collapsed.
#include "wl_def.h"
//==========================================================================
/*
==================
=
......
......@@ -69,10 +69,9 @@ char **_argv;
/*
========================
=
= FixedByFrac
= FixedByFrac (FixedMul)
=
= multiply a 16/16 bit, 2's complement fixed point number by a 16 bit
= fraction
= multiply two 16/16 bit, 2's complement fixed point numbers
=
========================
*/
......@@ -280,19 +279,19 @@ void NewGame(int difficulty, int episode)
gamestate.ammo = STARTAMMO;
gamestate.lives = 3;
gamestate.nextextra = EXTRAPOINTS;
gamestate.episode=episode;
gamestate.episode = episode;
startgame = true;
}
void DiskFlopAnim(int x, int y)
{
static char which=0;
static char which = 0;
if (!x && !y)
return;
VWB_DrawPic(x,y,C_DISKLOADING1PIC+which);
VWB_DrawPic(x, y, C_DISKLOADING1PIC+which);
VW_UpdateScreen();
which ^= 1;
......@@ -427,14 +426,14 @@ boolean LoadTheGame(int file,int x,int y)
CA_FarRead (file,(void *)tilemap,sizeof(tilemap));
checksum = DoChecksum((byte *)tilemap,sizeof(tilemap),checksum);
DiskFlopAnim(x,y);
CA_FarRead (file,(void *)actorat,sizeof(actorat));
CA_FarRead(file,(void *)actorat,sizeof(actorat));
checksum = DoChecksum((byte *)actorat,sizeof(actorat),checksum);
CA_FarRead (file,(void *)areaconnect,sizeof(areaconnect));
CA_FarRead (file,(void *)areabyplayer,sizeof(areabyplayer));
CA_FarRead(file,(void *)areaconnect,sizeof(areaconnect));
CA_FarRead(file,(void *)areabyplayer,sizeof(areabyplayer));
InitActorList ();
InitActorList();
DiskFlopAnim(x,y);
CA_FarRead (file,(void *)player,sizeof(*player));
......@@ -540,7 +539,7 @@ void ShutdownId()
==================
*/
const float radtoint = (float)FINEANGLES/2.0f/PI;
static const float radtoint = (float)FINEANGLES/2.0f/PI;
void BuildTables()
{
......@@ -564,9 +563,6 @@ void BuildTables()
//
// costable overlays sintable with a quarter phase shift
// 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;
......@@ -584,9 +580,6 @@ void BuildTables()
}
//===========================================================================
/*
====================
=
......@@ -637,10 +630,6 @@ void CalcProjection(long focal)
}
}
//===========================================================================
/*
===================
=
......@@ -964,7 +953,7 @@ void DoJukebox()
MenuFadeOut();
#if !defined(SPEAR) || !defined(UPLOAD)
start = (rand() % 3) * 6;
start = (US_RndT() % 3) * 6;
#else
start = 0;
#endif
......@@ -1287,8 +1276,6 @@ int WolfMain(int argc, char *argv[])
printf("Now Loading %s\n", GAMENAME);
srand(time(NULL));
CheckForEpisodes();
InitGame();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment