Files
Cyd 2b8ca921cb Initial full mirror of c:\VWE (source + assets + toolchain + outputs) via Git LFS
Complete disaster-recovery snapshot: engine/game source, game data assets,
VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive.
Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false,
no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
2026-06-24 21:28:16 -05:00

92 lines
2.6 KiB
C++

//===========================================================================//
// File: Command.cpp //
//---------------------------------------------------------------------------//
// Date Who Modification //
// -------- --- ---------------------------------------------------------- //
// 12/15/97 DPB Created this kick ass file //
//---------------------------------------------------------------------------//
// Copyright (C) 1997, Virtual World Entertainment, Inc. //
// All Rights reserved worldwide //
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
//===========================================================================//
#include "stdafx.h"
#include "MW4GameEd.h"
#include "Command.h"
#include "Selection.h"
Command*
Current_Command = NULL;
extern CMW4GameEdApp theApp;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
Command::Command():
Plug(Plug::DefaultData),
selectedEntities(NULL)
{
CSelectionNode *selection_node;
CSelectionNode *command_node;
ChainIteratorOf<CSelectionNode*> iterator(&CSelectionList::Instance->selectionList);
iterator.First();
while((selection_node = iterator.ReadAndNext()) != NULL)
{
Check_Pointer(selection_node);
command_node = new CSelectionNode(selection_node->selectedEntity);
Register_Object(command_node);
selectedEntities.Add(command_node);
}
theApp.m_MissionSaved = false;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
Command::~Command()
{
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
void
Command::Execute()
{
//Nothing here. Need to override on higher layer
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
void
Command::Undo()
{
//Nothing here. Need to override on higher layer
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
void
Command::Delete()
{
CSelectionNode *selection_node;
if (!selectedEntities.IsEmpty())
{
ChainIteratorOf<CSelectionNode*> iterator(&selectedEntities);
iterator.First();
while((selection_node = iterator.ReadAndNext()) != NULL)
{
Check_Object(selection_node->selectedEntity);
selection_node->selectedEntity->SentenceToDeathRow();
}
}
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
void
Command::TestInstance()
{
}