Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/graphics/GameView.cpp
/* Copyright (C) 2015 Wildfire Games. | /* Copyright (C) 2017 Wildfire Games. | ||||
* This file is part of 0 A.D. | * This file is part of 0 A.D. | ||||
* | * | ||||
* 0 A.D. is free software: you can redistribute it and/or modify | * 0 A.D. is free software: you can redistribute it and/or modify | ||||
* it under the terms of the GNU General Public License as published by | * it under the terms of the GNU General Public License as published by | ||||
* the Free Software Foundation, either version 2 of the License, or | * the Free Software Foundation, either version 2 of the License, or | ||||
* (at your option) any later version. | * (at your option) any later version. | ||||
* | * | ||||
* 0 A.D. is distributed in the hope that it will be useful, | * 0 A.D. is distributed in the hope that it will be useful, | ||||
▲ Show 20 Lines • Show All 611 Lines • ▼ Show 20 Lines | void CGameView::Update(const float deltaRealTime) | ||||
// If camera movement is being handled by the touch-input system, | // If camera movement is being handled by the touch-input system, | ||||
// then we should stop to avoid conflicting with it | // then we should stop to avoid conflicting with it | ||||
if (g_TouchInput.IsEnabled()) | if (g_TouchInput.IsEnabled()) | ||||
return; | return; | ||||
if (!g_app_has_focus) | if (!g_app_has_focus) | ||||
return; | return; | ||||
if (m->CinemaManager.GetEnabled()) | |||||
{ | |||||
m->CinemaManager.Update(deltaRealTime); | m->CinemaManager.Update(deltaRealTime); | ||||
if (m->CinemaManager.IsEnabled()) | |||||
return; | return; | ||||
} | |||||
// Calculate mouse movement | // Calculate mouse movement | ||||
static int mouse_last_x = 0; | static int mouse_last_x = 0; | ||||
static int mouse_last_y = 0; | static int mouse_last_y = 0; | ||||
int mouse_dx = g_mouse_x - mouse_last_x; | int mouse_dx = g_mouse_x - mouse_last_x; | ||||
int mouse_dy = g_mouse_y - mouse_last_y; | int mouse_dy = g_mouse_y - mouse_last_y; | ||||
mouse_last_x = g_mouse_x; | mouse_last_x = g_mouse_x; | ||||
mouse_last_y = g_mouse_y; | mouse_last_y = g_mouse_y; | ||||
▲ Show 20 Lines • Show All 515 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator