* Sets the selection size for the given layout. * * @param layout The layout to determine selection size from. * @return The previous layout. * @see StructureLayout */
| 158 | * @see StructureLayout |
| 159 | */ |
| 160 | uint16 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 | |
| 181 | static void Map_InvalidateSelection(uint16 packed, bool enable) |
| 182 | { |
no test coverage detected