MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / Camera_Update_Mouse_Position_For_Pan

Method Camera_Update_Mouse_Position_For_Pan

Source/Fodder.cpp:2315–2329  ·  view source on GitHub ↗

* Move the mouse position to follow the terrain as the camera pans */

Source from the content-addressed store, hash-verified

2313 * Move the mouse position to follow the terrain as the camera pans
2314 */
2315void cFodder::Camera_Update_Mouse_Position_For_Pan() {
2316
2317 if (!mMouse_Locked) {
2318
2319 // Mouse in playfield?
2320 if (mMouseX > 0x0F) {
2321 mMouseX -= (mCameraX >> 16) - mCamera_TileX;
2322 mMouseY -= (mCameraY >> 16) - mCamera_TileY;
2323 }
2324 }
2325
2326 //loc_12007
2327 mCamera_TileX = (mCameraX >> 16);
2328 mCamera_TileY = (mCameraY >> 16);
2329}
2330
2331void cFodder::MapTile_UpdateFromCamera() {
2332 mMapTile_SpeedX = mCamera_TileSpeedX;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected