summaryrefslogtreecommitdiffhomepage
path: root/Stars45/Sim.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Stars45/Sim.cpp')
-rw-r--r--Stars45/Sim.cpp49
1 files changed, 24 insertions, 25 deletions
diff --git a/Stars45/Sim.cpp b/Stars45/Sim.cpp
index ccfab62..36d5356 100644
--- a/Stars45/Sim.cpp
+++ b/Stars45/Sim.cpp
@@ -11,7 +11,6 @@
Simulation Universe and Region classes
*/
-#include "MemDebug.h"
#include "Sim.h"
#include "SimEvent.h"
#include "SimObject.h"
@@ -381,7 +380,7 @@ Sim::ExecMission()
dust_factor = Starshatter::GetInstance()->Dust();
if (star_system->NumDust() * dust_factor) {
- dust = new(__FILE__,__LINE__) Dust(star_system->NumDust() * 2*(dust_factor+1), dust_factor > 1);
+ dust = new Dust(star_system->NumDust() * 2*(dust_factor+1), dust_factor > 1);
scene.AddGraphic(dust);
}
@@ -425,7 +424,7 @@ Sim::CreateRegions()
while (++moon) {
ListIter<OrbitalRegion> rgn = moon->Regions();
while (++rgn) {
- SimRegion* sim_region = new(__FILE__,__LINE__) SimRegion(this, rgn.value());
+ SimRegion* sim_region = new SimRegion(this, rgn.value());
regions.append(sim_region);
if (!strcmp(active_region_name, sim_region->Name())) {
ActivateRegion(sim_region);
@@ -435,7 +434,7 @@ Sim::CreateRegions()
ListIter<OrbitalRegion> rgn = planet->Regions();
while (++rgn) {
- SimRegion* sim_region = new(__FILE__,__LINE__) SimRegion(this, rgn.value());
+ SimRegion* sim_region = new SimRegion(this, rgn.value());
regions.append(sim_region);
if (!strcmp(active_region_name, sim_region->Name())) {
ActivateRegion(sim_region);
@@ -445,7 +444,7 @@ Sim::CreateRegions()
ListIter<OrbitalRegion> rgn = star->Regions();
while (++rgn) {
- SimRegion* sim_region = new(__FILE__,__LINE__) SimRegion(this, rgn.value());
+ SimRegion* sim_region = new SimRegion(this, rgn.value());
regions.append(sim_region);
if (!strcmp(active_region_name, sim_region->Name())) {
ActivateRegion(sim_region);
@@ -606,7 +605,7 @@ Sim::CreateElements()
Instruction* o = obj.value();
Instruction* instr = 0;
- instr = new(__FILE__,__LINE__) Instruction(*o);
+ instr = new Instruction(*o);
element->AddObjective(instr);
}
@@ -626,7 +625,7 @@ Sim::CreateElements()
rgn = FindRegion(msn_elem->Region());
if (rgn) {
- Instruction* npt = new(__FILE__,__LINE__)
+ Instruction* npt = new
Instruction(rgn, nav->Location(), nav->Action());
npt->SetStatus(nav->Status());
@@ -909,7 +908,7 @@ Sim::CopyEvents()
ListIter<MissionEvent> iter = mission->GetEvents();
while (++iter) {
MissionEvent* orig = iter.value();
- MissionEvent* event = new(__FILE__,__LINE__) MissionEvent(*orig);
+ MissionEvent* event = new MissionEvent(*orig);
events.append(event);
}
}
@@ -935,7 +934,7 @@ Sim::FindAvailCallsign(int IFF)
Element*
Sim::CreateElement(const char* callsign, int IFF, int type)
{
- Element* elem = new(__FILE__,__LINE__) Element(callsign, IFF, type);
+ Element* elem = new Element(callsign, IFF, type);
elements.append(elem);
return elem;
}
@@ -999,7 +998,7 @@ Sim::CreateShip(const char* name, const char* reg_num, ShipDesign* design, const
return 0;
}
- Ship* ship = new(__FILE__,__LINE__) Ship(name, reg_num, design, IFF, cmd_ai, loadout);
+ Ship* ship = new Ship(name, reg_num, design, IFF, cmd_ai, loadout);
ship->MoveTo(loc.OtherHand());
if (rgn) {
@@ -1100,9 +1099,9 @@ Sim::CreateShot(const Point& pos, const Camera& shot_cam, WeaponDesign* design,
Shot* shot = 0;
if (design->drone)
- shot = new(__FILE__,__LINE__) Drone(pos, shot_cam, design, ship);
+ shot = new Drone(pos, shot_cam, design, ship);
else
- shot = new(__FILE__,__LINE__) Shot( pos, shot_cam, design, ship);
+ shot = new Shot( pos, shot_cam, design, ship);
if (rgn)
rgn->InsertObject(shot);
@@ -1122,7 +1121,7 @@ Sim::CreateExplosion(const Point& pos, const Point& vel, int type, float exp_sca
if (!rgn || !active_region || rgn != active_region)
return 0;
- Explosion* exp = new(__FILE__,__LINE__) Explosion(type, pos, vel, exp_scale, part_scale, rgn, source);
+ Explosion* exp = new Explosion(type, pos, vel, exp_scale, part_scale, rgn, source);
if (rgn)
rgn->InsertObject(exp);
@@ -1138,7 +1137,7 @@ Sim::CreateExplosion(const Point& pos, const Point& vel, int type, float exp_sca
Debris*
Sim::CreateDebris(const Point& pos, const Point& vel, Model* model, double mass, SimRegion* rgn)
{
- Debris* debris = new(__FILE__,__LINE__) Debris(model, pos, vel, mass);
+ Debris* debris = new Debris(model, pos, vel, mass);
if (rgn)
rgn->InsertObject(debris);
@@ -1154,7 +1153,7 @@ Sim::CreateDebris(const Point& pos, const Point& vel, Model* model, double mass,
Asteroid*
Sim::CreateAsteroid(const Point& pos, int t, double mass, SimRegion* rgn)
{
- Asteroid* asteroid = new(__FILE__,__LINE__) Asteroid(t, pos, mass);
+ Asteroid* asteroid = new Asteroid(t, pos, mass);
if (rgn)
rgn->InsertObject(asteroid);
@@ -1171,7 +1170,7 @@ void
Sim::CreateSplashDamage(Ship* ship)
{
if (ship && ship->GetRegion() && ship->Design()->splash_radius > 1) {
- SimSplash* splash = new(__FILE__,__LINE__)
+ SimSplash* splash = new
SimSplash(ship->GetRegion(),
ship->Location(),
ship->Design()->integrity / 4,
@@ -1192,7 +1191,7 @@ Sim::CreateSplashDamage(Shot* shot)
if (damage < shot->Design()->damage)
damage = shot->Design()->damage;
- SimSplash* splash = new(__FILE__,__LINE__)
+ SimSplash* splash = new
SimSplash(shot->GetRegion(),
shot->Location(),
damage,
@@ -1483,7 +1482,7 @@ int type, Ship* fc1, Ship* fc2)
if (obj->GetQuantumDrive() && obj->GetQuantumDrive()->Subtype() == QuantumDrive::HYPER)
hyperdrive = true;
- jumplist.append(new(__FILE__,__LINE__) SimHyper(obj, rgn, loc, type, hyperdrive, fc1, fc2));
+ jumplist.append(new SimHyper(obj, rgn, loc, type, hyperdrive, fc1, fc2));
}
// +--------------------------------------------------------------------+
@@ -2034,7 +2033,7 @@ Sim::CreateMissionElement(Element* elem)
}
if (elem && !elem->IsNetObserver()) {
- msn_elem = new(__FILE__,__LINE__) MissionElement;
+ msn_elem = new MissionElement;
msn_elem->SetName(elem->Name());
msn_elem->SetIFF(elem->GetIFF());
@@ -2110,7 +2109,7 @@ Sim::CreateMissionElement(Element* elem)
msn_elem->SetRespawnCount(ship->RespawnCount());
}
- MissionLoad* loadout = new(__FILE__,__LINE__) MissionLoad;
+ MissionLoad* loadout = new MissionLoad;
CopyMemory(loadout->GetStations(), elem->Loadout(), 16 * sizeof(int));
msn_elem->Loadouts().append(loadout);
@@ -2120,7 +2119,7 @@ Sim::CreateMissionElement(Element* elem)
Instruction* o = elem->GetObjective(i);
Instruction* instr = 0;
- instr = new(__FILE__,__LINE__) Instruction(*o);
+ instr = new Instruction(*o);
msn_elem->AddObjective(instr);
}
@@ -2134,7 +2133,7 @@ Sim::CreateMissionElement(Element* elem)
ListIter<Instruction> nav_iter = elem->GetFlightPlan();
while (++nav_iter) {
Instruction* nav = nav_iter.value();
- Instruction* npt = new(__FILE__,__LINE__)
+ Instruction* npt = new
Instruction(nav->RegionName(), nav->Location(), nav->Action());
npt->SetFormation(nav->Formation());
@@ -2151,7 +2150,7 @@ Sim::CreateMissionElement(Element* elem)
ship = elem->GetShip(i+1);
if (ship) {
- MissionShip* s = new(__FILE__,__LINE__) MissionShip;
+ MissionShip* s = new MissionShip;
s->SetName(ship->Name());
s->SetRegNum(ship->Registry());
@@ -2247,13 +2246,13 @@ SimRegion::SimRegion(Sim* s, OrbitalRegion* r)
if (orbital_region) {
name = orbital_region->Name();
- grid = new(__FILE__,__LINE__) Grid((int) orbital_region->Radius(),
+ grid = new Grid((int) orbital_region->Radius(),
(int) orbital_region->GridSpace());
if (orbital_region->Type() == Orbital::TERRAIN) {
TerrainRegion* trgn = (TerrainRegion*) orbital_region;
- terrain = new(__FILE__,__LINE__) Terrain(trgn);
+ terrain = new Terrain(trgn);
type = AIR_SPACE;
}