// NVGameObject.cpp: implementation of the NVGameObject class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "MW4GameEd2.h" #include "NVGameObject.h" #include "DrawInfo.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// NVGameObject::NVGameObject() { Visual=false; ScreenDiv=100; Changeable=false; } void NVGameObject::Draw(DrawInfo &dinf) { if (IsHidden()) { return; } SetPen(dinf); int rad=GetScreenRadius(dinf.vinf); CPoint pnt=dinf.vinf.DataToScreen(GetPos()); dinf.GetDC()->MoveTo(pnt.x,pnt.y-rad); dinf.GetDC()->LineTo(pnt.x+rad,pnt.y); dinf.GetDC()->LineTo(pnt.x,pnt.y+rad); dinf.GetDC()->LineTo(pnt.x-rad,pnt.y); dinf.GetDC()->LineTo(pnt.x,pnt.y-rad); } EdGUIObject *NVGameObject::Clone() { NVGameObject *obj=new NVGameObject; obj->Copy(*this); return obj; } NVGameObject::~NVGameObject() { }