#include <WorldBuilderDoc.h>
Inherits CDocument.
Public Member Functions | |
| void | addWaypointLink (Int waypointID1, Int waypointID2) |
| void | removeWaypointLink (Int waypointID1, Int waypointID2) |
| MapObject * | getWaypointByID (Int waypointID) |
| Int | getNumWaypointLinks (void) |
| void | getWaypointLink (Int ndx, Int *waypoint1, Int *waypointID2) |
| Bool | waypointLinkExists (Int waypointID1, Int waypointID2) |
| Bool | isWaypointLinked (MapObject *pWay) |
| void | updateLinkedWaypointLabels (MapObject *pWay) |
| Int | getNumBoundaries (void) const |
| void | getBoundary (Int ndx, ICoord2D *border) const |
| void | addBoundary (ICoord2D *boundaryToAdd) |
| void | changeBoundary (Int ndx, ICoord2D *border) |
| void | removeLastBoundary (void) |
| void | findBoundaryNear (Coord3D *pt, float okDistance, Int *outNdx, Int *outHandle) |
| Bool | ParseWaypointData (DataChunkInput &file, DataChunkInfo *info, void *userData) |
| virtual BOOL | DoSave (LPCTSTR lpszPathName, BOOL bReplace=TRUE) |
| virtual BOOL | DoFileSave () |
| WorldHeightMapEdit * | GetHeightMap () |
| void | SetHeightMap (WorldHeightMapEdit *pMap, Bool doUpdate) |
| void | Create2DView () |
| void | Create3DView () |
| CWorldBuilderView * | Get2DView () |
| WbView3d * | Get3DView () |
| void | invalObject (MapObject *pMapObj) |
| void | invalCell (int xIndex, int yIndex) |
| void | updateAllViews () |
| void | updateHeightMap (WorldHeightMap *htMap, Bool partial, const IRegion2D &partialRange) |
| Bool | getCellIndexFromCoord (Coord3D pt, CPoint *ndxP) |
| Gets an xy index into the height map from a pixel location. | |
| void | getCoordFromCellIndex (CPoint ndx, Coord3D *pt) |
| Bool | getCellPositionFromCoord (Coord3D pt, Coord3D *locP) |
| Gets a real xy location from a pixel point. | |
| Bool | getAllIndexesInRect (const Coord3D *bl, const Coord3D *br, const Coord3D *tl, const Coord3D *tr, Int widthOutside, VecHeightMapIndexes *allIndices) |
| void | getObjArrowPoint (MapObject *pObj, Coord3D *location) |
| Gets the arrow point location. | |
| void | syncViewCenters (Real x, Real y) |
| Bool | needAutoSave (void) |
| Int | getNextWaypointID (void) |
| void | setNextWaypointID (Int newMax) |
| void | autoSave (void) |
| void | validate (void) |
| virtual BOOL | OnNewDocument () |
| virtual void | Serialize (CArchive &ar) |
| virtual BOOL | OnOpenDocument (LPCTSTR lpszPathName) |
| virtual BOOL | CanCloseFrame (CFrameWnd *pFrame) |
| virtual | ~CWorldBuilderDoc () |
| void | AddAndDoUndoable (Undoable *pUndo) |
Static Public Member Functions | |
| static Bool | ParseWaypointDataChunk (DataChunkInput &file, DataChunkInfo *info, void *userData) |
| static CWorldBuilderDoc * | GetActiveDoc () |
| static CWorldBuilderView * | GetActive2DView () |
| static WbView3d * | GetActive3DView () |
Protected Member Functions | |
| CWorldBuilderDoc () | |
| void | updateWaypointTable (void) |
| void | compressWaypointIds (void) |
| void | updateLWL (MapObject *pWay, MapObject *pSrcWay) |
| afx_msg void | OnEditRedo () |
| afx_msg void | OnUpdateEditRedo (CCmdUI *pCmdUI) |
| afx_msg void | OnEditUndo () |
| afx_msg void | OnUpdateEditUndo (CCmdUI *pCmdUI) |
| afx_msg void | OnTsInfo () |
| afx_msg void | OnTsCanonical () |
| afx_msg void | OnUpdateTsCanonical (CCmdUI *pCmdUI) |
| afx_msg void | OnFileResize () |
| afx_msg void | OnJumpToGame () |
| afx_msg void | OnTsRemap () |
| afx_msg void | OnEditLinkCenters () |
| afx_msg void | OnUpdateEditLinkCenters (CCmdUI *pCmdUI) |
| afx_msg void | OnViewTimeOfDay () |
| afx_msg void | OnWindow2dwindow () |
| afx_msg void | OnUpdateWindow2dwindow (CCmdUI *pCmdUI) |
| afx_msg void | OnViewReloadtextures () |
| afx_msg void | OnEditScripts () |
| afx_msg void | OnViewHome () |
| afx_msg void | OnTexturesizingTile4x4 () |
| afx_msg void | OnUpdateTexturesizingTile4x4 (CCmdUI *pCmdUI) |
| afx_msg void | OnTexturesizingTile6x6 () |
| afx_msg void | OnUpdateTexturesizingTile6x6 (CCmdUI *pCmdUI) |
| afx_msg void | OnTexturesizingTile8x8 () |
| afx_msg void | OnUpdateTexturesizingTile8x8 (CCmdUI *pCmdUI) |
| afx_msg void | OnDumpDocToText () |
| afx_msg void | OnRemoveclifftexmapping () |
| afx_msg void | OnTogglePitchAndRotation () |
Protected Attributes | ||
| WorldHeightMapEdit * | m_heightMap | |
| Undoable * | m_undoList | |
| Head of undo/redo list. | ||
| int | m_maxUndos | |
| int | m_curRedo | |
| 0 means no redos available. | ||
| Bool | m_linkCenters | |
| Flag whether the centers of the 2d and 3d views track together. | ||
| Bool | m_needAutosave | |
| True if changes have been made since last autosave. | ||
| Int | m_curWaypointID | |
| std::vector< ICoord2D > | m_boundaries | |
| MapObject * | m_waypointTable [MAX_WAYPOINTS] | |
| Bool | m_waypointTableNeedsUpdate | |
| struct { | ||
| Int waypoint1 | ||
| Int waypoint2 | ||
| Bool processedFlag | ||
| } | m_waypointLinks [MAX_WAYPOINTS] | |
| Int | m_numWaypointLinks | |
Friends | |
| class | COptionsPanel |
Definition at line 46 of file WorldBuilderDoc.h.
|
protected |
Definition at line 134 of file WorldBuilderDoc.cpp.
|
virtual |
Definition at line 147 of file WorldBuilderDoc.cpp.
| void CWorldBuilderDoc::AddAndDoUndoable | ( | Undoable * | pUndo | ) |
Definition at line 945 of file WorldBuilderDoc.cpp.
| void CWorldBuilderDoc::addBoundary | ( | ICoord2D * | boundaryToAdd | ) |
Definition at line 2654 of file WorldBuilderDoc.cpp.
Adds a waypoint link between two waypoints, referenced by waypoint id.
Definition at line 1736 of file WorldBuilderDoc.cpp.
| void CWorldBuilderDoc::autoSave | ( | void | ) |
Definition at line 857 of file WorldBuilderDoc.cpp.
|
virtual |
Definition at line 1601 of file WorldBuilderDoc.cpp.
Definition at line 2659 of file WorldBuilderDoc.cpp.
|
protected |
Renumbers the waypoints and the links that reference them, removing any unused ids.
Definition at line 1649 of file WorldBuilderDoc.cpp.
| void CWorldBuilderDoc::Create2DView | ( | ) |
Definition at line 1205 of file WorldBuilderDoc.cpp.
| void CWorldBuilderDoc::Create3DView | ( | ) |
Definition at line 1209 of file WorldBuilderDoc.cpp.
|
virtual |
Definition at line 693 of file WorldBuilderDoc.cpp.
Definition at line 721 of file WorldBuilderDoc.cpp.
| void CWorldBuilderDoc::findBoundaryNear | ( | Coord3D * | pt, |
| float | okDistance, | ||
| Int * | outNdx, | ||
| Int * | outHandle ) |
Definition at line 2669 of file WorldBuilderDoc.cpp.
| CWorldBuilderView * CWorldBuilderDoc::Get2DView | ( | ) |
Definition at line 1179 of file WorldBuilderDoc.cpp.
| WbView3d * CWorldBuilderDoc::Get3DView | ( | ) |
Definition at line 1192 of file WorldBuilderDoc.cpp.
|
static |
Definition at line 1161 of file WorldBuilderDoc.cpp.
|
static |
Definition at line 1170 of file WorldBuilderDoc.cpp.
|
static |
Definition at line 1136 of file WorldBuilderDoc.cpp.
| Bool CWorldBuilderDoc::getAllIndexesInRect | ( | const Coord3D * | bl, |
| const Coord3D * | br, | ||
| const Coord3D * | tl, | ||
| const Coord3D * | tr, | ||
| Int | widthOutside, | ||
| VecHeightMapIndexes * | allIndices ) |
Gets all of the indices within widthOutside of the rectangle and places them into allIndices
Definition at line 1508 of file WorldBuilderDoc.cpp.
Definition at line 2649 of file WorldBuilderDoc.cpp.
Gets an xy index into the height map from a pixel location.
Given a cursor location, return the x and y index into the height map. If the location is outside the height map, returns false.
Definition at line 1443 of file WorldBuilderDoc.cpp.
Gets a real xy location from a pixel point.
Given a pixel position, returns the x/y location in the height map. This will return real values, so a position can be 1.7, 2.4 or such. If the position is not over the height map, return -1, -1.
Definition at line 1550 of file WorldBuilderDoc.cpp.
| void CWorldBuilderDoc::getCoordFromCellIndex | ( | CPoint | ndx, |
| Coord3D * | pt ) |
Definition at line 1490 of file WorldBuilderDoc.cpp.
|
inline |
Definition at line 111 of file WorldBuilderDoc.h.
|
inline |
Definition at line 151 of file WorldBuilderDoc.h.
| Int CWorldBuilderDoc::getNumBoundaries | ( | void | ) | const |
Definition at line 2644 of file WorldBuilderDoc.cpp.
|
inline |
Definition at line 84 of file WorldBuilderDoc.h.
Gets the arrow point location.
Gets the location in pixels of the arrowhead point for an object.
Definition at line 1573 of file WorldBuilderDoc.cpp.
Returns a pointer to the waypoint map object referenced by waypointID.
Definition at line 1778 of file WorldBuilderDoc.cpp.
Returns the two waypoint ID's that are linked. Note that due to edits, one or both waypoints may have been deleted.
Definition at line 1911 of file WorldBuilderDoc.cpp.
| void CWorldBuilderDoc::invalCell | ( | int | xIndex, |
| int | yIndex ) |
Definition at line 1341 of file WorldBuilderDoc.cpp.
| void CWorldBuilderDoc::invalObject | ( | MapObject * | pMapObj | ) |
Definition at line 1329 of file WorldBuilderDoc.cpp.
Returns true if a waypoint is part of a linked waypoint path.
Definition at line 1797 of file WorldBuilderDoc.cpp.
|
inline |
Definition at line 149 of file WorldBuilderDoc.h.
|
protected |
Definition at line 2154 of file WorldBuilderDoc.cpp.
|
protected |
Definition at line 1591 of file WorldBuilderDoc.cpp.
|
protected |
Definition at line 972 of file WorldBuilderDoc.cpp.
|
protected |
Definition at line 1949 of file WorldBuilderDoc.cpp.
|
protected |
Definition at line 997 of file WorldBuilderDoc.cpp.
|
protected |
Definition at line 1074 of file WorldBuilderDoc.cpp.
|
protected |
Definition at line 677 of file WorldBuilderDoc.cpp.
|
virtual |
Definition at line 1232 of file WorldBuilderDoc.cpp.
|
virtual |
Definition at line 1394 of file WorldBuilderDoc.cpp.
|
protected |
Definition at line 2625 of file WorldBuilderDoc.cpp.
|
protected |
Definition at line 1990 of file WorldBuilderDoc.cpp.
|
protected |
Definition at line 2010 of file WorldBuilderDoc.cpp.
|
protected |
Definition at line 2030 of file WorldBuilderDoc.cpp.
|
protected |
Definition at line 1014 of file WorldBuilderDoc.cpp.
|
protected |
Definition at line 1051 of file WorldBuilderDoc.cpp.
|
protected |
Definition at line 1043 of file WorldBuilderDoc.cpp.
|
protected |
Definition at line 1118 of file WorldBuilderDoc.cpp.
|
protected |
Definition at line 1596 of file WorldBuilderDoc.cpp.
|
protected |
Definition at line 992 of file WorldBuilderDoc.cpp.
|
protected |
Definition at line 1023 of file WorldBuilderDoc.cpp.
|
protected |
Definition at line 2002 of file WorldBuilderDoc.cpp.
|
protected |
Definition at line 2022 of file WorldBuilderDoc.cpp.
|
protected |
Definition at line 2042 of file WorldBuilderDoc.cpp.
|
protected |
Definition at line 1070 of file WorldBuilderDoc.cpp.
|
protected |
Definition at line 1635 of file WorldBuilderDoc.cpp.
|
protected |
Definition at line 1957 of file WorldBuilderDoc.cpp.
|
protected |
Definition at line 1940 of file WorldBuilderDoc.cpp.
|
protected |
Definition at line 1610 of file WorldBuilderDoc.cpp.
|
protected |
Definition at line 1618 of file WorldBuilderDoc.cpp.
| Bool CWorldBuilderDoc::ParseWaypointData | ( | DataChunkInput & | file, |
| DataChunkInfo * | info, | ||
| void * | userData ) |
CWorldBuilderDoc::ParseWaypointData - read waypoint data chunk. Format is the newer CHUNKY format. See WorldBuilderDoc.cpp for the writer. Input: DataChunkInput
Definition at line 844 of file WorldBuilderDoc.cpp.
|
static |
CWorldBuilderDoc::ParseWaypointDataChunk - read a waypoint chunk. Format is the newer CHUNKY format. See WHeightMapEdit.cpp for the writer. Input: DataChunkInput
Definition at line 831 of file WorldBuilderDoc.cpp.
| void CWorldBuilderDoc::removeLastBoundary | ( | void | ) |
Definition at line 2664 of file WorldBuilderDoc.cpp.
Removes a waypoint link between two waypoints, referenced by waypoint id.
Definition at line 1758 of file WorldBuilderDoc.cpp.
|
virtual |
Definition at line 285 of file WorldBuilderDoc.cpp.
| void CWorldBuilderDoc::SetHeightMap | ( | WorldHeightMapEdit * | pMap, |
| Bool | doUpdate ) |
Definition at line 928 of file WorldBuilderDoc.cpp.
|
inline |
Definition at line 153 of file WorldBuilderDoc.h.
Definition at line 1353 of file WorldBuilderDoc.cpp.
| void CWorldBuilderDoc::updateAllViews | ( | ) |
Definition at line 1369 of file WorldBuilderDoc.cpp.
| void CWorldBuilderDoc::updateHeightMap | ( | WorldHeightMap * | htMap, |
| Bool | partial, | ||
| const IRegion2D & | partialRange ) |
Definition at line 1381 of file WorldBuilderDoc.cpp.
| void CWorldBuilderDoc::updateLinkedWaypointLabels | ( | MapObject * | pWay | ) |
Updates the waypoint labels for a linked waypoint path.
Definition at line 1823 of file WorldBuilderDoc.cpp.
Updates the waypoint labels for a linked waypoint path.
Definition at line 1838 of file WorldBuilderDoc.cpp.
|
protected |
If any waypoints have changed (m_waypointTableNeedsUpdate) updates the waypoint table. The waypoint table is used to locate waypoints by id, without searching the objects list. (See getWaypointByID())
Definition at line 1703 of file WorldBuilderDoc.cpp.
| void CWorldBuilderDoc::validate | ( | void | ) |
Definition at line 491 of file WorldBuilderDoc.cpp.
Returns true if the two waypoint ID's are linked. Note that due to edits, one or both waypoints may have been deleted.
Definition at line 1927 of file WorldBuilderDoc.cpp.
|
friend |
Definition at line 48 of file WorldBuilderDoc.h.
|
protected |
Definition at line 65 of file WorldBuilderDoc.h.
|
protected |
0 means no redos available.
Definition at line 59 of file WorldBuilderDoc.h.
|
protected |
Definition at line 62 of file WorldBuilderDoc.h.
|
protected |
Definition at line 56 of file WorldBuilderDoc.h.
|
protected |
Flag whether the centers of the 2d and 3d views track together.
Definition at line 60 of file WorldBuilderDoc.h.
|
protected |
Definition at line 58 of file WorldBuilderDoc.h.
|
protected |
True if changes have been made since last autosave.
Definition at line 61 of file WorldBuilderDoc.h.
|
protected |
Definition at line 75 of file WorldBuilderDoc.h.
|
protected |
Head of undo/redo list.
Definition at line 57 of file WorldBuilderDoc.h.
| struct { ... } CWorldBuilderDoc::m_waypointLinks[MAX_WAYPOINTS] |
|
protected |
Definition at line 68 of file WorldBuilderDoc.h.
|
protected |
Definition at line 69 of file WorldBuilderDoc.h.
| Bool CWorldBuilderDoc::processedFlag |
Definition at line 73 of file WorldBuilderDoc.h.
| Int CWorldBuilderDoc::waypoint1 |
Definition at line 71 of file WorldBuilderDoc.h.
| Int CWorldBuilderDoc::waypoint2 |
Definition at line 72 of file WorldBuilderDoc.h.