Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constructions #386

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/game/CAvaraApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ CAvaraAppImpl::CAvaraAppImpl() : CApplication("Avara") {
}

CAvaraAppImpl::~CAvaraAppImpl() {
itsGame->Dispose();
DeallocParser();
}

Expand Down
4 changes: 1 addition & 3 deletions src/game/CAvaraGame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ CSoundHub* CAvaraGame::CreateSoundHub() {
return soundHub;
}

void CAvaraGame::Dispose() {
CAvaraGame::~CAvaraGame() {
CAbstractActor *nextActor;

spectatePlayer = NULL;
Expand Down Expand Up @@ -184,8 +184,6 @@ void CAvaraGame::Dispose() {

// DisposePolyWorld(&itsPolyWorld);
DisposePtr((Ptr)locatorTable);

CDirectObject::Dispose();
}

CAbstractActor *CAvaraGame::FindIdent(long ident) {
Expand Down
4 changes: 2 additions & 2 deletions src/game/CAvaraGame.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class CIncarnator;
class CScoreKeeper;
class CAbstractYon;

class CAvaraGame : public CDirectObject {
class CAvaraGame {
public:
std::string loadedFilename = "";
std::string loadedLevel = "";
Expand Down Expand Up @@ -229,7 +229,7 @@ class CAvaraGame : public CDirectObject {
virtual void GameStart();
virtual bool GameTick();
virtual void GameStop();
virtual void Dispose();
virtual ~CAvaraGame();

virtual void SpectateNext();
virtual void SpectatePrevious();
Expand Down
9 changes: 8 additions & 1 deletion src/tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@ class TestGame : public CAvaraGame {
}
};

class TestWalkerActor : public CWalkerActor {
void ResetCamera() {

}
};

class HectorTestScenario {
public:
TestApp app;
Expand All @@ -205,7 +211,7 @@ class HectorTestScenario {
game->EndScript();
app.GetNet()->ChangeNet(kNullNet, "");
game->LevelReset(false);
hector = new CWalkerActor();
hector = new TestWalkerActor();
hector->BeginScript();
hector->EndScript();
game->itsNet->playerTable[0]->SetPlayer(hector);
Expand All @@ -215,6 +221,7 @@ class HectorTestScenario {
hector->location[2] = hectorZ;
hector->location[3] = FIX1;
game->AddActor(hector);
game->freshPlayerList = 0;
game->GameStart();
}
};
Expand Down
Loading