[Gcblue-commits] gcb_wx/include/sim Game.h,1.58,1.59 tcFlightPort.h,1.12,1.13 tcLauncher.h,1.16,1.17
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2005-06-11 21:02:08
|
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5785/include/sim Modified Files: Game.h tcFlightPort.h tcLauncher.h tcStores.h Log Message: Initial commit for drag and drop icon gui Index: tcFlightPort.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcFlightPort.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** tcFlightPort.h 1 Jun 2005 00:13:28 -0000 1.12 --- tcFlightPort.h 11 Jun 2005 21:01:43 -0000 1.13 *************** *** 110,114 **** int CheckLanding(tcGameObject *obj); void Clear(); ! int FindAirState(tcAirState *airstate); int FindEmptySpot(std::vector<tsSpotInfo> *loc_vector); int FindEmptySpot(teLocation loc, std::vector<tsSpotInfo>*& loc_vector); --- 110,115 ---- int CheckLanding(tcGameObject *obj); void Clear(); ! int FindAirState(tcAirState* airstate); ! int FindAirState(tcGameObject* obj); int FindEmptySpot(std::vector<tsSpotInfo> *loc_vector); int FindEmptySpot(teLocation loc, std::vector<tsSpotInfo>*& loc_vector); *************** *** 117,120 **** --- 118,122 ---- size_t GetCount() {return units.size();} tsSpotInfo* GetCurrentSpotInfo(tcAirState *airstate); + tcFlightportDBObject* GetDatabaseObject() const; unsigned GetHangarCapacity() const {return hangarCapacity;} tcTrack GetLandingData(const tcGameObject* obj); *************** *** 129,133 **** void MoveObjectToGoal(tcAirState *airstate); bool MoveToLaunchQueue(tcAirState *airstate); ! void SetObjectDestination(unsigned n, teLocation loc); void SetParent(tcGameObject *newparent) {parent=newparent;} void SetHangarCapacity(unsigned cap) {hangarCapacity = cap;} --- 131,135 ---- void MoveObjectToGoal(tcAirState *airstate); bool MoveToLaunchQueue(tcAirState *airstate); ! void SetObjectDestination(unsigned n, teLocation loc, unsigned int position = 0); void SetParent(tcGameObject *newparent) {parent=newparent;} void SetHangarCapacity(unsigned cap) {hangarCapacity = cap;} *************** *** 166,172 **** --- 168,176 ---- short int id; ///< id of unit that command applies to unsigned char op; ///< 0, launch unit, 1-3 move unit + unsigned char pos; ///< position parameter to specify which launch or ready spot to move to }; std::vector<CommandInfo> commandList; + bool IsSpotEmpty(teLocation loc, unsigned int spot); void ResyncSpots(); }; Index: tcStores.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcStores.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcStores.h 1 Jun 2005 00:13:28 -0000 1.3 --- tcStores.h 11 Jun 2005 21:01:43 -0000 1.4 *************** *** 32,35 **** --- 32,36 ---- namespace database { + class tcDatabaseObject; class tcStoresDBObject; } *************** *** 58,66 **** std::string className; unsigned int quantity; ! StoreItem(); StoreItem(const StoreItem& src); StoreItem(const std::string& name, unsigned int qty); }; struct StoreOperation { --- 59,74 ---- std::string className; unsigned int quantity; ! ! tcDatabaseObject* GetDatabaseObject() const; ! StoreItem(); StoreItem(const StoreItem& src); StoreItem(const std::string& name, unsigned int qty); + private: + tcDatabaseObject* databaseObj; + + void LoadDatabaseObject(); }; + struct StoreOperation { *************** *** 77,80 **** --- 85,99 ---- unsigned int CurrentItemQuantity(const std::string& item) const; unsigned int CurrentQuantity() const; + unsigned int IncomingQuantity() const; + tcStoresDBObject* GetDatabaseObject() const; + tcDatabaseObject* GetDatabaseObjectForItem(const std::string& item) const; + + /// name of <idx> type + const std::string& GetItemName(unsigned int idx) const; + + /// number of different item types in storage + unsigned int GetNumberItemTypes() const; + + tcGameObject* GetParent() const; bool IsCompatible(const std::string& item) const; bool IsFull() const; Index: Game.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/Game.h,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** Game.h 1 Jun 2005 00:13:28 -0000 1.58 --- Game.h 11 Jun 2005 21:01:43 -0000 1.59 *************** *** 71,74 **** --- 71,75 ---- class tcChatBox; class tc3DWindow; + class tcDraggedIconDisplay; using namespace scriptinterface; *************** *** 175,179 **** tcDisplaySettingsView* displaySettingsView; tcChatBox* chatBox; ///< popup for multiplayer chat ! // interfaces for START game mode (unloaded when game is started) tcStartView* startView; --- 176,181 ---- tcDisplaySettingsView* displaySettingsView; tcChatBox* chatBox; ///< popup for multiplayer chat ! tcDraggedIconDisplay* draggedIconDisplay; ///< display of drag-drop icons ! // interfaces for START game mode (unloaded when game is started) tcStartView* startView; Index: tcLauncher.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcLauncher.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** tcLauncher.h 1 Jun 2005 00:13:28 -0000 1.16 --- tcLauncher.h 11 Jun 2005 21:01:43 -0000 1.17 *************** *** 117,129 **** bool CommandInfoMatches(const tcLauncher& launcher); void CopyCommandInfoFrom(const tcLauncher& launcher); ! std::string GetChildClassName() const; const std::string& GetLauncherName() const; float GetCycleTime() const; short int GetErrorCode() const {return errorCode;} int GetLauncherStatus(); float GetSectorCenter() const; ///< returns center of engagement sector in radians float GetSectorWidth() const; ///< returns width of engagement sector in radians bool IsAutoPoint() const; bool IsDamaged() const; void SetErrorCode(int code) {errorCode = code;} --- 117,132 ---- bool CommandInfoMatches(const tcLauncher& launcher); void CopyCommandInfoFrom(const tcLauncher& launcher); ! const std::string& GetChildClassName() const; ! tcDatabaseObject* GetChildDatabaseObject() const; const std::string& GetLauncherName() const; float GetCycleTime() const; short int GetErrorCode() const {return errorCode;} int GetLauncherStatus(); + tcGameObject* GetParent() const; float GetSectorCenter() const; ///< returns center of engagement sector in radians float GetSectorWidth() const; ///< returns width of engagement sector in radians bool IsAutoPoint() const; bool IsDamaged() const; + bool IsLoading() const; void SetErrorCode(int code) {errorCode = code;} |