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.
135 lines
2.6 KiB
C++
135 lines
2.6 KiB
C++
// EdObjective.cpp: implementation of the EdObjective class.
|
|
//
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
#include "stdafx.h"
|
|
#include "mw4gameed2.h"
|
|
#include "EdObjective.h"
|
|
#include <MW4\Objective.hpp>
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
// Construction/Destruction
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
EdObjective::EdObjective():EdGameObject()
|
|
{
|
|
|
|
}
|
|
|
|
void EdObjective::Copy(EdObjective &obj)
|
|
{
|
|
EdGameObject::Copy(obj);
|
|
}
|
|
|
|
EdGUIObject *EdObjective::Clone()
|
|
{
|
|
EdObjective *obj=new EdObjective;
|
|
obj->Copy(*this);
|
|
return obj;
|
|
}
|
|
|
|
EdObjective::EdObjective(CString name):EdGameObject()
|
|
{
|
|
BuildFrom(CString("Misc\\Objective\\Objective.instance"),name);
|
|
|
|
}
|
|
|
|
EdObjective::~EdObjective()
|
|
{
|
|
}
|
|
|
|
Objective *EdObjective::GetObjective()
|
|
{
|
|
return Cast_Object(Objective*,MyEntity);
|
|
}
|
|
|
|
|
|
CString EdObjective::GetDescriptionText()
|
|
{
|
|
return (GetObjective()->m_LoadedDescriptionText);
|
|
}
|
|
|
|
CString EdObjective::GetNeutralText()
|
|
{
|
|
return (GetObjective()->m_LoadedNeutralText);
|
|
}
|
|
|
|
CString EdObjective::GetFailText()
|
|
{
|
|
return (GetObjective()->m_LoadedFailText);
|
|
}
|
|
|
|
CString EdObjective::GetSuccessText()
|
|
{
|
|
return (GetObjective()->m_LoadedSucceedText);
|
|
}
|
|
|
|
void EdObjective::SetDescriptionText(CString &text)
|
|
{
|
|
Str_Copy(GetObjective()->m_LoadedDescriptionText,(LPCSTR)text,sizeof(GetObjective()->m_LoadedDescriptionText));
|
|
}
|
|
|
|
void EdObjective::SetNeutralText(CString &text)
|
|
{
|
|
Str_Copy(GetObjective()->m_LoadedNeutralText,(LPCSTR)text,sizeof(GetObjective()->m_LoadedNeutralText));
|
|
|
|
}
|
|
|
|
void EdObjective::SetFailText(CString &text)
|
|
{
|
|
Str_Copy(GetObjective()->m_LoadedFailText,(LPCSTR)text,sizeof(GetObjective()->m_LoadedFailText));
|
|
|
|
}
|
|
|
|
void EdObjective::SetSuccessText(CString &text)
|
|
{
|
|
Str_Copy(GetObjective()->m_LoadedSucceedText,(LPCSTR)text,sizeof(GetObjective()->m_LoadedSucceedText));
|
|
}
|
|
|
|
|
|
bool EdObjective::GetVisible()
|
|
{
|
|
return GetObjective()->m_VisibleObjective;
|
|
}
|
|
|
|
bool EdObjective::GetHelpMessage()
|
|
{
|
|
return GetObjective()->m_HelpMessage;
|
|
|
|
}
|
|
|
|
bool EdObjective::GetPrimary()
|
|
{
|
|
return GetObjective()->m_Primary;
|
|
|
|
}
|
|
|
|
int EdObjective::GetComLevel()
|
|
{
|
|
return GetObjective()->m_ObjectiveState;
|
|
}
|
|
|
|
|
|
void EdObjective::SetVisible(bool flag)
|
|
{
|
|
GetObjective()->m_VisibleObjective=flag;
|
|
}
|
|
|
|
void EdObjective::SetHelpMessage(bool flag)
|
|
{
|
|
GetObjective()->m_HelpMessage=flag;
|
|
}
|
|
|
|
void EdObjective::SetPrimary(bool flag)
|
|
{
|
|
GetObjective()->m_Primary=flag;
|
|
}
|
|
|
|
void EdObjective::SetComLevel(int clevel)
|
|
{
|
|
GetObjective()->m_ObjectiveState=clevel;
|
|
}
|
|
|