Commit c7e721f4 authored by Steven Fuller's avatar Steven Fuller

Minor changes (particularly no longer does id_vh use graph_mem), added

files for future vi_glx and vi_xlib code and updated the Makefile
parent aa4e3713
......@@ -3,30 +3,38 @@ CC = gcc
#CFLAGS = -g -Wall -pedantic
CFLAGS = -g
#CFLAGS = -Os
OBJS = objs.o misc.o id_ca.o id_sd.o id_vh.o id_us.o vi_svga.o \
OBJS = objs.o misc.o id_ca.o id_sd.o id_vh.o id_us.o \
wl_scale.o wl_draw.o wl_act1.o wl_act2.o wl_agent.o wl_game.o \
wl_inter.o wl_menu.o wl_play.o wl_state.o wl_text.o wl_main.o \
wl_debug.o
SOBJS = $(OBJS) vi_svga.o
XOBJS = $(OBJS) vi_xlib.o
LFLAGS = -lm -lvga
LFLAGS = -lm
#LFLAGS = -lm -lvga ElectricFence-2.2.2/libefence.a -lpthread
SLFLAGS = $(LFLAGS) -lvga
XLFLAGS = $(LFLAGS) -L/usr/X11R6/lib -lX11
NASM = nasm
.SUFFIXES: .asm
all: wolf3d
all: swolf3d xwolf3d
$(OBJS): version.h id_heads.h
$(SOBJS): version.h id_heads.h
$(XOBJS): version.h id_heads.h
.asm.o:
$(NASM) -f elf -o $@ $<
wolf3d: $(OBJS)
gcc -o wolf3d $(OBJS) $(LFLAGS)
swolf3d: $(SOBJS)
gcc -o swolf3d $(SOBJS) $(SLFLAGS)
xwolf3d: $(XOBJS)
gcc -o xwolf3d $(XOBJS) $(XLFLAGS)
clean:
rm -rf wolf3d *.o
rm -rf swolf3d xwolf3d *.o
distclean: clean
rm -rf *~ DEADJOE
......
......@@ -242,7 +242,9 @@ boolean FizzleFade(unsigned xx, unsigned yy, unsigned width,unsigned height, uns
if ((x>width) || (y>height))
continue;
*(graph_mem + (xx+x) + (yy+y) * 320) = *(gfxbuf + (xx+x) + (yy+y) * 320);
VL_DirectPlot(xx+x, yy+y, xx+x, yy+y);
//*(graph_mem + (xx+x) + (yy+y) * 320) = *(gfxbuf + (xx+x) + (yy+y) * 320);
if (rndval == 1) /* entire sequence has been completed */
return false;
......
#ifndef __VI_SVGA_H__
#define __VI_SVGA_H__
#ifndef __VI_COMM_H__
#define __VI_COMM_H__
//===========================================================================
......@@ -36,6 +36,8 @@ void VL_MemToScreen(byte *source, int width, int height, int x, int y);
void VL_DeModeXize(byte *buf, int width, int height);
void VL_DirectPlot(int x1, int y1, int x2, int y2);
#define MaxPlayers 4
#define MaxJoys 2
#define NumCodes 128
......
This diff is collapsed.
......@@ -15,6 +15,7 @@ void VL_WaitVBL(int vbls)
void VW_UpdateScreen()
{
/* VL_WaitVBL(1); */
memcpy(graph_mem, gfxbuf, 64000);
}
......@@ -283,10 +284,6 @@ void VL_ColorBorder (int color)
=============================================================================
*/
byte pixmasks[4] = {1,2,4,8};
byte leftmasks[4] = {15,14,12,8};
byte rightmasks[4] = {1,3,7,15};
/*
=================
=
......@@ -399,6 +396,11 @@ void VL_DeModeXize(byte *buf, int width, int height)
free(mem);
}
void VL_DirectPlot(int x1, int y1, int x2, int y2)
{
*(graph_mem + x1 + y1 * 320) = *(gfxbuf + x2 + y2 * 320);
}
/*
=============================================================================
......@@ -822,7 +824,8 @@ void IN_ReadControl(int player,ControlInfo *info)
mx = my = motion_None;
buttons = 0;
keyboard_update();
//keyboard_update();
IN_CheckAck();
switch (type = Controls[player])
{
......@@ -918,17 +921,9 @@ void IN_StartAck(void)
btnstate[i] = true;
}
int flipz;
boolean IN_CheckAck (void)
{
unsigned i,buttons;
if (flipz == 1) {
flipz = 0;
return false;
}
flipz++;
while (keyboard_update()) ; /* get all events */
......
This diff is collapsed.
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