1
0
forked from 0ad/0ad

Remove Trigger and Cinematic sections from Atlas.

This was SVN commit r14166.
This commit is contained in:
leper 2013-11-14 00:10:04 +00:00
parent bd900362ea
commit 4c395f4bf2
5 changed files with 1 additions and 3110 deletions

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2011 Wildfire Games.
/* Copyright (C) 2013 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -28,12 +28,10 @@
#include "AtlasScript/ScriptInterface.h"
#include "Sections/Environment/Environment.h"
#include "Sections/Cinematic/Cinematic.h"
#include "Sections/Map/Map.h"
#include "Sections/Object/Object.h"
#include "Sections/Player/Player.h"
#include "Sections/Terrain/Terrain.h"
#include "Sections/Trigger/Trigger.h"
#include "General/Datafile.h"
@ -293,9 +291,6 @@ void SectionLayout::Build(ScenarioEditor& scenarioEditor)
ADD_SIDEBAR(TerrainSidebar, _T("terrain.png"), _("Terrain"));
ADD_SIDEBAR(ObjectSidebar, _T("object.png"), _("Object"));
ADD_SIDEBAR(EnvironmentSidebar, _T("environment.png"), _("Environment"));
// ADD_SIDEBAR(CinematicSidebar, _T("cinematic.png"), _("Cinema"));
// ADD_SIDEBAR(TriggerSidebar, _T("trigger.png"), _("Trigger"));
#undef ADD_SIDEBAR

View File

@ -1,106 +0,0 @@
/* Copyright (C) 2009 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* 0 A.D. is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
*/
/*
Desc: receives user input and communicates with the engine
to perform various cinematic functions.
*/
#include "../Common/Sidebar.h"
#include "GameInterface/Messages.h"
class PathListCtrl;
class NodeListCtrl;
class PathSlider;
class CinemaSpinnerBox;
class CinemaInfoBox;
class CinematicBottomBar;
class CinemaButtonBox;
class wxImage;
class CinematicSidebar : public Sidebar
{
//For ease (from lazyness)
friend class CinemaButtonBox;
friend class PathSlider;
public:
CinematicSidebar(ScenarioEditor& scenarioEditor, wxWindow* sidebarContainer, wxWindow* bottomBarContainer);
//The actual data is stored in bottom bar, but is controled from here
void SelectPath(ssize_t n);
//avoid excessive shareable->vector conversion with size paramater
void SelectSplineNode(ssize_t n, ssize_t size = -1);
void AddPath(std::wstring& name, int count);
void AddNode(float px, float py, float pz, float rx, float ry, float rz, int count);
void UpdatePath(std::wstring name, float timescale);
void UpdateNode(float px, float py, float pz, float rx, float ry, float rz, bool absoluteOveride, float t=-1);
void DeleteTrack();
void DeletePath();
void DeleteNode();
void SetSpinners(CinemaSpinnerBox* box) { m_SpinnerBox = box; }
const AtlasMessage::sCinemaPath* GetCurrentPath() const;
AtlasMessage::sCinemaSplineNode GetCurrentNode() const;
std::wstring GetSelectedPathName() const;
int GetSelectedPath() const { return m_SelectedPath; }
int GetSelectedNode() const { return m_SelectedSplineNode; }
void GotoNode(ssize_t index=-1);
void UpdatePathInfo(int mode, int style, float growth, float change, bool drawCurrent, bool drawLine);
void UpdateSpinners();
void UpdateTexts();
void UpdateEngineData();
void SendEngineSelection();
float m_TimeElapsed; //path time
float m_AbsoluteTime; //track time
bool m_RotationAbsolute; //rotation display flag in spinner box
bool m_Playing;
protected:
virtual void OnFirstDisplay();
private:
// Stores all cinematics data for this map. Initialised by OnFirstDisplay.
// Sent back to the game by [TODO]. (TODO: handle 'undo' correctly)
std::vector<AtlasMessage::sCinemaPath> m_Paths;
CinemaButtonBox* m_IconSizer;
ssize_t m_SelectedPath; // -1 for none
ssize_t m_SelectedSplineNode; // -1 for none
PathListCtrl* m_PathList;
NodeListCtrl* m_NodeList;
PathSlider* m_PathSlider;
CinemaSpinnerBox* m_SpinnerBox; //We must update the display
CinemaInfoBox* m_InfoBox; // ^same^
CinematicBottomBar* m_CinemaBottomBar;
wxImage LoadIcon(const wxString& filename);
void LoadIcons();
};

View File

@ -1,104 +0,0 @@
/* Copyright (C) 2009 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* 0 A.D. is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
*/
/* Desc: interface for creation and editing of triggers. Interprets
XML specifications then uses this to construct layout.
*/
#include "../Common/Sidebar.h"
#include "GameInterface/Messages.h"
class TriggerItemData;
class TriggerTreeCtrl;
class TriggerBottomBar;
class TriggerPage;
class wxTreeItemId;
class wxTreeItemData;
class wxTreeEvent;
class wxListEvent;
class wxNotebook;
class wxNotebookEvent;
class wxTreeEvent;
class wxListEvent;
class TriggerSidebar : public Sidebar
{
public:
enum { ID_CondList, ID_EffectList };
TriggerSidebar(ScenarioEditor& scenarioEditor, wxWindow* sidebarContainer, wxWindow* bottomBarContainer);
void onTreeDrag(wxTreeEvent& evt);
void onTreeNameChange(wxTreeEvent& evt);
//void onTreeDelete(wxTreeEvent& evt);
void onTreeSelChange(wxTreeEvent& evt);
void onTreeCollapse(wxTreeEvent& evt);
void onListSelect(wxListEvent& evt);
void onEffectSelect(wxListEvent& evt);
void onCondSelect(wxListEvent& evt);
void onPageChange(wxNotebookEvent& evt);
bool IsGroupSelected();
TriggerItemData* ToDerived(wxTreeItemData* data);
TriggerItemData* GetSelectedItemData();
//Finds condition number (index+1) of m_SelectedCond [needed because of logic blocks]
int GetConditionCount(int limit);
int GetLogicBlockCount(int limit);
void UpdateLists();
void UpdateEngineData();
//AtlasMessage::sTriggerList m_TriggerList;
TriggerBottomBar* m_TriggerBottom;
TriggerTreeCtrl* m_TriggerTree;
TriggerPage* m_ConditionPage, *m_EffectPage;
wxNotebook* m_Notebook;
size_t m_TriggerCount, m_GroupCount;
long m_SelectedCond, m_SelectedEffect, m_SelectedCondIndex, m_SelectedEffectIndex;
wxString m_LogicBlockString, m_LogicBlockEndString;
protected:
virtual void OnFirstDisplay();
private:
struct copyIfRootChild
{
copyIfRootChild(std::vector<AtlasMessage::sTriggerGroup>& groupList) : m_groupList(groupList) {}
void operator() ( const AtlasMessage::sTriggerGroup& group )
{
if ( *group.parentName == std::wstring(L"Triggers") )
m_groupList.push_back(group);
}
private:
std::vector<AtlasMessage::sTriggerGroup>& m_groupList;
};
void AddGroupTree(const AtlasMessage::sTriggerGroup& group, wxTreeItemId parent);
void CreateGroup(std::vector<AtlasMessage::sTriggerGroup>& groupList,
AtlasMessage::sTriggerGroup& parent, wxTreeItemId index);
AtlasMessage::sTrigger CreateTrigger(TriggerItemData* data);
std::vector<AtlasMessage::sTriggerGroup> m_TriggerGroups;
DECLARE_EVENT_TABLE();
};