Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Size tweaks.

git-svn-id: svn+ssh://jay/var/svn/wolf/trunk@161 32837ae5-38f0-4cfd-8401-3ff76d8497c4
  • Loading branch information...
commit e2a26aef36308469325fb6ef99301bd2d9ea1f81 1 parent 5387c49
paul authored
View
4 Makefile
@@ -19,7 +19,7 @@ HOSTCFLAGS = -DHOST -g -O2
OBJS = objs.o misc.o id_ca.o id_vh.o id_us.o \
wl_act1.o wl_act2.o wl_act3.o wl_agent.o wl_game.o \
wl_inter.o wl_menu.o wl_play.o wl_state.o wl_main.o \
- wl_debug.o vi_comm.o tables.o mapheaders.o pagemap.c \
+ wl_debug.o vi_comm.o tables.o pagemap.c \
grstarts.o pictable.o pal4bit.o \
sprites.o walls.o mapdata.o
# net.o
@@ -59,7 +59,7 @@ $(XOBJS): version.h id_heads.h wl_def.h Makefile
$(DOBJS): version.h id_heads.h wl_def.h Makefile
$(EOBJS): version.h id_heads.h wl_def.h Makefile
$(PROGS): Makefile
-id_ca.o: huffman.h
+id_ca.o: huffman.h mapheaders.c
.asm.o:
$(NASM) -f elf -o $@ $<
View
5 build_mapheaders.c
@@ -19,9 +19,10 @@ int main()
fread(offsets, 4, 60, f);
fclose(f);
+ printf("#ifndef HOST\n");
+ printf("#define RLEWtag 0x%x\n", rlew);
+ printf("#else\n");
printf("#include \"wl_def.h\"\n");
- printf("const word RLEWtag = 0x%x;\n", rlew);
- printf("#ifdef HOST\n");
printf("const maptype mapheaderseg[NUMMAPS] = {\n");
f = fopen("gamemaps." GAMEEXT, "rb");
for (i = 0; i < NUMMAPS; i++)
View
8 id_ca.c
@@ -20,7 +20,9 @@ typedef struct
=============================================================================
*/
-#ifndef ENABLE_PRECOMPILE
+#ifdef ENABLE_PRECOMPILE
+#include "mapheaders.c"
+#else
static word RLEWtag;
maptype *mapheaderseg[NUMMAPS];
#endif
@@ -874,10 +876,6 @@ void MM_SetLock(memptr *baseptr, boolean locked)
}
#endif
-void MM_SortMem()
-{
-}
-
#ifndef ENABLE_PRECOMPILE
static boolean PMStarted;
View
2  id_ca.h
@@ -30,7 +30,6 @@ typedef byte ms0;
extern ms0 mapseg0[64 * 64];
#ifdef ENABLE_PRECOMPILE
extern const byte *const MapPlane[NUMMAPS * 2];
-extern const word RLEWtag;
extern const maptype mapheaderseg[NUMMAPS];
#else
extern maptype *mapheaderseg[NUMMAPS];
@@ -70,7 +69,6 @@ void MM_FreePtr(memptr *baseptr);
void MM_SetPurge(memptr *baseptr, myint purge);
void MM_SetLock(memptr *baseptr, boolean locked);
-void MM_SortMem();
#define PMPageSize 4096
View
1  vi_bare.c
@@ -224,7 +224,6 @@ void INL_Update()
/* Graphics bits. */
byte framebuffer[128 * 64 / 2];
-byte *gfxbuf = framebuffer;
void VL_Startup()
{
View
5 vi_comm.h
@@ -3,7 +3,12 @@
/* ======================================================================== */
+#ifdef LUMINARY
+extern byte framebuffer[];
+#define gfxbuf framebuffer
+#else
extern byte *gfxbuf;
+#endif
extern const byte pal4bit[256];
#ifdef LUMINARY
View
2  wl_act2.c
@@ -1871,7 +1871,7 @@ void SpawnHitler(myint tilex, myint tiley)
void A_HitlerMorph (objtype *ob)
{
- word hitpoints[4]={500,700,800,900};
+ const word hitpoints[4]={500,700,800,900};
SpawnNewObj (ob->tilex,ob->tiley,s_hitlerchase1);
new->speed = SPDPATROL*5;
View
16 wl_agent.c
@@ -41,9 +41,10 @@ objtype *LastAttacker;
*/
+/* ??? Does this need to be so big? */
static const struct atkinf
{
- signed char tics, attack, frame; // attack is 1 for gun, 2 for knife
+ signed char tics:4, attack:4, frame:4; // attack is 1 for gun, 2 for knife
} attackinfo[4][14] =
{
{ {6,0,1},{6,2,2},{6,0,3},{6,-1,4} },
@@ -52,7 +53,6 @@ static const struct atkinf
{ {6,0,1},{6,1,2},{6,4,3},{6,-1,4} },
};
-void DrawWeapon();
void GiveWeapon(myint weapon);
void GiveAmmo(myint ammo);
@@ -187,11 +187,10 @@ void ControlMovement(objtype *ob)
==================
*/
+#ifndef EMBEDDED
void StatusDrawPic(unsigned x, unsigned y, unsigned picnum)
{
-#ifndef EMBEDDED
VWB_DrawPic(x*8, y+160, picnum);
-#endif
}
@@ -205,7 +204,6 @@ void StatusDrawPic(unsigned x, unsigned y, unsigned picnum)
void DrawFace()
{
-#ifndef EMBEDDED
if (gamestate.health) {
#ifdef SPEAR
if (godmode)
@@ -221,11 +219,9 @@ void DrawFace()
#endif
StatusDrawPic (17,4,FACE8APIC);
}
-#endif
}
-#ifndef EMBEDDED
/*
===============
=
@@ -479,6 +475,7 @@ void GivePoints(long points)
//===========================================================================
+#ifndef EMBEDDED
/*
==================
=
@@ -489,9 +486,7 @@ void GivePoints(long points)
void DrawWeapon()
{
-#ifndef EMBEDDED
StatusDrawPic(32,8,KNIFEPIC+gamestate.weapon);
-#endif
}
/*
@@ -504,7 +499,6 @@ void DrawWeapon()
void DrawKeys()
{
-#ifndef EMBEDDED
if (gamestate.keys & 1)
StatusDrawPic(30,4,GOLDKEYPIC);
else
@@ -514,8 +508,8 @@ void DrawKeys()
StatusDrawPic(30,20,SILVERKEYPIC);
else
StatusDrawPic(30,20,NOKEYPIC);
-#endif
}
+#endif
/*
==================
View
17 wl_def.h
@@ -916,8 +916,6 @@ extern memptr demobuffer;
#endif
-void StatusDrawPic(unsigned x, unsigned y, unsigned picnum);
-
void InitRedShifts (void);
void FinishPaletteShifts (void);
@@ -1031,7 +1029,6 @@ extern myint anglefrac;
extern myint facecount;
void SpawnPlayer (myint tilex, myint tiley, myint dir);
-void DrawFace (void);
void DrawHealth (void);
void TakeDamage (myint points,objtype *attacker);
void HealSelf (myint points);
@@ -1040,14 +1037,24 @@ void DrawLives (void);
void GiveExtraMan (void);
void DrawScore (void);
void GivePoints (long points);
-void DrawWeapon (void);
-void DrawKeys (void);
void GiveWeapon (myint weapon);
void DrawAmmo (void);
void GiveAmmo (myint ammo);
void GiveKey (myint key);
void GetBonus (statobj_t *check);
+#ifdef EMBEDDED
+#define DrawKeys() do {} while(0)
+#define DrawWeapon() do {} while(0)
+#define DrawFace() do {} while(0)
+#define StatusDrawPic(x,y,picnum) do {} while(0)
+#else
+void DrawKeys (void);
+void DrawWeapon (void);
+void DrawFace (void);
+void StatusDrawPic(unsigned x, unsigned y, unsigned picnum);
+
+#endif
void Thrust (myint angle, long speed);
/*
View
22 wl_draw.c
@@ -404,7 +404,7 @@ static void DrawScaleds()
==============
*/
-static const myint weaponscale[NUMWEAPONS] = {SPR_KNIFEREADY,SPR_PISTOLREADY
+static const short weaponscale[NUMWEAPONS] = {SPR_KNIFEREADY,SPR_PISTOLREADY
,SPR_MACHINEGUNREADY,SPR_CHAINREADY};
static void DrawPlayerWeapon()
@@ -616,19 +616,19 @@ void DrawPlanes()
/* ======================================================================== */
-static const unsigned myint Ceiling[]=
+static const byte Ceiling[]=
{
#ifndef SPEAR
- 0x1d1d,0x1d1d,0x1d1d,0x1d1d,0x1d1d,0x1d1d,0x1d1d,0x1d1d,0x1d1d,0xbfbf,
- 0x4e4e,0x4e4e,0x4e4e,0x1d1d,0x8d8d,0x4e4e,0x1d1d,0x2d2d,0x1d1d,0x8d8d,
- 0x1d1d,0x1d1d,0x1d1d,0x1d1d,0x1d1d,0x2d2d,0xdddd,0x1d1d,0x1d1d,0x9898,
+ 0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0xbf,
+ 0x4e,0x4e,0x4e,0x1d,0x8d,0x4e,0x1d,0x2d,0x1d,0x8d,
+ 0x1d,0x1d,0x1d,0x1d,0x1d,0x2d,0xdd,0x1d,0x1d,0x98,
- 0x1d1d,0x9d9d,0x2d2d,0xdddd,0xdddd,0x9d9d,0x2d2d,0x4d4d,0x1d1d,0xdddd,
- 0x7d7d,0x1d1d,0x2d2d,0x2d2d,0xdddd,0xd7d7,0x1d1d,0x1d1d,0x1d1d,0x2d2d,
- 0x1d1d,0x1d1d,0x1d1d,0x1d1d,0xdddd,0xdddd,0x7d7d,0xdddd,0xdddd,0xdddd
+ 0x1d,0x9d,0x2d,0xdd,0xdd,0x9d,0x2d,0x4d,0x1d,0xdd,
+ 0x7d,0x1d,0x2d,0x2d,0xdd,0xd7,0x1d,0x1d,0x1d,0x2d,
+ 0x1d,0x1d,0x1d,0x1d,0xdd,0xdd,0x7d,0xdd,0xdd,0xdd
#else
- 0x6f6f,0x4f4f,0x1d1d,0xdede,0xdfdf,0x2e2e,0x7f7f,0x9e9e,0xaeae,0x7f7f,
- 0x1d1d,0xdede,0xdfdf,0xdede,0xdfdf,0xdede,0xe1e1,0xdcdc,0x2e2e,0x1d1d,0xdcdc
+ 0x6f,0x4f,0x1d,0xde,0xdf,0x2e,0x7f,0x9e,0xae,0x7f,
+ 0x1d,0xde,0xdf,0xde,0xdf,0xde,0xe1,0xdc,0x2e,0x1d,0xdc
#endif
};
@@ -642,7 +642,7 @@ static const unsigned myint Ceiling[]=
static void ClearScreen()
{
- unsigned myint ceiling = Ceiling[gamestate.episode*10+mapon] & 0xFF;
+ unsigned myint ceiling = Ceiling[gamestate.episode*10+mapon];
unsigned myint floor = 0x19;
VL_Bar(xoffset, yoffset, viewwidth, sviewheight / 2, ceiling);
View
1  wl_game.c
@@ -34,7 +34,6 @@ static const myint ElevatorBackTo[]={ 1, 1, 7, 3, 5, 3};
void ClearMemory()
{
- MM_SortMem();
}
/*
View
3  wl_menu.c
@@ -344,7 +344,6 @@ void US_ControlPanel(byte scancode)
StartCPMusic (XJAZNAZI_MUS);
UnCacheLump(OPTIONS_LUMP_START,OPTIONS_LUMP_END);
UnCacheLump(BACKDROP_LUMP_START,BACKDROP_LUMP_END);
- MM_SortMem();
ClearMemory();
CA_CacheGrChunk (IDGUYS1PIC);
@@ -388,7 +387,6 @@ void US_ControlPanel(byte scancode)
break;
case backtodemo:
- MM_SortMem();
StartGame=1;
if (!ingame)
StartCPMusic(INTROSONG);
@@ -422,7 +420,6 @@ void US_ControlPanel(byte scancode)
#ifdef SPEAR
UnCacheLump(OPTIONS_LUMP_START, OPTIONS_LUMP_END);
- MM_SortMem();
#endif
}
Please sign in to comment.
Something went wrong with that request. Please try again.