From 69209c38968c6f4066a772e0a51a2928749217de Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Fri, 9 Dec 2011 19:00:23 +0000 Subject: Re-indenting the code to use standard tabs. Yes, I know this is pretty pointless, but who cares? --- Stars45/MapView.h | 350 +++++++++++++++++++++++++++--------------------------- 1 file changed, 175 insertions(+), 175 deletions(-) (limited to 'Stars45/MapView.h') diff --git a/Stars45/MapView.h b/Stars45/MapView.h index d48fd89..f2afdd0 100644 --- a/Stars45/MapView.h +++ b/Stars45/MapView.h @@ -1,15 +1,15 @@ /* Project Starshatter 4.5 - Destroyer Studios LLC - Copyright © 1997-2004. All Rights Reserved. + Destroyer Studios LLC + Copyright © 1997-2004. All Rights Reserved. - SUBSYSTEM: Stars.exe - FILE: MapView.h - AUTHOR: John DiCamillo + SUBSYSTEM: Stars.exe + FILE: MapView.h + AUTHOR: John DiCamillo - OVERVIEW - ======== - Star Map class + OVERVIEW + ======== + Star Map class */ #ifndef MapView_h @@ -46,177 +46,177 @@ const int EID_MAP_CLICK = 1000; // +--------------------------------------------------------------------+ class MapView : public View, - public EventTarget, - public SimObserver +public EventTarget, +public SimObserver { public: - MapView(Window* win); - virtual ~MapView(); - - // Operations: - virtual void Refresh(); - virtual void OnWindowMove(); - virtual void OnShow(); - virtual void OnHide(); - - virtual void DrawTitle(); - virtual void DrawGalaxy(); - virtual void DrawSystem(); - virtual void DrawRegion(); - - virtual void DrawGrid(); - virtual void DrawOrbital(Orbital& orbital, int index); - virtual void DrawShip(Ship& ship, bool current=false, int rep=3); - virtual void DrawElem(MissionElement& elem, bool current=false, int rep=3); - virtual void DrawNavRoute(OrbitalRegion* rgn, - List& route, - Color smarker, - Ship* ship=0, - MissionElement* elem=0); - - virtual void DrawCombatantSystem(Combatant* c, Orbital* rgn, int x, int y, int r); - virtual void DrawCombatGroupSystem(CombatGroup* g, Orbital* rgn, int x1, int x2, int& y, int a); - virtual void DrawCombatGroup(CombatGroup* g, int rep=3); - - virtual int GetViewMode() const { return view_mode; } - virtual void SetViewMode(int mode); - virtual void SetSelectionMode(int mode); - virtual int GetSelectionMode() const { return seln_mode; } - virtual void SetSelection(int index); - virtual void SetSelectedShip(Ship* ship); - virtual void SetSelectedElem(MissionElement* elem); - virtual void SetRegion(OrbitalRegion* rgn); - virtual void SetRegionByName(const char* rgn_name); - virtual void SelectAt(int x, int y); - virtual Orbital* GetSelection(); - virtual Ship* GetSelectedShip(); - virtual MissionElement* GetSelectedElem(); - virtual int GetSelectionIndex(); - virtual void SetShipFilter(DWORD f) { ship_filter = f; } - - // Event Target Interface: - virtual int OnMouseMove(int x, int y); - virtual int OnLButtonDown(int x, int y); - virtual int OnLButtonUp(int x, int y); - virtual int OnClick(); - virtual int OnRButtonDown(int x, int y); - virtual int OnRButtonUp(int x, int y); - - virtual bool IsEnabled() const; - virtual bool IsVisible() const; - virtual bool IsFormActive() const; - virtual Rect TargetRect() const; - - void ZoomIn(); - void ZoomOut(); - - void SetGalaxy(List& systems); - void SetSystem(StarSystem* s); - void SetMission(Mission* m); - void SetShip(Ship* s); - void SetCampaign(Campaign* c); - - bool IsVisible(const Point& loc); - - // accessors: - virtual void GetClickLoc(double& x, double& y) { x = click_x; y = click_y; } - List& GetGalaxy() { return system_list; } - StarSystem* GetSystem() const { return system; } - OrbitalRegion* GetRegion() const; - - virtual bool Update(SimObject* obj); - virtual const char* GetObserverName() const { return "MapWin"; } - - bool GetEditorMode() const { return editor; } - void SetEditorMode(bool b) { editor = b; } + MapView(Window* win); + virtual ~MapView(); + + // Operations: + virtual void Refresh(); + virtual void OnWindowMove(); + virtual void OnShow(); + virtual void OnHide(); + + virtual void DrawTitle(); + virtual void DrawGalaxy(); + virtual void DrawSystem(); + virtual void DrawRegion(); + + virtual void DrawGrid(); + virtual void DrawOrbital(Orbital& orbital, int index); + virtual void DrawShip(Ship& ship, bool current=false, int rep=3); + virtual void DrawElem(MissionElement& elem, bool current=false, int rep=3); + virtual void DrawNavRoute(OrbitalRegion* rgn, + List& route, + Color smarker, + Ship* ship=0, + MissionElement* elem=0); + + virtual void DrawCombatantSystem(Combatant* c, Orbital* rgn, int x, int y, int r); + virtual void DrawCombatGroupSystem(CombatGroup* g, Orbital* rgn, int x1, int x2, int& y, int a); + virtual void DrawCombatGroup(CombatGroup* g, int rep=3); + + virtual int GetViewMode() const { return view_mode; } + virtual void SetViewMode(int mode); + virtual void SetSelectionMode(int mode); + virtual int GetSelectionMode() const { return seln_mode; } + virtual void SetSelection(int index); + virtual void SetSelectedShip(Ship* ship); + virtual void SetSelectedElem(MissionElement* elem); + virtual void SetRegion(OrbitalRegion* rgn); + virtual void SetRegionByName(const char* rgn_name); + virtual void SelectAt(int x, int y); + virtual Orbital* GetSelection(); + virtual Ship* GetSelectedShip(); + virtual MissionElement* GetSelectedElem(); + virtual int GetSelectionIndex(); + virtual void SetShipFilter(DWORD f) { ship_filter = f; } + + // Event Target Interface: + virtual int OnMouseMove(int x, int y); + virtual int OnLButtonDown(int x, int y); + virtual int OnLButtonUp(int x, int y); + virtual int OnClick(); + virtual int OnRButtonDown(int x, int y); + virtual int OnRButtonUp(int x, int y); + + virtual bool IsEnabled() const; + virtual bool IsVisible() const; + virtual bool IsFormActive() const; + virtual Rect TargetRect() const; + + void ZoomIn(); + void ZoomOut(); + + void SetGalaxy(List& systems); + void SetSystem(StarSystem* s); + void SetMission(Mission* m); + void SetShip(Ship* s); + void SetCampaign(Campaign* c); + + bool IsVisible(const Point& loc); + + // accessors: + virtual void GetClickLoc(double& x, double& y) { x = click_x; y = click_y; } + List& GetGalaxy() { return system_list; } + StarSystem* GetSystem() const { return system; } + OrbitalRegion* GetRegion() const; + + virtual bool Update(SimObject* obj); + virtual const char* GetObserverName() const { return "MapWin"; } + + bool GetEditorMode() const { return editor; } + void SetEditorMode(bool b) { editor = b; } protected: - virtual void BuildMenu(); - virtual void ClearMenu(); - virtual void ProcessMenuItem(int action); - virtual bool SetCapture(); - virtual bool ReleaseCapture(); - - virtual void DrawTabbedText(Font* font, const char* text); - - bool IsClutter(Ship& s); - bool IsCrowded(Ship& s); - bool IsCrowded(MissionElement& elem); - void GetShipLoc(Ship& s, POINT& loc); - void GetElemLoc(MissionElement& s, POINT& loc); - void SelectShip(Ship* selship); - void SelectElem(MissionElement* selelem); - void SelectNavpt(Instruction* navpt); - void FindShips(bool friendly, bool station, bool starship, bool dropship, - List& result); - void SetupScroll(Orbital* s); - - double GetMinRadius(int type); - - Text title; - Rect rect; - Campaign* campaign; - Mission* mission; - List system_list; - StarSystem* system; - List stars; - List planets; - List regions; - Ship* ship; - Bitmap galaxy_image; - bool editor; - - int current_star; - int current_planet; - int current_region; - Ship* current_ship; - MissionElement* current_elem; - Instruction* current_navpt; - int current_status; - - int view_mode; - int seln_mode; - bool captured; - bool dragging; - bool adding_navpt; - bool moving_navpt; - bool moving_elem; - int scrolling; - int mouse_x; - int mouse_y; - DWORD ship_filter; - - double zoom; - double view_zoom[3]; - double offset_x; - double offset_y; - double view_offset_x[3]; - double view_offset_y[3]; - double c, r; - double scroll_x; - double scroll_y; - double click_x; - double click_y; - - Font* font; - Font* title_font; - - ActiveWindow* active_window; - Menu* active_menu; - - Menu* map_menu; - Menu* map_system_menu; - Menu* map_sector_menu; - Menu* ship_menu; - Menu* nav_menu; - Menu* action_menu; - Menu* objective_menu; - Menu* formation_menu; - Menu* speed_menu; - Menu* hold_menu; - Menu* farcast_menu; - - MenuView* menu_view; + virtual void BuildMenu(); + virtual void ClearMenu(); + virtual void ProcessMenuItem(int action); + virtual bool SetCapture(); + virtual bool ReleaseCapture(); + + virtual void DrawTabbedText(Font* font, const char* text); + + bool IsClutter(Ship& s); + bool IsCrowded(Ship& s); + bool IsCrowded(MissionElement& elem); + void GetShipLoc(Ship& s, POINT& loc); + void GetElemLoc(MissionElement& s, POINT& loc); + void SelectShip(Ship* selship); + void SelectElem(MissionElement* selelem); + void SelectNavpt(Instruction* navpt); + void FindShips(bool friendly, bool station, bool starship, bool dropship, + List& result); + void SetupScroll(Orbital* s); + + double GetMinRadius(int type); + + Text title; + Rect rect; + Campaign* campaign; + Mission* mission; + List system_list; + StarSystem* system; + List stars; + List planets; + List regions; + Ship* ship; + Bitmap galaxy_image; + bool editor; + + int current_star; + int current_planet; + int current_region; + Ship* current_ship; + MissionElement* current_elem; + Instruction* current_navpt; + int current_status; + + int view_mode; + int seln_mode; + bool captured; + bool dragging; + bool adding_navpt; + bool moving_navpt; + bool moving_elem; + int scrolling; + int mouse_x; + int mouse_y; + DWORD ship_filter; + + double zoom; + double view_zoom[3]; + double offset_x; + double offset_y; + double view_offset_x[3]; + double view_offset_y[3]; + double c, r; + double scroll_x; + double scroll_y; + double click_x; + double click_y; + + Font* font; + Font* title_font; + + ActiveWindow* active_window; + Menu* active_menu; + + Menu* map_menu; + Menu* map_system_menu; + Menu* map_sector_menu; + Menu* ship_menu; + Menu* nav_menu; + Menu* action_menu; + Menu* objective_menu; + Menu* formation_menu; + Menu* speed_menu; + Menu* hold_menu; + Menu* farcast_menu; + + MenuView* menu_view; }; #endif MapView_h -- cgit v1.1