From 01cc0fbc49696a19a56dfdd8359d4bb77e868925 Mon Sep 17 00:00:00 2001 From: erihel Date: Tue, 11 Sep 2012 12:49:41 +0200 Subject: * latest changes * all files except studio, map and maindialog should compile * did some code cleanup --- src/ui/maindialog.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src/ui/maindialog.h') diff --git a/src/ui/maindialog.h b/src/ui/maindialog.h index cfd9564..bddd61f 100644 --- a/src/ui/maindialog.h +++ b/src/ui/maindialog.h @@ -20,7 +20,6 @@ #include "common/struct.h" -#include "old/camera.h" #include "object/robotmain.h" -- cgit v1.2.3-1-g7c22 From 8ad15c0ef7d06d80abfa736295fbec3c5b005183 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Sat, 15 Sep 2012 21:47:19 +0200 Subject: CMainDialog rewrite - rewritten CMainDialog and updated CRobotMain --- src/ui/maindialog.h | 115 ++++++++++++++++++++++++++++------------------------ 1 file changed, 63 insertions(+), 52 deletions(-) (limited to 'src/ui/maindialog.h') diff --git a/src/ui/maindialog.h b/src/ui/maindialog.h index 5b33f92..df36a4d 100644 --- a/src/ui/maindialog.h +++ b/src/ui/maindialog.h @@ -19,22 +19,32 @@ #pragma once +#include "graphics/core/color.h" #include "object/robotmain.h" - class CInstanceManager; -class CEvent; -class CD3DEngine; +class CEventQueue; +class CSoundInterface; + +namespace Gfx +{ +class CEngine; +class CParticle; +}; + +namespace Ui +{ + class CInterface; class CWindow; class CControl; -class CParticule; -class CSound; const int USERLISTMAX = 100; const int MAXSCENE = 1000; +const int MAX_FNAME = 255; // TODO: remove after rewrite to std::string + struct SceneInfo { char numTry; @@ -45,9 +55,9 @@ struct GamerPerso { int face; // face int glasses; // glasses - D3DCOLORVALUE colorHair; // hair color - D3DCOLORVALUE colorCombi; // spacesuit volor - D3DCOLORVALUE colorBand; // strips color + Gfx::Color colorHair; // hair color + Gfx::Color colorCombi; // spacesuit volor + Gfx::Color colorBand; // strips color }; @@ -65,26 +75,26 @@ public: void SetStackRead(char* name); void SetSceneName(char* name); void SetSceneRank(int rank); - char* RetSceneRead(); - char* RetStackRead(); - char* RetSceneName(); - int RetSceneRank(); - char* RetSceneDir(); - bool RetSceneSoluce(); - char* RetSavegameDir(); - char* RetPublicDir(); - - bool RetTooltip(); - bool RetGlint(); - bool RetSoluce4(); - bool RetMovies(); - bool RetNiceReset(); - bool RetHimselfDamage(); + char* GetSceneRead(); + char* GetStackRead(); + char* GetSceneName(); + int GetSceneRank(); + char* GetSceneDir(); + bool GetSceneSoluce(); + char* GetSavegameDir(); + char* GetPublicDir(); + + bool GetTooltip(); + bool GetGlint(); + bool GetSoluce4(); + bool GetMovies(); + bool GetNiceReset(); + bool GetHimselfDamage(); void SetUserDir(char *base, int rank); void BuildSceneName(char *filename, char *base, int rank); void BuildResumeName(char *filename, char *base, int rank); - char* RetFilesDir(); + char* GetFilesDir(); void StartAbort(); void StartDeleteObject(); @@ -104,30 +114,30 @@ public: bool ReadGamerInfo(); bool WriteGamerInfo(); void SetGamerInfoTry(int rank, int numTry); - int RetGamerInfoTry(int rank); + int GetGamerInfoTry(int rank); void SetGamerInfoPassed(int rank, bool bPassed); - bool RetGamerInfoPassed(int rank); + bool GetGamerInfoPassed(int rank); bool NextMission(); void WriteGamerPerso(char *gamer); void ReadGamerPerso(char *gamer); void SetGamerFace(char *gamer, int face); - int RetGamerFace(char *gamer); - int RetGamerFace(); - int RetGamerGlasses(); - bool RetGamerOnlyHead(); - float RetPersoAngle(); - D3DCOLORVALUE RetGamerColorHair(); - D3DCOLORVALUE RetGamerColorCombi(); - D3DCOLORVALUE RetGamerColorBand(); + int GetGamerFace(char *gamer); + int GetGamerFace(); + int GetGamerGlasses(); + bool GetGamerOnlyHead(); + float GetPersoAngle(); + Gfx::Color GetGamerColorHair(); + Gfx::Color GetGamerColorCombi(); + Gfx::Color GetGamerColorBand(); void AllMissionUpdate(); void ShowSoluceUpdate(); protected: void GlintMove(); - void FrameParticule(float rTime); - void NiceParticule(Math::Point mouse, bool bPress); + void FrameParticle(float rTime); + void NiceParticle(Math::Point mouse, bool bPress); void ReadNameList(); void UpdateNameList(); void UpdateNameEdit(); @@ -148,7 +158,7 @@ protected: void IODeleteScene(); bool IOWriteScene(); bool IOReadScene(); - int RetChapPassed(); + int GetChapPassed(); void UpdateSceneChap(int &chap); void UpdateSceneList(int chap, int &sel); void UpdateSceneResume(int rank); @@ -160,17 +170,18 @@ protected: void ChangeSetupButtons(); void ChangeSetupQuality(int quality); void UpdateKey(); - void ChangeKey(EventMsg event); + void ChangeKey(EventType event); protected: CInstanceManager* m_iMan; - CRobotMain* m_main; - CEvent* m_event; - CD3DEngine* m_engine; - CInterface* m_interface; - CParticule* m_particule; - CCamera* m_camera; - CSound* m_sound; + CApplication* m_app; + CRobotMain* m_main; + CEventQueue* m_eventQueue; + Gfx::CEngine* m_engine; + CInterface* m_interface; + Gfx::CParticle* m_particle; + Gfx::CCamera* m_camera; + CSoundInterface* m_sound; Phase m_phase; // copy of CRobotMain Phase m_phaseSetup; // tab selected @@ -182,11 +193,11 @@ protected: int m_persoTab; // perso: tab selected float m_persoAngle; // perso: angle of presentation - char m_sceneDir[_MAX_FNAME]; // scene folder - char m_savegameDir[_MAX_FNAME]; // savegame folder - char m_publicDir[_MAX_FNAME]; // program folder - char m_userDir[_MAX_FNAME]; // user folder - char m_filesDir[_MAX_FNAME]; // case files + char m_sceneDir[MAX_FNAME]; // scene folder + char m_savegameDir[MAX_FNAME]; // savegame folder + char m_publicDir[MAX_FNAME]; // program folder + char m_userDir[MAX_FNAME]; // user folder + char m_filesDir[MAX_FNAME]; // case files int m_index; // 0..4 int m_chap[10]; // selected chapter (0..8) @@ -239,7 +250,7 @@ protected: float m_dialogParti; float m_dialogTime; bool m_bInitPause; - CameraType m_initCamera; + Gfx::CameraType m_initCamera; int m_partiPhase[10]; float m_partiTime[10]; @@ -248,4 +259,4 @@ protected: SceneInfo m_sceneInfo[MAXSCENE]; }; - +} // namespace Ui -- cgit v1.2.3-1-g7c22 From a397922e8d53c6f7ff469d38e5139fd003c705b5 Mon Sep 17 00:00:00 2001 From: Zaba999 Date: Tue, 18 Sep 2012 00:01:00 +0200 Subject: warnings fight in progress. --- src/ui/maindialog.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ui/maindialog.h') diff --git a/src/ui/maindialog.h b/src/ui/maindialog.h index df36a4d..8b0ef81 100644 --- a/src/ui/maindialog.h +++ b/src/ui/maindialog.h @@ -71,9 +71,9 @@ public: bool EventProcess(const Event &event); void ChangePhase(Phase phase); - void SetSceneRead(char* name); - void SetStackRead(char* name); - void SetSceneName(char* name); + void SetSceneRead(const char* name); + void SetStackRead(const char* name); + void SetSceneName(const char* name); void SetSceneRank(int rank); char* GetSceneRead(); char* GetStackRead(); -- cgit v1.2.3-1-g7c22