MCPcopy Create free account
hub / github.com/OpenDUNE/OpenDUNE / Map_SetSelectionSize

Function Map_SetSelectionSize

src/map.c:160–179  ·  view source on GitHub ↗

* Sets the selection size for the given layout. * * @param layout The layout to determine selection size from. * @return The previous layout. * @see StructureLayout */

Source from the content-addressed store, hash-verified

158 * @see StructureLayout
159 */
160uint16 Map_SetSelectionSize(uint16 layout)
161{
162 static uint16 selectionLayout = 0;
163
164 uint16 oldLayout;
165 uint16 oldPosition;
166
167 oldLayout = selectionLayout;
168 if (layout & 0x80) return oldLayout;
169
170 oldPosition = Map_SetSelectionObjectPosition(0xFFFF);
171
172 selectionLayout = layout;
173 g_selectionWidth = g_table_structure_layoutSize[layout].width;
174 g_selectionHeight = g_table_structure_layoutSize[layout].height;
175
176 Map_SetSelectionObjectPosition(oldPosition);
177
178 return oldLayout;
179}
180
181static void Map_InvalidateSelection(uint16 packed, bool enable)
182{

Callers 3

Map_SetSelectionFunction · 0.85
Game_PrepareFunction · 0.85
GUI_ChangeSelectionTypeFunction · 0.85

Calls 1

Tested by

no test coverage detected