1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221
|
% Begin of input file ../../Scripts/RPGEdMap.tcl
\chapter{RPGEdMap.tcl -- Maps of the adventure}
\label{RPGEdMap.tcl}
\typeout{Generated from $Id: RPGEdMap.tcl,v 1.6 1999/07/13 01:29:16 heller Rel1 $}
This file implements the GUIs that create and edit maps.
\noindent\rule{\textwidth}{0.4pt}
\section[proc RPGEdMap]{proc RPGEdMap \emph{\{filename \{\}\}}}
This procedure edits a map file. A map contains a series of levels, each of
which contain one or more spaces.
\begin{description}
\item [in] filename -- the name of the map file to edit.
\index{RPGEdMap!procedure}
\end{description}
\noindent\rule{\textwidth}{0.4pt}
\section[proc SelectLevel]{proc SelectLevel \emph{tl level}}
This procedure selects the level to display. It is bound to the level
scale widget.
\begin{description}
\item [in] tl -- the toplevel.
\item [in] level -- the new level.
\index{SelectLevel!procedure}
\end{description}
\noindent\rule{\textwidth}{0.4pt}
\section[proc ReadCompleteList]{proc ReadCompleteList \emph{fp bufferVar}}
Helper function to read in a complete in the Tcl sense -- balanced parens,
braces, brackets, and quote marks.
\begin{description}
\item [in] fp -- file pointer object.
\item [name] bufferVar -- the name of the buffer variable to collect the input in.
\index{ReadCompleteList!procedure}
\end{description}
\noindent\rule{\textwidth}{0.4pt}
\section[proc ReadMap]{proc ReadMap \emph{tl filename}}
Procedure to read a map into a GUI toplevel. A map file contains a set of
name value items that map to the data array used to represent the map while
in memory. The saved fields include: shape, name, description, deepestLevel,
highestLevel, maxX, maxY, minX, minY, and all of the space file names
(Spaces,l,x,y).
\begin{description}
\item [in] tl -- the name of the toplevel.
\item [in] filename -- the name of the file to read.
\index{ReadMap!procedure}
\end{description}
\noindent\rule{\textwidth}{0.4pt}
\section[proc CreateNewMap]{proc CreateNewMap \emph{tl}}
This procedure creates a new map.
\begin{description}
\item [in] tl -- the toplevel.
\index{CreateNewMap!procedure}
\end{description}
\noindent\rule{\textwidth}{0.4pt}
\section[proc CheckWriteDirtyRecordMap]{proc CheckWriteDirtyRecordMap \emph{tl}}
This procedure is called when the toplevel window is being closed and the
data is ``dirty'' (modified). It takes care of saving the data if the user
chooses to save it.
\begin{description}
\item [in] tl -- the toplevel.
\index{CheckWriteDirtyRecordMap!procedure}
\end{description}
\noindent\rule{\textwidth}{0.4pt}
\section[proc SaveMap]{proc SaveMap \emph{tl}}
Procedure to save a map object. Bound to the ``Save'' menu item on the
``File'' menu.
\begin{description}
\item [in] tl -- the toplevel.
\index{SaveMap!procedure}
\end{description}
\noindent\rule{\textwidth}{0.4pt}
\section[proc SaveAsMap]{proc SaveAsMap \emph{tl}}
This procedure saves a map in an alternative file. Bound to the ``SaveAs...''
menu item of the ``File'' menu.
\begin{description}
\item [in] tl -- the toplevel to save.
\index{SaveAsMap!procedure}
\end{description}
\noindent\rule{\textwidth}{0.4pt}
\section[proc WriteMap]{proc WriteMap \emph{tl filename \{IfDirty 0\} \{forceName 0\}}}
Procedure to write out a map object to a file. The data is written out as
a series of Tcl 2 element lists: slot name slot value. The slots saved are:
shape, name, description, deepestLevel, highestLevel, maxX, maxY, minX,
minY, and all of the space files. Each (dirty) space is also written out.
The space file names are formed from the base map file name with the spaces
l, x, and y coordinates encoded into the filenames
\begin{description}
\item [in] tl -- the toplevel to write.
\item [in] filename -- the filename to write to.
\item [in] IfDirty -- write out only dirty spaces.
\item [in] forceName -- compute new filenames for all spaces.
\index{WriteMap!procedure}
\end{description}
\noindent\rule{\textwidth}{0.4pt}
\section[proc CleanUpMap]{proc CleanUpMap \emph{tl}}
Clean up procedure. Free up all of the space objects and then free up the
map array itself.
\begin{description}
\item [in] tl -- the toplevel to clean up.
\index{CleanUpMap!procedure}
\end{description}
\noindent\rule{\textwidth}{0.4pt}
\section[proc CreateNewMapCreateButton]{proc CreateNewMapCreateButton \emph{tl dialog}}
Procedure to handle the Create button on the create new map dialog.
\begin{description}
\item [in] tl -- the toplevel to attach the new map to.
\item [in] dialog -- the dialog used to set up the creation parameters.
\index{CreateNewMapCreateButton!procedure}
\end{description}
\noindent\rule{\textwidth}{0.4pt}
\section[proc CreateNewMapDismisButton]{proc CreateNewMapDismisButton \emph{tl dialog}}
Procedure to handle the Dismiss button on the create new map dialog.
\begin{description}
\item [in] tl -- the toplevel to attach the new map to.
\item [in] dialog -- the dialog used to set up the creation parameters.
\index{CreateNewMapDismisButton!procedure}
\end{description}
\noindent\rule{\textwidth}{0.4pt}
\section[proc AddNewSpace]{proc AddNewSpace \emph{tl}}
Procedure to add a new space to the current level.
\begin{description}
\item [in] tl -- the toplevel.
\index{AddNewSpace!procedure}
\end{description}
\noindent\rule{\textwidth}{0.4pt}
\section[proc ReDrawSpaces]{proc ReDrawSpaces \emph{tl}}
Procedure to re-draw the spaces in the current level.
\begin{description}
\item [in] tl -- the toplevel.
\index{ReDrawSpaces!procedure}
\end{description}
\noindent\rule{\textwidth}{0.4pt}
\section[proc SelectLoadedSpace]{proc SelectLoadedSpace \emph{tl space id indexString}}
Procedure bound to button 1 -- Select. This procedure marks the space as
selected. The space's border is changed from black to read (highlighted)
and the space's access info is saved in the data array for use elsewhere.
\begin{description}
\item [in] tl -- the toplevel.
\item [in] space -- the Space object.
\item [in] id -- the space's canvas id.
\item [in] indexString -- the space's index string.
\index{SelectLoadedSpace!procedure}
\end{description}
\noindent\rule{\textwidth}{0.4pt}
\section[proc UnselectLoadedSpace]{proc UnselectLoadedSpace \emph{tl Mx My}}
Procedure bound to the base canvas's button 1 event. This procedure is used
to deselect the currently selected space when the user clicks on the canvas
background.
\begin{description}
\item [in] tl -- the toplevel.
\item [in] Mx -- mouse X coordinate.
\item [in] My -- mouse Y coordinate.
\index{UnselectLoadedSpace!procedure}
\end{description}
\noindent\rule{\textwidth}{0.4pt}
\section[proc DeleteSpace]{proc DeleteSpace \emph{tl}}
Procedure to delete the selected space.
\begin{description}
\item [in] tl -- the toplevel.
\index{DeleteSpace!procedure}
\end{description}
\noindent\rule{\textwidth}{0.4pt}
\section[proc OpenMap]{proc OpenMap \emph{tl}}
Procedure to open a new Map GUI toplevel and load a map file into it.
\begin{description}
\item [in] tl -- the current toplevel.
\index{OpenMap!procedure}
\end{description}
% End of input file ../../Scripts/RPGEdMap.tcl
|