- SW: Remove ON pre-processor define and eliminate mytypes.h.

This commit is contained in:
Mitchell Richters 2021-12-29 19:27:13 +11:00 committed by Christoph Oelckers
parent 3cf9450bd8
commit bf7437c827
17 changed files with 17 additions and 75 deletions

View file

@ -31,7 +31,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "names2.h"
#include "panel.h"
#include "game.h"
#include "mytypes.h"
#include "misc.h"
#include "gamecontrol.h"

View file

@ -36,7 +36,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "jsector.h"
#include "mytypes.h"
#include "gamecontrol.h"
#include "gamefuncs.h"
#include "network.h"

View file

@ -49,7 +49,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "i_interface.h"
#include "mytypes.h"
#include "menus.h"

View file

@ -37,7 +37,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "gamefuncs.h"
#include "coreactor.h"
#include "mytypes.h"
#include "sounds.h"
#include "gamecvars.h"
#include "raze_sound.h"
@ -59,6 +58,10 @@ class DSWActor;
using HitInfo = THitInfo<DSWActor>;
using Collision = TCollision<DSWActor>;
constexpr int BIT(int shift)
{
return 1 << shift;
}
typedef struct
{

View file

@ -1962,7 +1962,7 @@ int DoCarryFlag(DSWActor* actor)
if (fown != nullptr)
{
if (fown->spr.lotag) // Trigger everything if there is a lotag
DoMatchEverything(nullptr, fown->spr.lotag, ON);
DoMatchEverything(nullptr, fown->spr.lotag, 1);
}
if (!TEST_BOOL1(fown))
{
@ -1974,7 +1974,7 @@ int DoCarryFlag(DSWActor* actor)
if (fown->user.filler >= SP_TAG5(fown))
{
fown->user.filler = 0;
DoMatchEverything(nullptr, SP_TAG6(fown), ON);
DoMatchEverything(nullptr, SP_TAG6(fown), 1);
}
}
}
@ -2092,7 +2092,7 @@ int DoCarryFlagNoDet(DSWActor* actor)
if (actor->user.flagOwnerActor != nullptr)
{
if (fown->spr.lotag) // Trigger everything if there is a lotag
DoMatchEverything(nullptr, fown->spr.lotag, ON);
DoMatchEverything(nullptr, fown->spr.lotag, 1);
fown->user.WaitTics = 0; // Tell it to respawn
}
if (!TEST_BOOL1(fown))
@ -2105,7 +2105,7 @@ int DoCarryFlagNoDet(DSWActor* actor)
if (fown->user.filler >= SP_TAG5(fown))
{
fown->user.filler = 0;
DoMatchEverything(nullptr, SP_TAG6(fown), ON);
DoMatchEverything(nullptr, SP_TAG6(fown), 1);
}
}
}

View file

@ -136,7 +136,7 @@ void DoLightingMatch(short match, short state)
if (state == -1)
state = !TEST_BOOL1(itActor);
if (state == ON)
if (state == 1)
{
SET_BOOL1(itActor);
itActor->spr.shade = -LIGHT_MaxBright(itActor);
@ -163,7 +163,7 @@ void DoLightingMatch(short match, short state)
if (state == -1)
state = !TEST_BOOL1(itActor);
if (state == ON)
if (state == 1)
{
// allow fade or flicker
SET_BOOL1(itActor);
@ -186,7 +186,7 @@ void DoLightingMatch(short match, short state)
//if (state == -1)
// state = !TEST_BOOL1(itActor);
if (state == ON)
if (state == 1)
{
if (LIGHT_Dir(itActor) == 1)
{
@ -214,7 +214,7 @@ void DoLightingMatch(short match, short state)
if (state == -1)
state = !TEST_BOOL1(itActor);
if (state == ON)
if (state == 1)
{
// allow fade or flicker
SET_BOOL1(itActor);

View file

@ -27,7 +27,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "build.h"
#include "mytypes.h"
#include "names2.h"
#include "panel.h"
#include "game.h"

View file

@ -751,7 +751,7 @@ int PachinkoCheckWin(DSWActor* actor)
// Do a possible combo switch
if (ComboSwitchTest(TAG_COMBO_SWITCH_EVERYTHING, actor->spr.hitag))
{
DoMatchEverything(Player+myconnectindex, actor->spr.hitag, ON);
DoMatchEverything(Player+myconnectindex, actor->spr.hitag, 1);
}
ActorCoughItem(actor); // I WON! I WON!

View file

@ -148,11 +148,11 @@ short DoSOevent(short match, short state)
else
{
SET_BOOL3(me_act);
state = ON;
state = 1;
}
}
if (state == ON)
if (state == 1)
{
spin_adj = (int)SP_TAG3(me_act);
vel_adj = SP_TAG7(me_act);

View file

@ -1,52 +0,0 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 1997, 2005 - 3D Realms Entertainment
This file is part of Shadow Warrior version 1.2
Shadow Warrior is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Original Source: 1997 - Frank Maddin and Jim Norwood
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
*/
//-------------------------------------------------------------------------
#ifndef TYPES_H
#define TYPES_H
#define ON 1
/*
===========================
=
= Bit manipulation
=
===========================
*/
// mask definitions
constexpr int BIT(int shift)
{
return 1 << shift;
}
#endif

View file

@ -30,7 +30,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "names2.h"
#include "panel.h"
#include "game.h"
#include "mytypes.h"
#include "gamecontrol.h"
#include "gstrings.h"

View file

@ -28,7 +28,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#define PANEL_H
#include "mytypes.h"
#include "game.h"
BEGIN_SW_NS

View file

@ -27,7 +27,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "build.h"
#include "mytypes.h"
#include "names2.h"
#include "panel.h"
#include "game.h"

View file

@ -794,7 +794,7 @@ int DoSerpMove(DSWActor* actor)
int DoDeathSpecial(DSWActor* actor)
{
DoMatchEverything(nullptr, actor->spr.lotag, ON);
DoMatchEverything(nullptr, actor->spr.lotag, 1);
if (!SW_SHAREWARE)
{

View file

@ -28,7 +28,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "build.h"
#include "names2.h"
#include "mytypes.h"
#include "panel.h"
#include "game.h"

View file

@ -30,7 +30,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
//
//****************************************************************************
#include "mytypes.h"
#ifndef sw_sounds_public_

View file

@ -741,7 +741,7 @@ int DoSumoDeathMelt(DSWActor* actor)
InitChemBomb(actor);
actor->user.ID = 0;
DoMatchEverything(nullptr, actor->spr.lotag, ON);
DoMatchEverything(nullptr, actor->spr.lotag, 1);
if (!SW_SHAREWARE)
{
// Resume the regular music - in a hack-free fashion.