* Sets the selection object to the given position. * * @param packed The position to set. * @return The previous position. */
| 208 | * @return The previous position. |
| 209 | */ |
| 210 | uint16 Map_SetSelectionObjectPosition(uint16 packed) |
| 211 | { |
| 212 | static uint16 selectionPosition = 0xFFFF; |
| 213 | |
| 214 | uint16 oldPacked; |
| 215 | |
| 216 | oldPacked = selectionPosition; |
| 217 | |
| 218 | if (packed == oldPacked) return oldPacked; |
| 219 | |
| 220 | Map_InvalidateSelection(oldPacked, false); |
| 221 | |
| 222 | if (packed != 0xFFFF) Map_InvalidateSelection(packed, true); |
| 223 | |
| 224 | selectionPosition = packed; |
| 225 | |
| 226 | return oldPacked; |
| 227 | } |
| 228 | |
| 229 | /** |
| 230 | * Update the minimap position. |
no test coverage detected