Initial import: Tesla Release 4.10 (Tesla:BattleTech & Tesla:Red Planet)
Archival snapshot of the Virtual World Entertainment Tesla cockpit software, 1994-1996: MUNGA engine and L4 pod layer source (Borland C++ 5.0), BT/RP game code, and game content (models, audio, maps, gauges, Division renderer data). Includes third-party libraries: Division dVS/DPL graphics, HMI SOS audio, WATTCP networking. Files are preserved byte-for-byte (.gitattributes disables all line-ending conversion). README.md documents the layout, target hardware, and toolchain. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
#include "testbt.hpp"
|
||||
|
||||
//#############################################################################
|
||||
// Test Class -- AmmoBin
|
||||
//
|
||||
Logical AmmoBin::TestClass(Mech &)
|
||||
{
|
||||
return True;
|
||||
|
||||
}
|
||||
|
||||
void AmmoBin::ResetToInitialState()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
#if !defined(BT_HPP)
|
||||
# define BT_HPP
|
||||
|
||||
# if !defined(MUNGA_HPP)
|
||||
# include <munga.hpp>
|
||||
# endif
|
||||
|
||||
# if !defined(NO_PRECOMPILED_HEADERS)
|
||||
|
||||
# if !defined(MECH_HPP)
|
||||
# include <mech.hpp>
|
||||
# endif
|
||||
|
||||
# if !defined(BTPLAYER_HPP)
|
||||
# include <btplayer.hpp>
|
||||
# endif
|
||||
|
||||
# if !defined(MECHSUB_HPP)
|
||||
# include <mechsub.hpp>
|
||||
# endif
|
||||
|
||||
# endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,112 @@
|
||||
.autodepend
|
||||
.cacheautodepend
|
||||
.suffixes: .cpp
|
||||
|
||||
!ifndef BTYPE
|
||||
!error BTYPE macro not supplied
|
||||
!endif
|
||||
|
||||
!ifndef BPATH
|
||||
!error BPATH macro not supplied
|
||||
!endif
|
||||
|
||||
!include make.cfg
|
||||
!include $(BPATH)
|
||||
|
||||
!ifndef BT_ROOT
|
||||
!error BT_ROOT macro is not defined
|
||||
!endif
|
||||
|
||||
TARGET_DIR = $(BT_ROOT)\$(BTYPE)
|
||||
TARGET_PATH = $(TARGET_DIR)\\
|
||||
.path.obj = $(TARGET_DIR)
|
||||
.path.lib = $(LIBRARY_PATH)
|
||||
|
||||
LIB_PREFIX = -+$(TARGET_DIR)\\
|
||||
|
||||
CFG_FILE = $(TARGET_DIR)\$(BTYPE).cfg
|
||||
HEADER_FILE = bt$(BTYPE).csm
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Library targets
|
||||
#
|
||||
all: $(CFG_FILE) $(TARGET_DIR)\bt.lib
|
||||
|
||||
clean:
|
||||
del $(TARGET_DIR)\*.obj
|
||||
del $(TARGET_DIR)\*.lib
|
||||
del $(TARGET_DIR)\*.bak
|
||||
del $(TARGET_DIR)\*.cfg
|
||||
|
||||
assemble:
|
||||
@echo No assembly targets
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Implicit rules
|
||||
#
|
||||
!include $(BTYPE).mak
|
||||
|
||||
!ifndef STARTUP_OBJ
|
||||
!error STARTUP_OBJ macro is not defined
|
||||
!endif
|
||||
|
||||
!ifndef STARTUP_LIBS
|
||||
!error STARTUP_LIBS macro is not defined
|
||||
!endif
|
||||
|
||||
{$(INCLUDE_PATH)}.cpp{$(TARGET_DIR)}.obj:
|
||||
$(BCC) @$(CFG_FILE) $< >>error.log
|
||||
|
||||
{$(INCLUDE_PATH)}.c{$(TARGET_DIR)}.obj:
|
||||
$(BCC) @$(CFG_FILE) $< >>error.log
|
||||
|
||||
{$(BT_ROOT)}.asm{$(TARGET_DIR)}.obj:
|
||||
tasm32 -ml $(TASM_OPTIONS) -i$(BT_ROOT) $<,$@ >>error.log
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Battletech library
|
||||
#
|
||||
BT_OBJS = \
|
||||
?btmssn.obj \
|
||||
?messmgr.obj \
|
||||
?mechdmg.obj \
|
||||
?dmgtable.obj \
|
||||
?mech.obj \
|
||||
?mech2.obj \
|
||||
?mech3.obj \
|
||||
?mech4.obj \
|
||||
?mechsub.obj \
|
||||
?mechtech.obj \
|
||||
?heat.obj \
|
||||
?mechmppr.obj \
|
||||
?powersub.obj \
|
||||
?sensor.obj \
|
||||
?gnrator.obj \
|
||||
?gyro.obj \
|
||||
?torso.obj \
|
||||
?hud.obj \
|
||||
?myomers.obj \
|
||||
?mechweap.obj \
|
||||
?emitter.obj \
|
||||
?ppc.obj \
|
||||
?projweap.obj \
|
||||
?mislanch.obj \
|
||||
?ammobin.obj \
|
||||
?gauss.obj \
|
||||
?projtile.obj \
|
||||
?misthrst.obj \
|
||||
?seeker.obj \
|
||||
?missile.obj \
|
||||
?btplayer.obj \
|
||||
?btteam.obj \
|
||||
?btdirect.obj \
|
||||
?btreg.obj \
|
||||
?btcnsl.obj \
|
||||
?bttool.obj
|
||||
|
||||
$(BT_OBJS:?=): $(CFG_FILE)
|
||||
|
||||
$(TARGET_DIR)\bt.lib: $(BT_OBJS:?=) $(BT_ROOT)\bt.mak
|
||||
tlib $@ $(LIB_OPTIONS) @&&|
|
||||
$(BT_OBJS:?=$(LIB_PREFIX))
|
||||
| >>error.log
|
||||
@@ -0,0 +1,107 @@
|
||||
//===========================================================================//
|
||||
// File: cnslmsgs.cpp //
|
||||
// Project: MUNGA Brick: //
|
||||
// Contents: Console messages //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Date Who Modification //
|
||||
// -------- --- -----------------------------------------------------------//
|
||||
// 06/02/95 ECH Initial coding. //
|
||||
// 06/03/95 GAH Added corresponding Macintosh message defintions. //
|
||||
// 10/05/95 GAH Added ConsoleApplicationEndMissionMessage. //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Copyright (C) 1994-1995, Virtual World Entertainment, Inc. //
|
||||
// All Rights reserved worldwide //
|
||||
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
|
||||
//===========================================================================//
|
||||
|
||||
#include <bt.hpp>
|
||||
#pragma hdrstop
|
||||
|
||||
#if !defined(BTCNSL_HPP)
|
||||
# include <btcnsl.hpp>
|
||||
#endif
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~ ConsolePlayerMechKilledMessage ~~~~~~~~~~~~~~~~~~~~~~
|
||||
ConsolePlayerMechKilledMessage::
|
||||
ConsolePlayerMechKilledMessage(
|
||||
HostID player_host_ID,
|
||||
HostID killer_host_ID
|
||||
):
|
||||
NetworkClient::Message(
|
||||
ConsolePlayerMechKilledMessageID,
|
||||
sizeof(ConsolePlayerMechKilledMessage)
|
||||
)
|
||||
{
|
||||
playerHostID = player_host_ID;
|
||||
killerHostID = killer_host_ID;
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~ ConsolePlayerMechScoreUpdateMessage ~~~~~~~~~~~~~~~~~~~~~~
|
||||
ConsolePlayerMechScoreUpdateMessage::
|
||||
ConsolePlayerMechScoreUpdateMessage(
|
||||
HostID player_host_ID,
|
||||
int score
|
||||
):
|
||||
NetworkClient::Message(
|
||||
ConsolePlayerMechScoreUpdateMessageID,
|
||||
sizeof(ConsolePlayerMechScoreUpdateMessage)
|
||||
)
|
||||
{
|
||||
playerHostID = player_host_ID;
|
||||
playerScore = score;
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~ ConsoleBTTeamScoreUpdateMessage ~~~~~~~~~~~~~~~~~~~~~~
|
||||
ConsoleBTTeamScoreUpdateMessage::
|
||||
ConsoleBTTeamScoreUpdateMessage(
|
||||
int team_ID,
|
||||
int score
|
||||
):
|
||||
NetworkClient::Message(
|
||||
ConsoleBTTeamScoreUpdateMessageID,
|
||||
sizeof(ConsoleBTTeamScoreUpdateMessage)
|
||||
)
|
||||
{
|
||||
teamID = team_ID;
|
||||
teamScore = score;
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~ ConsolePlayerMechDamagedMessage ~~~~~~~~~~~~~~~~~~~~~~
|
||||
ConsolePlayerMechDamagedMessage::
|
||||
ConsolePlayerMechDamagedMessage(
|
||||
HostID player_host_ID,
|
||||
HostID damager_host_ID,
|
||||
int loss,
|
||||
int damage_zone_index,
|
||||
Logical damage_zone_destroyed,
|
||||
int points_transfered,
|
||||
int weapon_index
|
||||
):
|
||||
NetworkClient::Message(
|
||||
ConsolePlayerMechDamagedMessageID,
|
||||
sizeof(ConsolePlayerMechDamagedMessage)
|
||||
)
|
||||
{
|
||||
playerHostID = player_host_ID;
|
||||
damagerHostID = damager_host_ID;
|
||||
damageLoss = loss;
|
||||
pointsTransfered = points_transfered;
|
||||
damageZoneIndex = damage_zone_index;
|
||||
damageZoneDestroyed = damage_zone_destroyed;
|
||||
weaponIndex = weapon_index;
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~ ConsolePlayerMechDeathWithoutHonorMessage ~~~~~~~~~~~~~~~~~~~
|
||||
ConsolePlayerMechDeathWithoutHonorMessage::
|
||||
ConsolePlayerMechDeathWithoutHonorMessage(
|
||||
HostID player_host_ID
|
||||
):
|
||||
NetworkClient::Message(
|
||||
ConsolePlayerMechDeathWithoutHonorMessageID,
|
||||
sizeof(ConsolePlayerMechDeathWithoutHonorMessage)
|
||||
)
|
||||
{
|
||||
playerHostID = player_host_ID;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
@@ -0,0 +1,76 @@
|
||||
//===========================================================================//
|
||||
// File: btdirect.hh //
|
||||
// Project: Red Planet //
|
||||
// Contents: Chooses from a Selection of Camerea's and provides information //
|
||||
// to any number of cameraship's as to which player to follow //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Date Who Modification //
|
||||
// -------- --- ---------------------------------------------------------- //
|
||||
// 01/15/95 JM Initial coding. //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Copyright (C) 1995, Virtual World Entertainment, Inc. //
|
||||
// All Rights reserved worldwide //
|
||||
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
|
||||
//===========================================================================//
|
||||
|
||||
#if !defined (BTDIRECT_HPP)
|
||||
# define BTDIRECT_HPP
|
||||
|
||||
# if !defined (DIRECTOR_HPP)
|
||||
# include <director.hpp>
|
||||
# endif
|
||||
|
||||
# if !defined (BTPLAYER_HPP) && 0
|
||||
# include <btplayer.hpp>
|
||||
# endif
|
||||
|
||||
|
||||
class BTCameraDirector :
|
||||
public CameraDirector
|
||||
{
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Shared Data support
|
||||
//
|
||||
public:
|
||||
|
||||
static Derivation ClassDerivations;
|
||||
static SharedData DefaultData;
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Simulation Support
|
||||
//
|
||||
public:
|
||||
|
||||
typedef void
|
||||
(BTCameraDirector::*Performance)(Scalar time_slice);
|
||||
|
||||
void
|
||||
SetPerformance(Performance performance)
|
||||
{
|
||||
Check(this);
|
||||
activePerformance = (Simulation::Performance)performance;
|
||||
}
|
||||
|
||||
void
|
||||
CreateBTCameraShip(Scalar);
|
||||
|
||||
void
|
||||
BeABTDirector(Scalar);
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Construction and Destruction Support
|
||||
//
|
||||
BTCameraDirector(
|
||||
MakeMessage *creation_message,
|
||||
SharedData &virtual_data = DefaultData
|
||||
);
|
||||
|
||||
static BTCameraDirector*
|
||||
BTCameraDirector::Make(CameraDirector::MakeMessage *creation_message);
|
||||
|
||||
~BTCameraDirector();
|
||||
|
||||
Logical
|
||||
TestInstance() const;
|
||||
};
|
||||
#endif
|
||||
@@ -0,0 +1,70 @@
|
||||
//===========================================================================//
|
||||
// File: btmssn.cpp //
|
||||
// Project: BattleTech //
|
||||
// Contents: Implementation Details for missions //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Date Who Modification //
|
||||
// -------- --- ---------------------------------------------------------- //
|
||||
// 04/07/95 ECH Initial coding. //
|
||||
// 09/12/95 JM added scenario //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Copyright (C) 1995, Virtual World Entertainment, Inc. //
|
||||
// All Rights reserved worldwide //
|
||||
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
|
||||
//===========================================================================//
|
||||
#include <bt.hpp>
|
||||
#pragma hdrstop
|
||||
|
||||
#if !defined(BTMSSN_HPP)
|
||||
# include <btmssn.hpp>
|
||||
#endif
|
||||
|
||||
#if !defined(NOTATION_HPP)
|
||||
# include <notation.hpp>
|
||||
#endif
|
||||
|
||||
//##########################################################################
|
||||
//########################### BTMission ################################
|
||||
//##########################################################################
|
||||
|
||||
BTMission::BTMission(
|
||||
NotationFile *notation_file,
|
||||
ResourceFile *resource_file
|
||||
):
|
||||
Mission(notation_file, resource_file)
|
||||
{
|
||||
Check(notation_file);
|
||||
Check(resource_file);
|
||||
|
||||
//
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Load Up Default Values
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
//
|
||||
|
||||
experienceLevel = BTMission::NoviceMode;
|
||||
advancedDamageOn = False;
|
||||
|
||||
int ret;
|
||||
ret = notation_file->GetEntry("mission", "temperature", &missionTemperature);
|
||||
if (!ret)
|
||||
{
|
||||
DEBUG_STREAM << "ERROR: no temperature in egg!\n";
|
||||
Exit(AbortExitCodeID);
|
||||
}
|
||||
missionTemperature += 273.15f; // Celsius to Kelvin conversion
|
||||
|
||||
}
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
//
|
||||
BTMission::~BTMission()
|
||||
{
|
||||
|
||||
}
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
//
|
||||
void
|
||||
BTMission::SetPlayerData(NotationFile*)
|
||||
{
|
||||
Fail("Should never reach BTMission::SetPlayerData() \n");
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
//===========================================================================//
|
||||
// File: btmssn.hpp //
|
||||
// Project: BattleTech //
|
||||
// Contents: Implementation Details for missions //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Date Who Modification //
|
||||
// -------- --- ---------------------------------------------------------- //
|
||||
// 04/07/95 ECH Initial coding. //
|
||||
// 09/12/95 JM added scenario //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Copyright (C) 1995, Virtual World Entertainment, Inc. //
|
||||
// All Rights reserved worldwide //
|
||||
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
|
||||
//===========================================================================//
|
||||
|
||||
#if !defined(BTMSSN_HPP)
|
||||
# define BTMSSN_HPP
|
||||
|
||||
# if !defined(MISSION_HPP)
|
||||
# include <mission.hpp>
|
||||
# endif
|
||||
|
||||
//##########################################################################
|
||||
//########################### BTMission ################################
|
||||
//##########################################################################
|
||||
|
||||
|
||||
class BTMission :
|
||||
public Mission
|
||||
{
|
||||
|
||||
public:
|
||||
enum {
|
||||
NoviceMode = 0,
|
||||
StandardMode,
|
||||
VeteranMode,
|
||||
ExpertMode,
|
||||
ExperienceLevelModeCount
|
||||
};
|
||||
|
||||
protected:
|
||||
|
||||
Enumeration experienceLevel;
|
||||
|
||||
CString
|
||||
roleName;
|
||||
CString
|
||||
teamName;
|
||||
|
||||
Logical
|
||||
advancedDamageOn;
|
||||
|
||||
Scalar
|
||||
missionTemperature;
|
||||
|
||||
CString
|
||||
patchName;
|
||||
|
||||
public:
|
||||
|
||||
BTMission(
|
||||
NotationFile *notation_file,
|
||||
ResourceFile *resources
|
||||
);
|
||||
|
||||
~BTMission();
|
||||
|
||||
void
|
||||
SetPlayerData(NotationFile *notation_file);
|
||||
|
||||
CString
|
||||
GetRoleName() const
|
||||
{ Check(this); return roleName; }
|
||||
|
||||
CString
|
||||
GetTeamName() const
|
||||
{ Check(this); return teamName; }
|
||||
|
||||
const CString
|
||||
GetPatchName()
|
||||
{Check(this); return patchName;}
|
||||
|
||||
const Scalar
|
||||
GetMissionTemperature()
|
||||
{Check(this); return missionTemperature;}
|
||||
|
||||
const Enumeration
|
||||
ExperienceLevel()
|
||||
{Check(this); return experienceLevel;}
|
||||
|
||||
const Logical
|
||||
AdvancedDamageOn()
|
||||
{Check(this); return advancedDamageOn;}
|
||||
|
||||
};
|
||||
#endif
|
||||
@@ -0,0 +1,162 @@
|
||||
//===========================================================================//
|
||||
// File: btreg.cc //
|
||||
// Project: MUNGA Brick: Registry Manager //
|
||||
// Contents: Interface specification for Registry Manager //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Date Who Modification //
|
||||
// -------- --- ---------------------------------------------------------- //
|
||||
// 11/22/94 ECH Initial coding. //
|
||||
// 11/29/94 JMA Changed Identities to IDs //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Copyright (C) 1994, Virtual World Entertainment, Inc. //
|
||||
// All Rights reserved worldwide //
|
||||
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
|
||||
//===========================================================================//
|
||||
|
||||
#include <bt.hpp>
|
||||
#pragma hdrstop
|
||||
|
||||
#if !defined(BTREG_HPP)
|
||||
# include <btreg.hpp>
|
||||
#endif
|
||||
|
||||
#if !defined(BTPLAYER_HPP)
|
||||
# include <btplayer.hpp>
|
||||
#endif
|
||||
|
||||
#if !defined(BTDIRECT_HPP)
|
||||
# include <btdirect.hpp>
|
||||
#endif
|
||||
|
||||
//
|
||||
// Registered classes...
|
||||
//
|
||||
#if !defined(MECH_HPP)
|
||||
# include <mech.hpp>
|
||||
#endif
|
||||
|
||||
#if !defined(PROJTILE_HPP)
|
||||
# include <projtile.hpp>
|
||||
#endif
|
||||
|
||||
#if !defined(MISSILE_HPP)
|
||||
# include <missile.hpp>
|
||||
#endif
|
||||
|
||||
#if !defined(BTTEAM_HPP)
|
||||
# include <btteam.hpp>
|
||||
#endif
|
||||
|
||||
//
|
||||
//~~~~~~~~~~~~~~~~
|
||||
// Munga Includes
|
||||
//~~~~~~~~~~~~~~~~
|
||||
//
|
||||
#if !defined(BTMSSN_HPP)
|
||||
# include <btmssn.hpp>
|
||||
#endif
|
||||
|
||||
#if !defined(DIRECTOR_HPP)
|
||||
# include <director.hpp>
|
||||
#endif
|
||||
|
||||
#if !defined(HOSTMGR_HPP)
|
||||
# include <hostmgr.hpp>
|
||||
#endif
|
||||
|
||||
#if !defined(APP_HPP)
|
||||
# include <app.hpp>
|
||||
#endif
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Registry ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
//
|
||||
//#############################################################################
|
||||
// Registry
|
||||
//#############################################################################
|
||||
//
|
||||
BTRegistry::BTRegistry(ResourceFile *)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
//#############################################################################
|
||||
// ~Registry
|
||||
//#############################################################################
|
||||
//
|
||||
BTRegistry::~BTRegistry()
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
//#############################################################################
|
||||
// GetStaticData
|
||||
//#############################################################################
|
||||
//
|
||||
Entity::SharedData*
|
||||
BTRegistry::GetStaticData(ClassID class_ID)
|
||||
{
|
||||
switch (class_ID)
|
||||
{
|
||||
case MechClassID:
|
||||
return &Mech::DefaultData;
|
||||
case ProjectileClassID:
|
||||
return &Projectile::DefaultData;
|
||||
case MissileClassID:
|
||||
return &Missile::DefaultData;
|
||||
case BTPlayerClassID:
|
||||
return &BTPlayer::DefaultData;
|
||||
case BTTeamClassID:
|
||||
return &BTTeam::DefaultData;
|
||||
default:
|
||||
return Registry::GetStaticData(class_ID);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
//#############################################################################
|
||||
// GetStaticData
|
||||
//#############################################################################
|
||||
//
|
||||
Player*
|
||||
BTRegistry::MakePlayer(Mission *mission)
|
||||
{
|
||||
Check(this);
|
||||
Check(mission);
|
||||
BTMission *bt_mission = Cast_Object(BTMission *, mission);
|
||||
|
||||
if (strcmp(mission->GetGameModel(), "camera"))
|
||||
{
|
||||
BTPlayer::MakeMessage
|
||||
make_player(
|
||||
BTPlayer::MakeMessageID,
|
||||
sizeof(BTPlayer::MakeMessage),
|
||||
BTPlayerClassID,
|
||||
EntityID::Null,
|
||||
ResourceDescription::NullResourceID,
|
||||
BTPlayer::DefaultFlags,
|
||||
Origin::Identity,
|
||||
mission->GetPlayerBitmapIndex(),
|
||||
bt_mission->GetRoleName(),
|
||||
bt_mission->GetTeamName()
|
||||
);
|
||||
return new BTPlayer(&make_player);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
BTCameraDirector::MakeMessage create_director(
|
||||
BTCameraDirector::MakeMessageID,
|
||||
sizeof(BTCameraDirector::MakeMessage),
|
||||
CameraDirectorClassID,
|
||||
EntityID::Null,
|
||||
ResourceDescription::NullResourceID,
|
||||
BTCameraDirector::DefaultFlags,
|
||||
Origin::Identity,
|
||||
mission->GetPlayerBitmapIndex()
|
||||
);
|
||||
return new BTCameraDirector(&create_director);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
//===========================================================================//
|
||||
// File: registry.hh //
|
||||
// Project: MUNGA Brick: Registry Manager //
|
||||
// Contents: Interface specification for Registry Manager //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Date Who Modification //
|
||||
// -------- --- ---------------------------------------------------------- //
|
||||
// 11/22/94 ECH Initial coding. //
|
||||
// 11/29/94 JMA Changed Identities to IDs //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Copyright (C) 1994, Virtual World Entertainment, Inc. //
|
||||
// All Rights reserved worldwide //
|
||||
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
|
||||
//===========================================================================//
|
||||
|
||||
#if !defined(BTREG_HPP)
|
||||
# define BTREG_HPP
|
||||
|
||||
# if !defined(REGISTRY_HPP)
|
||||
# include <registry.hpp>
|
||||
# endif
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Registry ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
//
|
||||
//--------------------------------------------------------------------
|
||||
// Registry
|
||||
//
|
||||
// Provides construction methods for entities.
|
||||
// Provides access to a classes static data.
|
||||
//--------------------------------------------------------------------
|
||||
//
|
||||
|
||||
class BTRegistry:
|
||||
public Registry
|
||||
{
|
||||
public:
|
||||
//
|
||||
//--------------------------------------------------------------------
|
||||
//--------------------------------------------------------------------
|
||||
// Public interface
|
||||
//--------------------------------------------------------------------
|
||||
//--------------------------------------------------------------------
|
||||
//
|
||||
|
||||
//
|
||||
//--------------------------------------------------------------------
|
||||
// Construction, Destruction, and testing
|
||||
//--------------------------------------------------------------------
|
||||
//
|
||||
BTRegistry(ResourceFile *);
|
||||
~BTRegistry();
|
||||
|
||||
//
|
||||
//--------------------------------------------------------------
|
||||
// GetStaticData
|
||||
//
|
||||
// Provides an interface by which the static data for a class
|
||||
// may be accessed.
|
||||
//--------------------------------------------------------------
|
||||
//
|
||||
Entity__SharedData*
|
||||
GetStaticData(ClassID entity_class);
|
||||
|
||||
//
|
||||
//-------------------------
|
||||
// Create the player object
|
||||
//-------------------------
|
||||
//
|
||||
Player*
|
||||
MakePlayer(Mission *mission);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,22 @@
|
||||
//===========================================================================//
|
||||
// File: btscnrl.cpp //
|
||||
// Project: MUNGA //
|
||||
// Contents: BT Scenario Role Specific Data //
|
||||
//------------------- -------------------------------------------------------//
|
||||
// Date Who Modification //
|
||||
// -------- --- ---------------------------------------------------------- //
|
||||
// 05/06/96 GDU Initial coding //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Copyright (C) 1996, Virtual World Entertainment, Inc. //
|
||||
// All Rights reserved worldwide //
|
||||
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
|
||||
//===========================================================================//
|
||||
|
||||
|
||||
#include <bt.hpp>
|
||||
#pragma hdrstop
|
||||
|
||||
|
||||
# if !defined(BTSCNRL_HPP)
|
||||
# include <btscnrl.hpp>
|
||||
# endif
|
||||
@@ -0,0 +1,152 @@
|
||||
//===========================================================================//
|
||||
// File: btteam.cpp //
|
||||
// Project: BattleTech //
|
||||
// Contents: BattleTech Team Specifications //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Date Who Modification //
|
||||
// -------- --- ---------------------------------------------------------- //
|
||||
// 01/11/96 JM initial coding //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Copyright (C) 1995, Virtual World Entertainment, Inc. //
|
||||
// All Rights reserved worldwide //
|
||||
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
|
||||
//===========================================================================//
|
||||
|
||||
#include <bt.hpp>
|
||||
#pragma hdrstop
|
||||
|
||||
#if !defined(BTTEAM_HPP)
|
||||
# include <btteam.hpp>
|
||||
#endif
|
||||
|
||||
#if !defined(HOSTMGR_HPP)
|
||||
# include <hostmgr.hpp>
|
||||
#endif
|
||||
|
||||
#if !defined(APP_HPP)
|
||||
# include <app.hpp>
|
||||
#endif
|
||||
|
||||
#if !defined(BTCNSL_HPP)
|
||||
# include <btcnsl.hpp>
|
||||
#endif
|
||||
|
||||
//#############################################################################
|
||||
//############################### BTTeam ###############################
|
||||
//#############################################################################
|
||||
|
||||
//#############################################################################
|
||||
// Shared Data Support
|
||||
//
|
||||
Derivation
|
||||
BTTeam::ClassDerivations(Team::ClassDerivations,"BTTeam");
|
||||
|
||||
BTTeam::SharedData
|
||||
BTTeam::DefaultData(
|
||||
BTTeam::ClassDerivations,
|
||||
BTTeam::MessageHandlers,
|
||||
BTTeam::AttributeIndex,
|
||||
BTTeam::StateCount,
|
||||
(BTTeam::MakeHandler)BTTeam::Make
|
||||
);
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
//
|
||||
void
|
||||
BTTeam::TeamSimulation(
|
||||
Scalar // time_slice
|
||||
)
|
||||
{
|
||||
Check(this);
|
||||
//
|
||||
//------------------------------------------------------------------------
|
||||
// Update the console every 15 seconds
|
||||
//------------------------------------------------------------------------
|
||||
//
|
||||
if (lastPerformance - lastConsoleUpdate >= 15.0f)
|
||||
{
|
||||
lastConsoleUpdate = lastPerformance;
|
||||
|
||||
//
|
||||
//---------------------------------------------
|
||||
// Tell the console (if there is one) our score
|
||||
//---------------------------------------------
|
||||
//
|
||||
Check(application);
|
||||
HostManager *host_manager = application->GetHostManager();
|
||||
Check(host_manager);
|
||||
Host *console_host = host_manager->GetConsoleHost();
|
||||
if (console_host)
|
||||
{
|
||||
Check(console_host);
|
||||
|
||||
ConsoleBTTeamScoreUpdateMessage
|
||||
score_message(ownerID, (int)teamScore);
|
||||
|
||||
application->SendMessage(
|
||||
console_host->GetHostID(),
|
||||
NetworkClient::ConsoleClientID,
|
||||
&score_message
|
||||
);
|
||||
}
|
||||
}
|
||||
Check_Fpu();
|
||||
}
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
//
|
||||
BTTeam::BTTeam(
|
||||
MakeMessage *creation_message,
|
||||
SharedData &shared_data
|
||||
) :
|
||||
Team (creation_message, shared_data)
|
||||
{
|
||||
lastConsoleUpdate = lastPerformance;
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
//
|
||||
BTTeam::~BTTeam()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
//
|
||||
BTTeam*
|
||||
BTTeam::Make(MakeMessage *creation_message)
|
||||
{
|
||||
Check_Fpu();
|
||||
return new BTTeam(creation_message);
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
//
|
||||
Logical
|
||||
BTTeam::CreateMakeMessage(
|
||||
MakeMessage *creation_message,
|
||||
NotationFile *model_file,
|
||||
const ResourceDirectories *directories
|
||||
)
|
||||
{
|
||||
Check(creation_message);
|
||||
Check(model_file);
|
||||
|
||||
if (!Team::CreateMakeMessage(creation_message, model_file, directories))
|
||||
{
|
||||
return False;
|
||||
}
|
||||
|
||||
creation_message->classToCreate = BTTeamClassID;
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
//
|
||||
Logical
|
||||
BTTeam::TestInstance() const
|
||||
{
|
||||
return IsDerivedFrom(ClassDerivations);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
//===========================================================================//
|
||||
// File: btteam.hpp //
|
||||
// Project: BattleTech //
|
||||
// Contents: BattleTech Team Specifications //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Date Who Modification //
|
||||
// -------- --- ---------------------------------------------------------- //
|
||||
// 01/11/96 JM initial coding //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Copyright (C) 1995, Virtual World Entertainment, Inc. //
|
||||
// All Rights reserved worldwide //
|
||||
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
|
||||
//===========================================================================//
|
||||
#if !defined (BTTEAM_HPP)
|
||||
# define BTTEAM_HPP
|
||||
|
||||
# if !defined (TEAM_HPP)
|
||||
# include <team.hpp>
|
||||
# endif
|
||||
|
||||
//##########################################################################
|
||||
//######################## CLASS BTTeam ##############################
|
||||
//##########################################################################
|
||||
class BTTeam :
|
||||
public Team
|
||||
{
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Shared Data support
|
||||
//
|
||||
public:
|
||||
|
||||
static Derivation
|
||||
ClassDerivations;
|
||||
|
||||
static SharedData
|
||||
DefaultData;
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Model Support
|
||||
//
|
||||
public:
|
||||
|
||||
typedef void
|
||||
(BTTeam::*Performance)(Scalar time_slice);
|
||||
|
||||
void
|
||||
SetPerformance(Performance performance)
|
||||
{
|
||||
Check(this);
|
||||
activePerformance = (Simulation::Performance)performance;
|
||||
}
|
||||
|
||||
void
|
||||
TeamSimulation(Scalar time_slice);
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Console Support
|
||||
//
|
||||
protected:
|
||||
|
||||
Time
|
||||
lastConsoleUpdate;
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Construction / Destruction Support
|
||||
//
|
||||
public:
|
||||
|
||||
BTTeam(
|
||||
MakeMessage *creation_message,
|
||||
SharedData &shared_data = DefaultData
|
||||
);
|
||||
|
||||
~BTTeam();
|
||||
|
||||
Logical
|
||||
TestInstance() const;
|
||||
|
||||
static BTTeam*
|
||||
Make(MakeMessage *creation_message);
|
||||
|
||||
static Logical
|
||||
CreateMakeMessage (
|
||||
MakeMessage *creation_message,
|
||||
NotationFile *model_file,
|
||||
const ResourceDirectories *directories
|
||||
);
|
||||
};
|
||||
#endif
|
||||
@@ -0,0 +1,209 @@
|
||||
//===========================================================================//
|
||||
// File: txttores.cpp //
|
||||
// Project: Resource Tools //
|
||||
// Author: Jerry Edsall //
|
||||
// Purpose: Program to convert Notation files to MUNGA .res files. //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Copyright (c) 1995 Virtual World Entertainment, Inc. //
|
||||
// All rights reserved worldwide. //
|
||||
// This unpublished source code is PROPRIETARY and CONFIDENTIAL. //
|
||||
//===========================================================================//
|
||||
|
||||
#include "bt.hpp"
|
||||
|
||||
#if !defined(BTTOOL_HPP)
|
||||
# include "bttool.hpp"
|
||||
#endif
|
||||
|
||||
#if !defined(FILEUTIL_HPP)
|
||||
# include <fileutil.hpp>
|
||||
#endif
|
||||
|
||||
#if !defined(MECH_HPP)
|
||||
# include "mech.hpp"
|
||||
#endif
|
||||
|
||||
#if !defined(BTPLAYER_HPP)
|
||||
# include "btplayer.hpp"
|
||||
#endif
|
||||
|
||||
#if !defined(PROJTILE_HPP)
|
||||
# include "projtile.hpp"
|
||||
#endif
|
||||
|
||||
#if !defined(MISSILE_HPP)
|
||||
# include "missile.hpp"
|
||||
#endif
|
||||
|
||||
#if !defined(BTTEAM_HPP)
|
||||
# include "btteam.hpp"
|
||||
#endif
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
//
|
||||
Logical
|
||||
BTTool::CreateMakeMessage(
|
||||
const char* class_name,
|
||||
Entity::MakeMessage *creation_message,
|
||||
NotationFile *model_file,
|
||||
const ResourceDirectories *directories
|
||||
)
|
||||
{
|
||||
if (!stricmp(class_name,"MechClassID"))
|
||||
{
|
||||
Mech::CreateMakeMessage(
|
||||
(Mech::MakeMessage*)creation_message,
|
||||
model_file,
|
||||
directories
|
||||
);
|
||||
return True;
|
||||
}
|
||||
else if (!stricmp(class_name, "BTTeamClassID"))
|
||||
{
|
||||
BTTeam::CreateMakeMessage(
|
||||
(BTTeam::MakeMessage*)creation_message,
|
||||
model_file,
|
||||
directories
|
||||
);
|
||||
return True;
|
||||
}
|
||||
|
||||
return
|
||||
ApplicationTool::CreateMakeMessage(
|
||||
class_name,
|
||||
creation_message,
|
||||
model_file,
|
||||
directories
|
||||
);
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
//
|
||||
void
|
||||
BTTool::CreateModelResource(
|
||||
ModelData &model_resources,
|
||||
const char *model_class,
|
||||
ResourceFile *resource_file,
|
||||
const char *model_name,
|
||||
NotationFile *model_file,
|
||||
const ResourceDirectories *directories
|
||||
)
|
||||
{
|
||||
if (!stricmp(model_class, "MechClassID"))
|
||||
{
|
||||
#if 0
|
||||
strcpy(ops_file_data, ops_name);
|
||||
strcat(ops_file_data, "::Standard::Vehicle::");
|
||||
strcat(ops_file_data, model_name );
|
||||
strcpy(ops_file_page, ops_name);
|
||||
strcat(ops_file_page, "::Standard::VehicleList");
|
||||
|
||||
ops_file->AppendEntry(ops_file_page, "vehicle", ops_file_data);
|
||||
ops_file->SetEntry(ops_file_data, "tag", model_name );
|
||||
ops_file->SetEntry(ops_file_data, "classID", "BTVh");
|
||||
ops_file->AppendEntry(ops_file_data, NULL, (char *)NULL);
|
||||
#endif
|
||||
|
||||
model_resources.gameResourceID =
|
||||
Mech::CreateModelResource(
|
||||
resource_file,
|
||||
model_name,
|
||||
model_file,
|
||||
directories
|
||||
);
|
||||
model_resources.subsystemResourceID =
|
||||
Mech::CreateSubsystemStream(
|
||||
resource_file,
|
||||
model_name,
|
||||
model_file,
|
||||
directories
|
||||
);
|
||||
model_resources.damageZoneResourceID =
|
||||
Mech::CreateDamageZoneStream(
|
||||
resource_file,
|
||||
model_name,
|
||||
model_file,
|
||||
directories
|
||||
);
|
||||
model_resources.skeletonResourceID =
|
||||
Mech::CreateSkeletonStream(
|
||||
resource_file,
|
||||
model_name,
|
||||
model_file,
|
||||
directories
|
||||
);
|
||||
model_resources.explosionTableResourceID =
|
||||
Mech::CreateExplosionTableStream(
|
||||
resource_file,
|
||||
model_name,
|
||||
model_file,
|
||||
directories
|
||||
);
|
||||
}
|
||||
else if (!stricmp(model_class, "ProjectileClassID"))
|
||||
{
|
||||
model_resources.gameResourceID =
|
||||
Projectile::CreateModelResource(
|
||||
resource_file,
|
||||
model_name,
|
||||
model_file,
|
||||
directories
|
||||
);
|
||||
}
|
||||
else if (!stricmp(model_class, "MissileClassID"))
|
||||
{
|
||||
model_resources.gameResourceID =
|
||||
Missile::CreateModelResource(
|
||||
resource_file,
|
||||
model_name,
|
||||
model_file,
|
||||
directories
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
ApplicationTool::CreateModelResource(
|
||||
model_resources,
|
||||
model_class,
|
||||
resource_file,
|
||||
model_name,
|
||||
model_file,
|
||||
directories
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
//
|
||||
ResourceDescription::ResourceID
|
||||
BTTool::CreateControlMappingStream(
|
||||
const char *model_class,
|
||||
const char *mapping_name,
|
||||
NotationFile *mapping_file,
|
||||
ResourceFile *resource_file,
|
||||
const char *model_name,
|
||||
NotationFile *model_file,
|
||||
const ResourceDirectories *directories,
|
||||
PlatformTool *current_tool
|
||||
)
|
||||
{
|
||||
if (!stricmp(model_class, "MechClassID"))
|
||||
{
|
||||
return
|
||||
Mech::CreateControlMappingStream(
|
||||
mapping_name,
|
||||
mapping_file,
|
||||
platformTool->GetControlMappingFunction(),
|
||||
resource_file,
|
||||
model_name,
|
||||
model_file,
|
||||
directories,
|
||||
current_tool
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
//===========================================================================//
|
||||
// File: txttores.hpp //
|
||||
// Project: Art Tools //
|
||||
// Author: Jerry Edsall //
|
||||
// Purpose: Program to convert Notation files to MUNGA .res files. //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Copyright (c) 1995 Virtual World Entertainment, Inc. //
|
||||
// All rights reserved worldwide. //
|
||||
// This unpublished source code is PROPRIETARY and CONFIDENTIAL. //
|
||||
//===========================================================================//
|
||||
|
||||
#if !defined(BTTOOL_HPP)
|
||||
# define BTTOOL_HPP
|
||||
|
||||
# if !defined(TOOL_HPP)
|
||||
# include <tool.hpp>
|
||||
# endif
|
||||
|
||||
//##########################################################################
|
||||
//############################ RPTool ################################
|
||||
//##########################################################################
|
||||
|
||||
class BTTool:
|
||||
public ApplicationTool
|
||||
{
|
||||
protected:
|
||||
Logical
|
||||
CreateMakeMessage(
|
||||
const char* class_name,
|
||||
Entity::MakeMessage *creation_message,
|
||||
NotationFile *model_file,
|
||||
const ResourceDirectories *directories
|
||||
);
|
||||
|
||||
void
|
||||
CreateModelResource(
|
||||
ModelData &model_resources,
|
||||
const char *model_class,
|
||||
ResourceFile *resource_file,
|
||||
const char *model_name,
|
||||
NotationFile *model_file,
|
||||
const ResourceDirectories *directories
|
||||
);
|
||||
|
||||
ResourceDescription::ResourceID
|
||||
CreateControlMappingStream(
|
||||
const char *model_class,
|
||||
const char *mapping_name,
|
||||
NotationFile *mapping_file,
|
||||
ResourceFile *resource_file,
|
||||
const char *model_name,
|
||||
NotationFile *model_file,
|
||||
const ResourceDirectories *directories,
|
||||
PlatformTool *current_tool
|
||||
);
|
||||
|
||||
public:
|
||||
BTTool(PlatformTool *platform):
|
||||
ApplicationTool(platform)
|
||||
{}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
#include "testbt.hpp"
|
||||
|
||||
//#############################################################################
|
||||
// Test Class -- Emitter
|
||||
//
|
||||
|
||||
Logical
|
||||
Emitter::TestClass(Mech &mech)
|
||||
{
|
||||
Emitter *emitter;
|
||||
PowerBar *power_Bar;
|
||||
Condenser *condenser;
|
||||
Generator *generator;
|
||||
const Scalar time_Slice = 0.05f;
|
||||
|
||||
#if 0
|
||||
Tell("Testing Emitter .................\n");
|
||||
emitter = (Emitter*) mech.GetSubsystem(LaserSubsystemID);
|
||||
power_Bar = (PowerBar*) mech.GetSubsystem(PowerBarSubsystemID);
|
||||
condenser = (Condenser*) mech.GetSubsystem(CondenserSubsystemID);
|
||||
generator = (Generator*) mech.GetSubsystem(GeneratorSubsystemID);
|
||||
|
||||
// Test Initial Values as given in the resource file
|
||||
Test(Close_Enough(emitter->dischargeVoltage, 3.8f));
|
||||
Test(Close_Enough(emitter->outputVoltage, 0.0f));
|
||||
Test(Close_Enough(emitter->currentTemperature, 300.0f));
|
||||
|
||||
// Run the simulation a few times
|
||||
#if defined (TEST_DEBUG)
|
||||
Dump(emitter->currentLevel);
|
||||
Dump(emitter->outputVoltage);
|
||||
Dump(emitter->currentTemperature);
|
||||
#endif
|
||||
Test(Close_Enough(emitter->currentLevel,0.0f));
|
||||
Test(Close_Enough(emitter->outputVoltage,0.0f));
|
||||
|
||||
// Run the Simulation Loops
|
||||
MemoryStream stream(NULL, 0);
|
||||
condenser->HeatSimulation(time_Slice, stream);
|
||||
power_Bar->PoweredSimulation(time_Slice, stream);
|
||||
emitter->EmitterSimulation(time_Slice, stream);
|
||||
generator->GeneratorSimulation(time_Slice, stream);
|
||||
|
||||
#if defined (TEST_DEBUG)
|
||||
Dump(emitter->currentLevel);
|
||||
Dump(emitter->outputVoltage);
|
||||
Dump(emitter->currentTemperature);
|
||||
#endif
|
||||
|
||||
Test(Close_Enough(emitter->outputVoltage,0.00f,0.001f));
|
||||
Test(Close_Enough(emitter->currentTemperature, 300.00f,0.001f));
|
||||
|
||||
|
||||
emitter->outputVoltage = 5.0f; //Give it enough to fire!
|
||||
#if defined (TEST_DEBUG)
|
||||
Dump(emitter->outputVoltage);
|
||||
#endif
|
||||
|
||||
emitter->AcceptHeat(35.0f);
|
||||
// Run the Simulation Loops
|
||||
condenser->HeatSimulation(time_Slice, stream);
|
||||
power_Bar->PoweredSimulation(time_Slice, stream);
|
||||
emitter->EmitterSimulation(time_Slice, stream);
|
||||
|
||||
#if defined (TEST_DEBUG)
|
||||
Dump(emitter->currentLevel);
|
||||
Dump(emitter->outputVoltage);
|
||||
Dump(emitter->currentTemperature);
|
||||
#endif
|
||||
Test(Close_Enough(emitter->currentTemperature, 301.75f, 0.001f));
|
||||
|
||||
// Run the Simulation Loops
|
||||
condenser->HeatSimulation(time_Slice, stream);
|
||||
power_Bar->PoweredSimulation(time_Slice, stream);
|
||||
emitter->EmitterSimulation(time_Slice, stream);
|
||||
|
||||
#if defined( TEST_DEBUG)
|
||||
Dump(emitter->currentLevel);
|
||||
Dump(emitter->outputVoltage);
|
||||
Dump(emitter->currentTemperature);
|
||||
#endif
|
||||
Test(Close_Enough(emitter->currentTemperature, 301.597f, 0.001f));
|
||||
|
||||
// Return Power Bar and Laser to Initial States!
|
||||
condenser->ResetToInitialState();
|
||||
power_Bar->ResetToInitialState();
|
||||
emitter->ResetToInitialState();
|
||||
generator->ResetToInitialState();
|
||||
#endif
|
||||
return True;
|
||||
}
|
||||
//########################################################################
|
||||
// resetToInitialState Emitter
|
||||
//
|
||||
void Emitter::ResetToInitialState()
|
||||
{
|
||||
SetSimulationState(Loaded);
|
||||
PoweredSubsystem::ResetToInitialState();
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,153 @@
|
||||
//===========================================================================//
|
||||
// File: gauss.cc //
|
||||
// Project: BT Brick: Entity Manager //
|
||||
// Contents: Basic weapons system pieces //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Date Who Modification //
|
||||
// -------- --- ---------------------------------------------------------- //
|
||||
// 04/13/95 JM Initial coding. //
|
||||
// 07/19/95 GDU Complied with new munga and added electrical behavior
|
||||
//---------------------------------------------------------------------------//
|
||||
// Copyright (C) 1995, Virtual World Entertainment, Inc. All Rights reserved //
|
||||
//
|
||||
// PROPRIETARY AND CONFIDENTIAL //
|
||||
//===========================================================================//
|
||||
|
||||
#include <bt.hpp>
|
||||
#pragma hdrstop
|
||||
|
||||
#if !defined(GAUSS_HPP)
|
||||
# include <gauss.hpp>
|
||||
#endif
|
||||
|
||||
//#############################################################################
|
||||
// Shared Data Support
|
||||
//
|
||||
GaussRifle::SharedData
|
||||
GaussRifle::DefaultData(
|
||||
GaussRifle::ClassDerivations,
|
||||
GaussRifle::MessageHandlers,
|
||||
GaussRifle::AttributeIndex,
|
||||
GaussRifle::StateCount
|
||||
);
|
||||
|
||||
Derivation
|
||||
GaussRifle::ClassDerivations(
|
||||
Emitter::ClassDerivations,
|
||||
"GaussRifle"
|
||||
);
|
||||
|
||||
|
||||
//#############################################################################
|
||||
// Messaging Support
|
||||
//
|
||||
|
||||
#if 0
|
||||
//#############################################################################
|
||||
// Attribute Support
|
||||
//
|
||||
|
||||
const GaussRifle::IndexEntry
|
||||
GaussRifle::AttributePointers[]=
|
||||
{
|
||||
ATTRIBUTE_ENTRY(GaussRifle, DischargeVoltage, dischargeVoltage)
|
||||
};
|
||||
|
||||
GaussRifle::AttributeIndexSet
|
||||
GaussRifle::AttributeIndex(
|
||||
ELEMENTS(GaussRifle::AttributePointers),
|
||||
GaussRifle::AttributePointers,
|
||||
Emitter::AttributeIndex
|
||||
);
|
||||
#endif
|
||||
|
||||
//#############################################################################
|
||||
// Model Support
|
||||
//
|
||||
|
||||
void
|
||||
GaussRifle::FireWeapon()
|
||||
{
|
||||
//
|
||||
// Fire the weapon
|
||||
//
|
||||
outputVoltage = 0.0f;
|
||||
|
||||
Check_Fpu();
|
||||
}
|
||||
|
||||
//#############################################################################
|
||||
// Constructer/Destructor Support
|
||||
//
|
||||
|
||||
GaussRifle::GaussRifle(
|
||||
Mech *owner,
|
||||
int subsystem_ID,
|
||||
SubsystemResource *subsystem_resource,
|
||||
SharedData &shared_data
|
||||
):
|
||||
Emitter(owner, subsystem_ID, subsystem_resource, shared_data)
|
||||
{
|
||||
Check(owner);
|
||||
Check_Pointer(subsystem_resource);
|
||||
outputVoltage = 0.0f;
|
||||
Check_Fpu();
|
||||
}
|
||||
|
||||
GaussRifle::~GaussRifle()
|
||||
{
|
||||
Check(this);
|
||||
Check_Fpu();
|
||||
}
|
||||
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CreateStreamedSubsystem
|
||||
//
|
||||
Logical
|
||||
GaussRifle::CreateStreamedSubsystem(
|
||||
ResourceFile *resource_file,
|
||||
NotationFile *model_file,
|
||||
const char *model_name,
|
||||
const char *subsystem_name,
|
||||
SubsystemResource *subsystem_resource,
|
||||
NotationFile *subsystem_file,
|
||||
const ResourceDirectories *directories,
|
||||
int passes
|
||||
)
|
||||
{
|
||||
|
||||
if (
|
||||
!Emitter::CreateStreamedSubsystem(
|
||||
resource_file,
|
||||
model_file,
|
||||
model_name,
|
||||
subsystem_name,
|
||||
subsystem_resource,
|
||||
subsystem_file,
|
||||
directories,
|
||||
passes
|
||||
)
|
||||
)
|
||||
{
|
||||
Check_Fpu();
|
||||
return False;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
subsystem_resource->subsystemModelSize = sizeof(*subsystem_resource);
|
||||
subsystem_resource->classID = RegisteredClass::GaussRifleClassID;
|
||||
|
||||
|
||||
Check_Fpu();
|
||||
return True;
|
||||
}
|
||||
|
||||
Logical
|
||||
GaussRifle::TestInstance() const
|
||||
{
|
||||
return IsDerivedFrom(ClassDerivations);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
//===========================================================================//
|
||||
// File: gauss.hh //
|
||||
// Project: BT Brick: Entity Manager //
|
||||
// Contents: Gauss Rifle class, derives from Projectile Weapon //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Date Who Modification //
|
||||
// -------- --- ---------------------------------------------------------- //
|
||||
// 04/13/95 JM Initial coding. //
|
||||
// 07/19/95 GDU Complied to new munga, added new electrical behavior //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Copyright (C) 1995, Virtual World Entertainment, Inc. All Rights reserved //
|
||||
// //
|
||||
// PROPRIETARY AND CONFIDENTIAL //
|
||||
//===========================================================================//
|
||||
|
||||
#if !defined (GAUSS_HPP)
|
||||
#define GAUSS_HPP
|
||||
|
||||
#if !defined(EMITTER_HPP)
|
||||
# include <emitter.hpp>
|
||||
#endif
|
||||
|
||||
|
||||
//##################### Forward Class Declarations #######################
|
||||
class Mech;
|
||||
class Projectile;
|
||||
|
||||
//###########################################################################
|
||||
//######################### GaussRifle Model Resource ########################
|
||||
//###########################################################################
|
||||
struct GaussRifle__SubsystemResource:
|
||||
public Emitter::SubsystemResource
|
||||
{
|
||||
Scalar dischargeVoltage;
|
||||
};
|
||||
//###########################################################################
|
||||
//######################### CLASS -- GaussRifle ##########################
|
||||
//###########################################################################
|
||||
class GaussRifle : public Emitter
|
||||
{
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Shared Data Support
|
||||
//
|
||||
public:
|
||||
static Derivation ClassDerivations;
|
||||
static SharedData DefaultData;
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Messageing Support
|
||||
//
|
||||
|
||||
#if 0
|
||||
//##########################################################################
|
||||
// Attribute Support
|
||||
//
|
||||
public:
|
||||
|
||||
enum {
|
||||
= Emitter::NextAttributeID,
|
||||
NextAttributeID
|
||||
};
|
||||
|
||||
private:
|
||||
static const IndexEntry AttributePointers[];
|
||||
|
||||
public:
|
||||
static AttributeIndexSet AttributeIndex;
|
||||
#endif
|
||||
|
||||
//##########################################################################
|
||||
// Model Support
|
||||
//
|
||||
public:
|
||||
|
||||
|
||||
typedef void
|
||||
(GaussRifle::*Performance)(Scalar time_slice);
|
||||
|
||||
void
|
||||
SetPerformance(Performance performance)
|
||||
{
|
||||
Check(this);
|
||||
activePerformance = (Simulation::Performance)performance;
|
||||
}
|
||||
|
||||
void
|
||||
GaussRifleSimulation(Scalar time_slice);
|
||||
|
||||
//##########################################################################
|
||||
// TestClass Support
|
||||
//
|
||||
public:
|
||||
|
||||
static Logical
|
||||
TestClass(Mech &);
|
||||
void
|
||||
ResetToInitialState();
|
||||
|
||||
//##########################################################################
|
||||
// Construction and Destruction
|
||||
//
|
||||
public:
|
||||
typedef GaussRifle__SubsystemResource SubsystemResource;
|
||||
|
||||
GaussRifle(
|
||||
Mech *owner,
|
||||
int subsystem_ID,
|
||||
SubsystemResource *subsystem_resource,
|
||||
SharedData &shared_data=DefaultData
|
||||
);
|
||||
~GaussRifle();
|
||||
|
||||
Logical
|
||||
TestInstance() const;
|
||||
|
||||
static int
|
||||
CreateStreamedSubsystem(
|
||||
ResourceFile *resource_file,
|
||||
NotationFile *model_file,
|
||||
const char *model_name,
|
||||
const char *subsystem_name,
|
||||
SubsystemResource *subsystem_resource,
|
||||
NotationFile *subsystem_file,
|
||||
const ResourceDirectories *directories,
|
||||
int passes =1
|
||||
);
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Local data for the gun class
|
||||
//
|
||||
|
||||
protected:
|
||||
|
||||
void
|
||||
FireWeapon();
|
||||
|
||||
Vector3D
|
||||
muzzleVelocity;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,18 @@
|
||||
#include "testbt.hpp"
|
||||
|
||||
//#############################################################################
|
||||
// TestClass -- Generator
|
||||
//
|
||||
Logical Generator::TestClass(Mech &)
|
||||
{
|
||||
return True;
|
||||
}
|
||||
|
||||
//###########################################################################
|
||||
// ResetToIntialState -- Generator
|
||||
//
|
||||
void Generator::ResetToInitialState()
|
||||
{
|
||||
HeatableSubsystem::ResetToInitialState();
|
||||
outputVoltage = 0.0f;
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
#include "heat.hpp"
|
||||
#include "app.hpp"
|
||||
#include "testbt.hpp"
|
||||
|
||||
#define JM_CLOSE_ENOUGH 0.0005f
|
||||
|
||||
|
||||
//###########################################################################
|
||||
// Test Class for HeatableSubsystem
|
||||
//
|
||||
Logical
|
||||
HeatableSubsystem::TestClass(Mech &)
|
||||
{
|
||||
return True;
|
||||
}
|
||||
//###########################################################################
|
||||
// ResetToIntialState -- HeatableSubsystem
|
||||
//
|
||||
void HeatableSubsystem::ResetToInitialState()
|
||||
{
|
||||
currentTemperature = 300.0f;
|
||||
heatLoad = 0.0f;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//###########################################################################
|
||||
// Test Class for Condenser
|
||||
//
|
||||
Logical Condenser::TestClass( Mech& )
|
||||
{
|
||||
|
||||
return True;
|
||||
}
|
||||
//###########################################################################
|
||||
// ResetToIntialState -- Condenser
|
||||
//
|
||||
void Condenser::ResetToInitialState()
|
||||
{
|
||||
HeatableSubsystem::ResetToInitialState();
|
||||
}
|
||||
//###########################################################################
|
||||
// Test Class for HeatSink
|
||||
//
|
||||
|
||||
Logical HeatSink::TestClass( Mech& )
|
||||
{
|
||||
return True;
|
||||
}
|
||||
|
||||
//###########################################################################
|
||||
// ResetToIntialState -- Condenser
|
||||
//
|
||||
void HeatSink::ResetToInitialState()
|
||||
{
|
||||
HeatableSubsystem::ResetToInitialState();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,208 @@
|
||||
//==========================================================================//
|
||||
// File: mechdmg.hpp //
|
||||
// Project: BattleTech //
|
||||
// Contents: Mech::DamageZone //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Date Who Modification //
|
||||
// -------- --- ---------------------------------------------------------- //
|
||||
// 06/05/95 JM Initial coding. //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Copyright (C) 1995, Virtual World Entertainment, Inc. //
|
||||
// All Rights reserved worldwide //
|
||||
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
|
||||
//===========================================================================//
|
||||
|
||||
#if !defined(MECHDMG_HPP)
|
||||
# define MECHDMG_HPP
|
||||
|
||||
# if !defined(DAMAGE_HPP)
|
||||
# include <damage.hpp>
|
||||
# endif
|
||||
|
||||
# if !defined(SLOT_HPP)
|
||||
# include <slot.hpp>
|
||||
# endif
|
||||
|
||||
# if !defined(TABLE_HPP)
|
||||
# include <table.hpp>
|
||||
# endif
|
||||
|
||||
# if !defined(ENTITYID_HPP)
|
||||
# include <entityid.hpp>
|
||||
# endif
|
||||
|
||||
class Mech;
|
||||
class Subsystem;
|
||||
class DamageZone;
|
||||
|
||||
//##########################################################################
|
||||
//###################### MechCriticalSubsystem #################
|
||||
//##########################################################################
|
||||
|
||||
class
|
||||
MechCriticalSubsystem SIGNATURED
|
||||
{
|
||||
public:
|
||||
|
||||
MechCriticalSubsystem(DamageZone *owner);
|
||||
|
||||
virtual ~MechCriticalSubsystem();
|
||||
|
||||
SlotOf<Subsystem*>
|
||||
subsystemPlug;
|
||||
|
||||
Scalar
|
||||
damagePercentage, damagePercentageUsed;
|
||||
|
||||
Scalar
|
||||
criticalWeight;
|
||||
|
||||
Logical
|
||||
TestInstance() const;
|
||||
|
||||
};
|
||||
|
||||
|
||||
//##########################################################################
|
||||
//#################### Mech::DamageZone ###########################
|
||||
//##########################################################################
|
||||
|
||||
class Mech__DamageZone :
|
||||
public DamageZone
|
||||
{
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// LOD Support
|
||||
//
|
||||
protected:
|
||||
|
||||
void
|
||||
LODDamageRouter(EntityID inflicting, Damage damage);
|
||||
|
||||
int
|
||||
RandomRedirect();
|
||||
|
||||
typedef PlugOf<int> IntegerPlug;
|
||||
|
||||
typedef TableOf<IntegerPlug*, int> DamageZoneIndexTable;
|
||||
|
||||
typedef TableIteratorOf<IntegerPlug*, int> DamageZoneIndexTableIterator;
|
||||
|
||||
|
||||
// Zones which are artifacts have a table of their real children.
|
||||
|
||||
DamageZoneIndexTable redirectTable;
|
||||
|
||||
// The result of the last random redirect
|
||||
|
||||
int lastHitZone;
|
||||
Scalar lastDamageTime;
|
||||
EntityID lastInflicting;
|
||||
//
|
||||
// Zones which are real have a pointer (slot) back to their artifact parent.
|
||||
// With the current art (1/30/96) no zone has both a parent and children,
|
||||
// and many zones have neither.
|
||||
|
||||
SlotOf<Mech__DamageZone*> parentArtifactZone;
|
||||
|
||||
void
|
||||
UpdateLODDamageLevel();
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Descending Heirarchy when DamageZone Destroyed Support
|
||||
//
|
||||
void
|
||||
ShortAttachedGenerators();
|
||||
|
||||
void
|
||||
SendSubsystemDamage();
|
||||
|
||||
void
|
||||
RecurseSegmentTable(Mech *my_mech);
|
||||
|
||||
int
|
||||
segmentIndex;
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Damage Support
|
||||
//
|
||||
public:
|
||||
|
||||
void
|
||||
TakeDamage(Damage& damage);
|
||||
|
||||
Subsystem*
|
||||
CriticalHit(Damage &damage_data);
|
||||
|
||||
protected:
|
||||
|
||||
Logical
|
||||
vitalDamageZone;
|
||||
|
||||
Logical
|
||||
descendOnDestruction;
|
||||
|
||||
Logical
|
||||
destroySiblingsOnDestruction;
|
||||
|
||||
Logical
|
||||
leftLeg;
|
||||
|
||||
Logical
|
||||
rightLeg;
|
||||
|
||||
int
|
||||
criticalSubsystemCount;
|
||||
|
||||
Scalar
|
||||
criticalWeightSum;
|
||||
|
||||
MechCriticalSubsystem
|
||||
**criticalSubsystems;
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Graphic State Support
|
||||
//
|
||||
|
||||
public:
|
||||
|
||||
void
|
||||
SetGraphicState(Enumeration new_state);
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Construction / Destruction
|
||||
//
|
||||
|
||||
public:
|
||||
|
||||
static const int NullDamageZone;
|
||||
|
||||
Mech__DamageZone(
|
||||
Mech *mech,
|
||||
int damage_zone_index,
|
||||
MemoryStream *stream
|
||||
);
|
||||
|
||||
void SetLODParentPointers();
|
||||
|
||||
~Mech__DamageZone();
|
||||
|
||||
static Logical
|
||||
CreateStreamedDamageZone(
|
||||
ResourceFile *resource_file,
|
||||
NotationFile *model_file,
|
||||
const char *model_name,
|
||||
NotationFile *skl_file,
|
||||
const char *damage_zone_name,
|
||||
NotationFile *dmg_file,
|
||||
const ResourceDirectories *directories,
|
||||
MemoryStream *damage_zone_stream
|
||||
);
|
||||
|
||||
static int
|
||||
GetSegmentIndex(
|
||||
CString damage_zone_name,
|
||||
NotationFile *skl_file
|
||||
);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,149 @@
|
||||
#if !defined(MECHTECH_HPP)
|
||||
# define MECHTECH_HPP
|
||||
|
||||
# if !defined(MECHSUB_HPP)
|
||||
# include <mechsub.hpp>
|
||||
# endif
|
||||
|
||||
//##########################################################################
|
||||
//###################### MechTech::StatusInfo ########################
|
||||
//##########################################################################
|
||||
|
||||
struct MechTech__StatusInfo SIGNATURED
|
||||
{
|
||||
public:
|
||||
int
|
||||
currentStatus,
|
||||
wooHooed;
|
||||
Time
|
||||
startTime,
|
||||
wooHooEnd;
|
||||
};
|
||||
|
||||
//##########################################################################
|
||||
//###############3### MechTech::SubsystemMonitor #####################
|
||||
//##########################################################################
|
||||
|
||||
struct MechTech__SubsystemMonitor:
|
||||
public Plug
|
||||
{
|
||||
friend class MechTech;
|
||||
|
||||
//##########################################################################
|
||||
// Memory Allocation Support
|
||||
//
|
||||
private:
|
||||
static MemoryBlock AllocatedMemory;
|
||||
|
||||
void*
|
||||
operator new(size_t)
|
||||
{return AllocatedMemory.New();}
|
||||
void
|
||||
operator delete(void *where)
|
||||
{AllocatedMemory.Delete(where);}
|
||||
|
||||
public:
|
||||
MechTech__StatusInfo statusArray[MechSubsystem::TechStatusTypeCount];
|
||||
MechSubsystem *monitoredSubsystem;
|
||||
|
||||
MechTech__SubsystemMonitor(MechSubsystem *subsystem);
|
||||
~MechTech__SubsystemMonitor();
|
||||
};
|
||||
|
||||
//##########################################################################
|
||||
//##################### MechTech::ModelResource ######################
|
||||
//##########################################################################
|
||||
|
||||
struct MechTech__SubsystemResource:
|
||||
public Subsystem::SubsystemResource
|
||||
{
|
||||
ResourceDescription::ResourceID
|
||||
alarmModel;
|
||||
Scalar
|
||||
wooHooMinimumDuration,
|
||||
wooHooDurationRange,
|
||||
wooHooChance;
|
||||
};
|
||||
|
||||
//##########################################################################
|
||||
//############################ MechTech ##############################
|
||||
//##########################################################################
|
||||
|
||||
class MechTech:
|
||||
public Subsystem
|
||||
{
|
||||
//##########################################################################
|
||||
// Shared Data Support
|
||||
//
|
||||
public:
|
||||
static Derivation ClassDerivations;
|
||||
static SharedData DefaultData;
|
||||
|
||||
//##########################################################################
|
||||
// Attribute Support
|
||||
//
|
||||
public:
|
||||
typedef MechTech__StatusInfo StatusInfo;
|
||||
typedef MechTech__SubsystemMonitor SubsystemMonitor;
|
||||
typedef MechTech__SubsystemResource SubsystemResource;
|
||||
|
||||
//##########################################################################
|
||||
// Construction and Destruction Support
|
||||
//
|
||||
public:
|
||||
~MechTech();
|
||||
|
||||
static Logical
|
||||
CreateStreamedSubsystem(
|
||||
NotationFile *model_file,
|
||||
const char* model_name,
|
||||
const char* subsystem_name,
|
||||
SubsystemResource *subsystem_resource,
|
||||
NotationFile *subsystem_file,
|
||||
const ResourceDirectories *directories,
|
||||
ResourceFile *resource_file
|
||||
);
|
||||
|
||||
MechTech(
|
||||
Mech *entity,
|
||||
int subsystem_id,
|
||||
SubsystemResource *model,
|
||||
SharedData &shared_data = DefaultData
|
||||
);
|
||||
|
||||
Logical
|
||||
TestInstance() const;
|
||||
|
||||
//##########################################################################
|
||||
// Model support
|
||||
//
|
||||
public:
|
||||
typedef void
|
||||
(MechTech::*Performance)(Scalar time_slice);
|
||||
|
||||
void
|
||||
SetPerformance(Performance performance)
|
||||
{
|
||||
Check(this);
|
||||
activePerformance = (Simulation::Performance)performance;
|
||||
}
|
||||
|
||||
ChainOf<SubsystemMonitor*> subsystemMonitors;
|
||||
Scalar
|
||||
wooHooMinimumDuration,
|
||||
wooHooDurationRange,
|
||||
wooHooChance;
|
||||
|
||||
ResourceDescription::ResourceID
|
||||
alarmModel;
|
||||
|
||||
void
|
||||
TechnicalAssistance(Scalar time_slice);
|
||||
|
||||
Mech*
|
||||
GetEntity()
|
||||
{return (Mech*)Subsystem::GetEntity();}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,184 @@
|
||||
//===========================================================================//
|
||||
// File: messmgr.hh //
|
||||
// Project: BattleTech //
|
||||
// Contents: Consolidates Messages from Subsystems and Graphics Generation //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Date Who Modification //
|
||||
// -------- --- ---------------------------------------------------------- //
|
||||
// 09/30/95 JM Initial coding. //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Copyright (C) 1995, Virtual World Entertainment, Inc. All Rights reserved //
|
||||
// PROPRIETARY AND CONFIDENTIAL //
|
||||
//===========================================================================//
|
||||
|
||||
#if !defined (MESSMGR_HPP)
|
||||
# define MESSMGR_HPP
|
||||
|
||||
#if !defined (SUBSYSTM_HPP)
|
||||
# include <subsystm.hpp>
|
||||
#endif
|
||||
|
||||
#if !defined (RESOURCE_HPP)
|
||||
# include <resource.hpp>
|
||||
#endif
|
||||
|
||||
#if !defined (VCHAIN_HPP)
|
||||
# include <vchain.hpp>
|
||||
#endif
|
||||
|
||||
#if !defined (PLUG_HPP)
|
||||
# include <plug.hpp>
|
||||
#endif
|
||||
|
||||
#if !defined(ENTITYID_HPP)
|
||||
# include <entityid.hpp>
|
||||
#endif
|
||||
|
||||
class Entity;
|
||||
class Mech;
|
||||
class Entity__TakeDamageMessage;
|
||||
|
||||
//##########################################################################
|
||||
//########## SubsystemMessageManager::SubsystemResource ###############
|
||||
//##########################################################################
|
||||
struct SubsystemMessageManager__SubsystemResource :
|
||||
public Subsystem::SubsystemResource
|
||||
{
|
||||
ResourceDescription::ResourceID
|
||||
terrainHitExplosionID;
|
||||
|
||||
Scalar
|
||||
rendererCompensateTime;
|
||||
};
|
||||
|
||||
//##########################################################################
|
||||
//##################### SubsystemMessageManager ###################
|
||||
//##########################################################################
|
||||
class
|
||||
SubsystemMessageManager :
|
||||
public Subsystem
|
||||
|
||||
{
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Shared Data Support
|
||||
//
|
||||
public:
|
||||
static Derivation ClassDerivations;
|
||||
static SharedData DefaultData;
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Death and Damage Support
|
||||
//
|
||||
|
||||
public:
|
||||
|
||||
void DeathReset(Logical) {}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Model Support
|
||||
//
|
||||
protected:
|
||||
|
||||
struct CommonDamageInformation
|
||||
{
|
||||
Entity
|
||||
*entityHit;
|
||||
|
||||
int
|
||||
damageZoneIndex;
|
||||
|
||||
Point3D
|
||||
impactPoint;
|
||||
|
||||
} commonDamageInformation;
|
||||
|
||||
public:
|
||||
|
||||
struct DamageInformation
|
||||
: public Plug
|
||||
{
|
||||
Enumeration
|
||||
damageType;
|
||||
|
||||
int
|
||||
subsystemID;
|
||||
};
|
||||
|
||||
typedef void
|
||||
(SubsystemMessageManager::*Performance)(Scalar time_slice);
|
||||
|
||||
void
|
||||
SetPerformance(Performance performance)
|
||||
{
|
||||
Check(this);
|
||||
activePerformance = (Simulation::Performance)performance;
|
||||
}
|
||||
void
|
||||
ConsolidateAndSendDamage(Scalar time_slice);
|
||||
|
||||
Mech*
|
||||
GetEntity()
|
||||
{Check(this); return Cast_Object(Mech*, Subsystem::GetEntity());}
|
||||
|
||||
protected:
|
||||
|
||||
Scalar
|
||||
rendererCompensateTime;
|
||||
|
||||
typedef PlugOf<ResourceDescription::ResourceID>
|
||||
ResourceIDPlug;
|
||||
|
||||
VChainOf<ResourceIDPlug*, ResourceDescription::ResourceID>
|
||||
weaponExplosions;
|
||||
|
||||
VChainOf<DamageInformation*, Scalar> damageInformation;
|
||||
|
||||
ResourceDescription::ResourceID
|
||||
terrainHitExplosionID;
|
||||
|
||||
void
|
||||
CreateWeaponExplosions(
|
||||
Logical terrain_hit,
|
||||
EntityID entity_hit,
|
||||
Point3D explode_position
|
||||
);
|
||||
|
||||
public:
|
||||
|
||||
void
|
||||
AddDamageMessage(
|
||||
Entity *damaged_entity,
|
||||
Entity__TakeDamageMessage *message
|
||||
);
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Construction and Destruction Support
|
||||
//
|
||||
public:
|
||||
|
||||
typedef SubsystemMessageManager__SubsystemResource SubsystemResource;
|
||||
|
||||
SubsystemMessageManager(
|
||||
Mech *owner,
|
||||
int subsystem_ID,
|
||||
SubsystemResource *sub_res,
|
||||
SharedData &shared_data=DefaultData
|
||||
);
|
||||
|
||||
~SubsystemMessageManager();
|
||||
|
||||
Logical
|
||||
TestInstance() const;
|
||||
|
||||
static Logical
|
||||
CreateStreamedSubsystem(
|
||||
ResourceFile *resource_file,
|
||||
NotationFile *model_file,
|
||||
const char *model_name,
|
||||
const char *subsystem_name,
|
||||
SubsystemResource *subsystem_resource,
|
||||
NotationFile *subsystem_file,
|
||||
const ResourceDirectories *directories
|
||||
);
|
||||
};
|
||||
#endif
|
||||
@@ -0,0 +1,120 @@
|
||||
//============================================================================//
|
||||
// File: mislanch.hh //
|
||||
// Project: BattleTech //
|
||||
// Contents: Weapon Which Lanches a missile //
|
||||
// Derived From Projectile Weapon //
|
||||
//----------------------------------------------------------------------------//
|
||||
// Date Who Modification //
|
||||
// -------- --- ------------------------------------------------------------//
|
||||
// 04/13/95 JM Initial coding. //
|
||||
//----------------------------------------------------------------------------//
|
||||
// Copyright (C) 1995, Virtual World Entertainment, Inc. All Rights reserved //
|
||||
// PROPRIETARY AND CONFIDENTIAL //
|
||||
//============================================================================//
|
||||
|
||||
#if !defined (MISLANCH_HPP)
|
||||
# define MISLANCH_HPP
|
||||
|
||||
# if !defined(PROJWEAP_HPP)
|
||||
# include <projweap.hpp>
|
||||
# endif
|
||||
|
||||
|
||||
class Missile;
|
||||
|
||||
//################# MissileLauncher SubsystemResource ###################
|
||||
struct MissileLauncher__SubsystemResource:
|
||||
public ProjectileWeapon::SubsystemResource
|
||||
{
|
||||
int missileCount;
|
||||
|
||||
Vector3D
|
||||
muzzleVelocity;
|
||||
};
|
||||
|
||||
|
||||
//###########################################################################
|
||||
//################# CLASS -- MissileLauncher ##########################
|
||||
//###########################################################################
|
||||
|
||||
class MissileLauncher:
|
||||
public ProjectileWeapon
|
||||
{
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Messaging Support
|
||||
//
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Shared Data Support
|
||||
//
|
||||
public:
|
||||
static Derivation ClassDerivations;
|
||||
static SharedData DefaultData;
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Attribute Support
|
||||
//
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Damage Support
|
||||
//
|
||||
public:
|
||||
void TakeDamage(Damage &damage);
|
||||
void DeathReset(Logical full_reset);
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Model Support
|
||||
//
|
||||
public:
|
||||
|
||||
typedef void
|
||||
(MissileLauncher::*Performance)(Scalar time_slice);
|
||||
|
||||
void
|
||||
SetPerformance(Performance performance)
|
||||
{
|
||||
Check(this);
|
||||
activePerformance = (Simulation::Performance)performance;
|
||||
}
|
||||
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Construction and Destruction
|
||||
//
|
||||
public:
|
||||
|
||||
typedef MissileLauncher__SubsystemResource SubsystemResource;
|
||||
MissileLauncher(
|
||||
Mech *owner,
|
||||
int subsystem_ID,
|
||||
SubsystemResource *subsystem_resource,
|
||||
SharedData &default_data = DefaultData
|
||||
);
|
||||
~MissileLauncher();
|
||||
|
||||
Logical
|
||||
TestInstance() const;
|
||||
|
||||
static Logical
|
||||
CreateStreamedSubsystem(
|
||||
ResourceFile *resource_file,
|
||||
NotationFile *model_file,
|
||||
const char *model_name,
|
||||
const char *subsystem_name,
|
||||
SubsystemResource *subsystem_resource,
|
||||
NotationFile *subsystem_file,
|
||||
const ResourceDirectories *directories,
|
||||
int passes =1
|
||||
);
|
||||
|
||||
|
||||
// local stuff
|
||||
protected:
|
||||
|
||||
void
|
||||
FireWeapon();
|
||||
|
||||
int missileCount; // how many individual missiles get fired at once
|
||||
|
||||
};
|
||||
#endif
|
||||
@@ -0,0 +1,44 @@
|
||||
#include "testbt.hpp"
|
||||
#include "projweap.hpp"
|
||||
|
||||
|
||||
//#############################################################################
|
||||
// Missile Test Class
|
||||
//
|
||||
|
||||
Logical Missile::TestClass(Mech &mech)
|
||||
{
|
||||
ProjectileWeapon *gun;
|
||||
Missile *missile;
|
||||
MissileThruster *thruster;
|
||||
Seeker *seeker;
|
||||
Scalar time_slice =0.5f;
|
||||
|
||||
gun = (ProjectileWeapon*) mech.GetSubsystem(ProjectileWeaponSubsystemID);
|
||||
|
||||
gun->triggerState = 1;
|
||||
MemoryStream stream(NULL, 0);
|
||||
gun->ProjectileWeaponSimulation(time_slice, stream);
|
||||
gun->triggerState = -1;
|
||||
|
||||
missile = (Missile*) gun->currentProjectile; // BAD!!!
|
||||
Check(missile);
|
||||
thruster = (MissileThruster*) missile->GetSubsystem(Missile::MissileThrusterSubsystem);
|
||||
seeker = (Seeker*) missile->GetSubsystem(Missile::SeekerSubsystem);
|
||||
Check(thruster);
|
||||
Check(seeker);
|
||||
|
||||
seeker->FindTarget(time_slice, stream);
|
||||
thruster->MissileThrusterSimulation(time_slice, stream);
|
||||
missile->MoveAndCollide(time_slice, stream);
|
||||
|
||||
time_slice = 5.0f;
|
||||
gun->ProjectileWeaponSimulation(time_slice, stream);
|
||||
seeker->FindTarget(time_slice, stream);
|
||||
thruster->MissileThrusterSimulation(time_slice, stream);
|
||||
missile->MoveAndCollide(time_slice, stream);
|
||||
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
//============================================================================//
|
||||
// File: misthrst.hh //
|
||||
// Project: BattleTech //
|
||||
// Contents: Missile Thruster provides power to move the missile //
|
||||
//----------------------------------------------------------------------------//
|
||||
// Date Who Modification //
|
||||
// -------- --- ------------------------------------------------------------//
|
||||
// 04/13/95 JM Initial coding. //
|
||||
//----------------------------------------------------------------------------//
|
||||
// Copyright (C) 1995, Virtual World Entertainment, Inc. All Rights reserved //
|
||||
// PROPRIETARY AND CONFIDENTIAL //
|
||||
//============================================================================//
|
||||
|
||||
#if !defined (MISTHRST_HPP)
|
||||
#define MISTHRST_HPP
|
||||
|
||||
#if !defined(SUBSYSTM_HPP)
|
||||
#include <subsystm.hpp>
|
||||
#endif
|
||||
|
||||
#if !defined(ANGLE_HPP)
|
||||
#include <angle.hpp>
|
||||
#endif
|
||||
|
||||
#if !defined(MOTION_HPP)
|
||||
#include <motion.hpp>
|
||||
#endif
|
||||
|
||||
//################### Froward Class Declarations ######################
|
||||
class Missile;
|
||||
|
||||
//################### MissileThruster SubsystemResource #################
|
||||
|
||||
struct MissileThruster__SubsystemResource:
|
||||
public Subsystem::SubsystemResource
|
||||
{
|
||||
Scalar burnTime;
|
||||
Degree maxThrusterRotationRate;
|
||||
Scalar thrusterAcceleration;
|
||||
Scalar thrusterClimb;
|
||||
};
|
||||
|
||||
|
||||
//###########################################################################
|
||||
//######################### CLASS -- MissileThruster ##################
|
||||
//###########################################################################
|
||||
|
||||
|
||||
class MissileThruster :
|
||||
public Subsystem
|
||||
{
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Shared Data Support
|
||||
//
|
||||
public:
|
||||
static Derivation ClassDerivations;
|
||||
static SharedData DefaultData;
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Attribute Support
|
||||
//
|
||||
|
||||
public:
|
||||
enum {
|
||||
BurnTimeRemainingAttributeID = Subsystem::NextAttributeID,
|
||||
MaxThrusterRotationRateAttributeID,
|
||||
ThrusterAccelerationAttributeID,
|
||||
NextAttributeID
|
||||
};
|
||||
|
||||
public:
|
||||
static const IndexEntry AttributePointers[];
|
||||
|
||||
protected:
|
||||
static AttributeIndexSet AttributeIndex;
|
||||
|
||||
//
|
||||
// public attribute declarations go here
|
||||
//
|
||||
public:
|
||||
Scalar burnTimeRemaining;
|
||||
Radian maxThrusterRotationRate;
|
||||
const Scalar thrusterAcceleration;
|
||||
const Scalar thrusterClimb;
|
||||
Motion acceleration;
|
||||
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Model Support
|
||||
//
|
||||
public:
|
||||
enum {
|
||||
ThrusterBurning= Subsystem::StateCount,
|
||||
StateCount
|
||||
};
|
||||
|
||||
typedef void
|
||||
(MissileThruster::*Performance)(Scalar time_slice);
|
||||
|
||||
void
|
||||
MissileThrusterSimulation(Scalar time_slice);
|
||||
|
||||
void
|
||||
SetPerformance(Performance performance)
|
||||
{
|
||||
Check(this);
|
||||
activePerformance = (Simulation::Performance)performance;
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// TestClass Support
|
||||
//
|
||||
public:
|
||||
|
||||
static Logical
|
||||
TestClass(Missile &);
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Construction and Destruction
|
||||
//
|
||||
public:
|
||||
|
||||
typedef MissileThruster__SubsystemResource SubsystemResource;
|
||||
|
||||
MissileThruster(
|
||||
Missile *owner,
|
||||
int subsystem_ID,
|
||||
SubsystemResource *subsystem_resource
|
||||
);
|
||||
~MissileThruster();
|
||||
|
||||
Logical
|
||||
TestInstance() const;
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Local Support
|
||||
//
|
||||
|
||||
};
|
||||
#endif
|
||||
@@ -0,0 +1,5 @@
|
||||
SCC = This is a Source Code Control file
|
||||
|
||||
[bt.mak]
|
||||
SCC_Aux_Path = "\\AVATAR\Mungass\VSS"
|
||||
SCC_Project_Name = "$/Tesla_BT/BT", YOCAAAAA
|
||||
@@ -0,0 +1,166 @@
|
||||
//===========================================================================//
|
||||
// File: ppc.cc //
|
||||
// Project: BattleTech //
|
||||
// Contents: Particle Projection Cannon //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Date Who Modification //
|
||||
// -------- --- ---------------------------------------------------------- //
|
||||
// 11/13/95 JM Initial coding. //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Copyright (C) 1995, Virtual World Entertainment, Inc. All Rights reserved //
|
||||
// PROPRIETARY AND CONFIDENTIAL //
|
||||
//===========================================================================//
|
||||
|
||||
#include <bt.hpp>
|
||||
#pragma hdrstop
|
||||
|
||||
#if !defined (PPC_HPP)
|
||||
# include <ppc.hpp>
|
||||
#endif
|
||||
|
||||
#if !defined(BTPLAYER_HPP)
|
||||
# include <btplayer.hpp>
|
||||
#endif
|
||||
|
||||
#if !defined(BTMSSN_HPP)
|
||||
# include <btmssn.hpp>
|
||||
#endif
|
||||
|
||||
//#############################################################################
|
||||
// Shared Data Support
|
||||
//
|
||||
PPC::SharedData
|
||||
PPC::DefaultData(
|
||||
PPC::ClassDerivations,
|
||||
PPC::MessageHandlers,
|
||||
PPC::AttributeIndex,
|
||||
PPC::StateCount
|
||||
);
|
||||
|
||||
Derivation
|
||||
PPC::ClassDerivations(
|
||||
Emitter::ClassDerivations,
|
||||
"PPC"
|
||||
);
|
||||
|
||||
//#############################################################################
|
||||
// Model Data Support
|
||||
//
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
//
|
||||
void
|
||||
PPC::FireWeapon()
|
||||
{
|
||||
Check(this);
|
||||
|
||||
Emitter::FireWeapon();
|
||||
|
||||
|
||||
return;
|
||||
|
||||
#if 0
|
||||
Check(this);
|
||||
|
||||
Mech *mech = GetEntity();
|
||||
Check(mech);
|
||||
|
||||
BTPlayer *bt_player = Cast_Object(
|
||||
BTPlayer*,
|
||||
mech->GetPlayerLink()
|
||||
);
|
||||
Check(bt_player);
|
||||
Enumeration experienceLevel = bt_player->GetExperienceLevel();
|
||||
|
||||
if (experienceLevel == BTMission::NoviceMode)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (targetWithinRange)
|
||||
{
|
||||
Damage energy_damage(damageData);
|
||||
energy_damage.damageType = Damage::EnergyDamageType;
|
||||
energy_damage.damageAmount = 0.0f;
|
||||
|
||||
Mech *mech = GetEntity();
|
||||
Check(mech);
|
||||
|
||||
SendDamage(
|
||||
mech->targetReticle.targetEntity,
|
||||
energy_damage
|
||||
);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
//#############################################################################
|
||||
// Constructer/Destructor Support
|
||||
//
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
//
|
||||
PPC::PPC(
|
||||
Mech *owner,
|
||||
int subsystem_ID,
|
||||
SubsystemResource *subsystem_resource,
|
||||
SharedData &shared_data
|
||||
):
|
||||
Emitter(owner, subsystem_ID, subsystem_resource, shared_data)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
//
|
||||
PPC::~PPC()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Create Streamed Subsystem
|
||||
//
|
||||
Logical
|
||||
PPC::CreateStreamedSubsystem(
|
||||
ResourceFile *resource_file,
|
||||
NotationFile *model_file,
|
||||
const char *model_name,
|
||||
const char *subsystem_name,
|
||||
SubsystemResource *subsystem_resource,
|
||||
NotationFile *subsystem_file,
|
||||
const ResourceDirectories *directories,
|
||||
int passes
|
||||
)
|
||||
{
|
||||
if (
|
||||
!Emitter::CreateStreamedSubsystem(
|
||||
resource_file,
|
||||
model_file,
|
||||
model_name,
|
||||
subsystem_name,
|
||||
subsystem_resource,
|
||||
subsystem_file,
|
||||
directories,
|
||||
passes
|
||||
)
|
||||
)
|
||||
{
|
||||
return False;
|
||||
}
|
||||
|
||||
subsystem_resource->subsystemModelSize = sizeof(*subsystem_resource);
|
||||
subsystem_resource->classID = RegisteredClass::PPCClassID;
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
//
|
||||
Logical
|
||||
PPC::TestInstance() const
|
||||
{
|
||||
return IsDerivedFrom(ClassDerivations);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
//===========================================================================//
|
||||
// File: ppc.hh //
|
||||
// Project: BattleTech //
|
||||
// Contents: Particle Projection Cannon //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Date Who Modification //
|
||||
// -------- --- ---------------------------------------------------------- //
|
||||
// 11/13/95 JM Initial coding. //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Copyright (C) 1995, Virtual World Entertainment, Inc. All Rights reserved //
|
||||
// PROPRIETARY AND CONFIDENTIAL //
|
||||
//===========================================================================//
|
||||
|
||||
#if !defined (PPC_HPP)
|
||||
# define PPC_HPP
|
||||
|
||||
#if !defined(EMITTER_HPP)
|
||||
#include <emitter.hpp>
|
||||
#endif
|
||||
|
||||
class PPC :
|
||||
public Emitter
|
||||
{
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Shared Data Support
|
||||
//
|
||||
public:
|
||||
static Derivation ClassDerivations;
|
||||
static SharedData DefaultData;
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Construction and Destruction
|
||||
//
|
||||
public:
|
||||
|
||||
PPC(
|
||||
Mech *owner,
|
||||
int subsystem_ID,
|
||||
SubsystemResource *subsystem_resource,
|
||||
SharedData &shared_data
|
||||
);
|
||||
~PPC();
|
||||
|
||||
Logical
|
||||
TestInstance() const;
|
||||
|
||||
static int
|
||||
CreateStreamedSubsystem(
|
||||
ResourceFile *resource_file,
|
||||
NotationFile *model_file,
|
||||
const char *model_name,
|
||||
const char *subsystem_name,
|
||||
SubsystemResource *subsystem_resource,
|
||||
NotationFile *subsystem_file,
|
||||
const ResourceDirectories *directories,
|
||||
int passes = 1
|
||||
);
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Local Data
|
||||
//
|
||||
protected:
|
||||
|
||||
void
|
||||
FireWeapon();
|
||||
|
||||
};
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
#include "testbt.hpp"
|
||||
|
||||
//#############################################################################
|
||||
// Projectile Test Class
|
||||
//
|
||||
|
||||
Logical Projectile::TestClass()
|
||||
{
|
||||
return True;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#include "projweap.hpp"
|
||||
#include "testbt.hpp"
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// ProjectileWeapon Test Class
|
||||
//
|
||||
Logical ProjectileWeapon::TestClass(Mech &)
|
||||
{
|
||||
|
||||
return True;
|
||||
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Reset To InitialState
|
||||
//
|
||||
void ProjectileWeapon::ResetToInitialState()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
//=========================================================================//
|
||||
// File: seeker.hpp //
|
||||
// Project: BattleTech //
|
||||
// Contents: A subsystem which guides, seek out and find a target //
|
||||
//----------------------------------------------------------------------------//
|
||||
// Date Who Modification //
|
||||
// -------- --- ------------------------------------------------------------//
|
||||
// 04/13/95 JM Initial coding. //
|
||||
// 07/12/95 GDU Complied with new libraries, added seeker logic //
|
||||
//----------------------------------------------------------------------------//
|
||||
// Copyright (C) 1995, Virtual World Entertainment, Inc. All Rights reserved //
|
||||
// PROPRIETARY AND CONFIDENTIAL //
|
||||
//============================================================================//
|
||||
|
||||
#if !defined (SEEKER_HPP)
|
||||
#define SEEKER_HPP
|
||||
|
||||
#if !defined(SUBSYSTM_HPP)
|
||||
#include <subsystm.hpp>
|
||||
#endif
|
||||
|
||||
#if !defined(POINT3D_HPP)
|
||||
#include <point3d.hpp>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
//######################### Forward Class Declarations ########################
|
||||
class Missile;
|
||||
class Entity;
|
||||
|
||||
//######################### Seeker Subsystem Resource ##########################
|
||||
struct Seeker__SubsystemResource:
|
||||
public Subsystem::SubsystemResource
|
||||
{
|
||||
|
||||
|
||||
};
|
||||
//###########################################################################
|
||||
//######################### CLASS -- Seeker ##########################
|
||||
//###########################################################################
|
||||
class Seeker : public Subsystem
|
||||
{
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Messaging Support
|
||||
//
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Shared Data Support
|
||||
//
|
||||
public:
|
||||
static Derivation ClassDerivations;
|
||||
static SharedData DefaultData;
|
||||
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Attribute Support
|
||||
//
|
||||
public:
|
||||
enum {
|
||||
TargetPositionAttributeID = Subsystem::NextAttributeID,
|
||||
RangeToTargetAttributeID,
|
||||
RangeFromCreationAttributeID,
|
||||
NextAttributeID
|
||||
};
|
||||
|
||||
private:
|
||||
static const IndexEntry AttributePointers[];
|
||||
|
||||
protected:
|
||||
static AttributeIndexSet AttributeIndex;
|
||||
|
||||
//
|
||||
// public attribute declarations go here
|
||||
//
|
||||
public:
|
||||
Point3D targetPosition; // for thruster
|
||||
const Point3D creationPoint; // where the missile was fired from
|
||||
Entity *targetEntity;
|
||||
const Point3D targetOffset;
|
||||
Scalar rangeToTarget, rangeFromCreation, startingRangeToTarget;
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Model Support
|
||||
//
|
||||
public:
|
||||
enum {
|
||||
Empty = Subsystem::StateCount,
|
||||
StateCount};
|
||||
|
||||
typedef void
|
||||
(Seeker::*Performance)(Scalar time_slice);
|
||||
|
||||
|
||||
void
|
||||
LeadTarget();
|
||||
void
|
||||
FindTarget(Scalar time_slice);
|
||||
|
||||
void
|
||||
SetPerformance(Performance performance)
|
||||
{
|
||||
Check(this);
|
||||
activePerformance = (Simulation::Performance)performance;
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// TestClass Support
|
||||
//
|
||||
public:
|
||||
|
||||
static Logical
|
||||
TestClass(Missile &);
|
||||
void
|
||||
ResetToInitialState();
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Construction and Destruction
|
||||
//
|
||||
public:
|
||||
typedef Seeker__SubsystemResource SubsystemResource;
|
||||
|
||||
Seeker (
|
||||
Missile *owner,
|
||||
int subsystem_ID,
|
||||
SubsystemResource *subsystem_resource,
|
||||
Entity *target,
|
||||
const Point3D offset
|
||||
);
|
||||
~Seeker();
|
||||
|
||||
Logical
|
||||
TestInstance() const;
|
||||
};
|
||||
#endif
|
||||
@@ -0,0 +1,143 @@
|
||||
//===========================================================================//
|
||||
// File: sensor.hpp //
|
||||
// Project: BattleTech //
|
||||
// Contents: Sensor subsystem //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Date Who Modification //
|
||||
// -------- --- ---------------------------------------------------------- //
|
||||
// 8/10/95 GDU Initial coding. //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Copyright (C) 1995, Virtual World Entertainment, Inc. All Rights reserved //
|
||||
// PROPRIETARY AND CONFIDENTIAL //
|
||||
//===========================================================================//
|
||||
#if !defined(SENSOR_HPP)
|
||||
# define SENSOR_HPP
|
||||
|
||||
#if !defined(POWERSUB_HPP)
|
||||
#include "powersub.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
//##########################################################################
|
||||
//################# SensorSubsystemResource #######################
|
||||
//##########################################################################
|
||||
|
||||
struct Sensor__SubsystemResource:
|
||||
public PoweredSubsystem::SubsystemResource
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
//##########################################################################
|
||||
//########################## Sensor ###############################
|
||||
//##########################################################################
|
||||
|
||||
class Sensor:
|
||||
public PoweredSubsystem
|
||||
{
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Death and Damage Support
|
||||
//
|
||||
public:
|
||||
|
||||
void
|
||||
TakeDamage(Damage &damage);
|
||||
|
||||
void
|
||||
DeathReset(Logical full_recovery);
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Shared Data Support
|
||||
//
|
||||
|
||||
public:
|
||||
static Derivation ClassDerivations;
|
||||
static SharedData DefaultData;
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Attribute Support
|
||||
//
|
||||
public:
|
||||
enum {
|
||||
RadarPercentAttributeID = PoweredSubsystem::NextAttributeID,
|
||||
SelfTestAttributeID,
|
||||
BadVoltageAttributeID,
|
||||
NextAttributeID
|
||||
};
|
||||
|
||||
private:
|
||||
static const IndexEntry AttributePointers[];
|
||||
|
||||
protected:
|
||||
static AttributeIndexSet AttributeIndex;
|
||||
|
||||
|
||||
|
||||
public:
|
||||
Scalar
|
||||
radarPercent;
|
||||
Logical
|
||||
selfTest,
|
||||
badVoltage;
|
||||
|
||||
|
||||
//##########################################################################
|
||||
// Simulation Support
|
||||
//
|
||||
public:
|
||||
|
||||
typedef void
|
||||
(Sensor::*Performance)(Scalar time_slice);
|
||||
|
||||
void
|
||||
SetPerformance(Performance performance)
|
||||
{
|
||||
Check(this);
|
||||
activePerformance = (Simulation::Performance)performance;
|
||||
}
|
||||
|
||||
void
|
||||
SensorSimulation(Scalar time_slice);
|
||||
|
||||
//##########################################################################
|
||||
// Test Class Support
|
||||
//
|
||||
public:
|
||||
static Logical
|
||||
TestClass(Mech&);
|
||||
void
|
||||
ResetToInitialState();
|
||||
|
||||
//##########################################################################
|
||||
// Construction and Destruction
|
||||
//
|
||||
public:
|
||||
typedef Sensor__SubsystemResource SubsystemResource;
|
||||
|
||||
Sensor(
|
||||
Mech *owner,
|
||||
int subsystem_ID,
|
||||
SubsystemResource *subsystem_resource
|
||||
);
|
||||
~Sensor();
|
||||
|
||||
Logical
|
||||
TestInstance() const;
|
||||
|
||||
static int
|
||||
CreateStreamedSubsystem(
|
||||
NotationFile *model_file,
|
||||
const char *model_name,
|
||||
const char *subsystem_name,
|
||||
SubsystemResource *subsystem_resource,
|
||||
NotationFile *subsystem_file,
|
||||
const ResourceDirectories *directories,
|
||||
int passes = 1
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,68 @@
|
||||
|
||||
#if !defined(TESTBT_HPP)
|
||||
# define TESTBT_HPP
|
||||
|
||||
# if !defined(APP_HPP)
|
||||
# include <app.hpp>
|
||||
# endif
|
||||
|
||||
# if !defined(APP_THP)
|
||||
# include <app.thp>
|
||||
# endif
|
||||
|
||||
# if !defined(MISSION_HPP)
|
||||
# include <mission.hpp>
|
||||
# endif
|
||||
|
||||
#define TEST_DEBUG
|
||||
|
||||
//##########################################################################
|
||||
//###################### TestBTApplication ##########################
|
||||
//##########################################################################
|
||||
|
||||
class TestBTApplication:
|
||||
public TestApplication
|
||||
{
|
||||
public:
|
||||
TestBTApplication(StreamableResourceFile *resource);
|
||||
~TestBTApplication();
|
||||
|
||||
static Logical
|
||||
ParseCommandLine(
|
||||
int argc,
|
||||
char *argv[],
|
||||
CString *egg_notation_file_name
|
||||
);
|
||||
|
||||
private:
|
||||
Registry*
|
||||
MakeRegistry();
|
||||
Entity*
|
||||
MakeViewpointEntity(Entity::MakeMessage *message);
|
||||
};
|
||||
|
||||
//##########################################################################
|
||||
//########################### TestBTMission ##########################
|
||||
//##########################################################################
|
||||
|
||||
class TestBTMission:
|
||||
public Mission
|
||||
{
|
||||
public:
|
||||
TestBTMission(
|
||||
NotationFile *notation_file,
|
||||
StreamableResourceFile *resources
|
||||
);
|
||||
~TestBTMission();
|
||||
|
||||
Logical
|
||||
TestInstance() const;
|
||||
|
||||
void
|
||||
CreatePlayerMessage(
|
||||
NotationFile *notation_file,
|
||||
StreamableResourceFile *resources
|
||||
);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,148 @@
|
||||
//===========================================================================//
|
||||
// File: jmover.hh //
|
||||
// Project: MUNGA Brick: Model Manager //
|
||||
// Contents: Interface specification for moving entity class //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Date Who Modification //
|
||||
// -------- --- ---------------------------------------------------------- //
|
||||
// 01/21/95 JMA Initial coding. //
|
||||
//---------------------------------------------------------------------------//
|
||||
// Copyright (C) 1995, Virtual World Entertainment, Inc. //
|
||||
// All Rights reserved worldwide //
|
||||
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
|
||||
//===========================================================================//
|
||||
|
||||
#if !defined(TURRET_HPP)
|
||||
# define TURRET_HPP
|
||||
|
||||
# if !defined(JMOVER_HPP)
|
||||
# include <jmover.hpp>
|
||||
# endif
|
||||
|
||||
//##########################################################################
|
||||
//################## Turret::ModelResource ###########################
|
||||
//##########################################################################
|
||||
|
||||
struct Turret__ModelResource:
|
||||
JointedMover::ModelResource
|
||||
{
|
||||
char turretJointName[32];
|
||||
char gunJointName[32];
|
||||
ResourceDescription::ResourceID
|
||||
explosionResourceID;
|
||||
Scalar
|
||||
rotationSpeedMin,
|
||||
rotationSpeedMax,
|
||||
elevationSpeedMin,
|
||||
elevationSpeedMax,
|
||||
rateSkillMin,
|
||||
rateSkillMax,
|
||||
rateAdjMin,
|
||||
rateAdjMax,
|
||||
accuracySkillMin,
|
||||
accuracySkillMax,
|
||||
accuracyAdjMin,
|
||||
accuracyAdjMax;
|
||||
};
|
||||
|
||||
#if 0
|
||||
//##########################################################################
|
||||
//################## Turret::ModelResource ###########################
|
||||
//##########################################################################
|
||||
|
||||
class Turret__MakeMessage:
|
||||
JointedMover::MakeMessage
|
||||
{
|
||||
public:
|
||||
char teamName[32];
|
||||
char roleName[32];
|
||||
};
|
||||
#endif
|
||||
|
||||
//##########################################################################
|
||||
//######################### Turret ###################################
|
||||
//##########################################################################
|
||||
|
||||
class Turret:
|
||||
public JointedMover
|
||||
{
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Shared Data support
|
||||
//
|
||||
public:
|
||||
static Derivation ClassDerivations;
|
||||
static SharedData DefaultData;
|
||||
|
||||
#if 0
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Message Support
|
||||
//
|
||||
private:
|
||||
static const HandlerEntry MessageHandlerEntries[];
|
||||
protected:
|
||||
static MessageHandlerSet MessageHandlers;
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Attribute Support
|
||||
//
|
||||
public:
|
||||
enum{
|
||||
NextAttributeID
|
||||
};
|
||||
|
||||
private:
|
||||
static const IndexEntry AttributePointers[];
|
||||
|
||||
protected:
|
||||
static AttributeIndexSet AttributeIndex;
|
||||
#endif
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Model Support
|
||||
//
|
||||
public:
|
||||
typedef Turret__ModelResource ModelResource;
|
||||
typedef void
|
||||
(Turret::*Performance)(Scalar time_slice);
|
||||
|
||||
void
|
||||
SetPerformance(Performance performance)
|
||||
{
|
||||
Check(this);
|
||||
activePerformance = (Simulation::Performance)performance;
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Construction and Destruction
|
||||
//
|
||||
public:
|
||||
static Logical
|
||||
CreateMakeMessage(
|
||||
MemoryStream &creation_stream,
|
||||
NotationFile *model_file,
|
||||
const ResourceDirectories *directories
|
||||
);
|
||||
static ResourceDescription::ResourceID
|
||||
CreateModelResource(
|
||||
ResourceFile *resource_file,
|
||||
const char* model_name,
|
||||
NotationFile *model_file,
|
||||
const ResourceDirectories *directories,
|
||||
ModelResource* model = NULL
|
||||
);
|
||||
|
||||
static Turret*
|
||||
Make(MakeMessage *creation_message);
|
||||
|
||||
Turret(
|
||||
MakeMessage *creation_message,
|
||||
SharedData &virtual_data
|
||||
);
|
||||
~Turret();
|
||||
|
||||
Logical
|
||||
TestInstance() const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user