Skip to content

Commit

Permalink
UPBGE: Cleanup SG_Controller and subclasses.
Browse files Browse the repository at this point in the history
This commits add an empty SetOption function in SG_Controller to avoid redefinition
in subclasses, also the attributes m_modified and m_ipotime which are used in all
controller classes are moved into the base class SG_Controller, in consideration
the function SetSimulationTime is de-virtualized and moved into SG_Controller.
  • Loading branch information
panzergame committed Dec 28, 2017
1 parent a972f04 commit ad70ea4
Show file tree
Hide file tree
Showing 10 changed files with 250 additions and 335 deletions.
9 changes: 0 additions & 9 deletions source/gameengine/Ketsji/KX_CameraIpoSGController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,4 @@ KX_CameraIpoSGController::~KX_CameraIpoSGController()
delete (*i);
}

}

void
KX_CameraIpoSGController::SetOption(
int option,
int value)
{
/* Setting options */

}
12 changes: 1 addition & 11 deletions source/gameengine/Ketsji/KX_CameraIpoSGController.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,28 +51,18 @@ class KX_CameraIpoSGController : public SG_Controller
unsigned short m_modify_lens : 1;
unsigned short m_modify_clipstart : 1;
unsigned short m_modify_clipend : 1;
bool m_modified;

double m_ipotime;
public:
KX_CameraIpoSGController() :
m_modify_lens(false),
m_modify_clipstart(false),
m_modify_clipend(false),
m_modified(true),
m_ipotime(0.0)
m_modify_clipend(false)
{}

~KX_CameraIpoSGController();
SG_Controller* GetReplica(class SG_Node* destnode);
bool Update(double time);

void
SetOption(
int option,
int value
);

void SetSimulatedTime(double time) {
m_ipotime = time;
m_modified = true;
Expand Down
Loading

0 comments on commit ad70ea4

Please sign in to comment.