diff options
author | Strangerke | 2016-09-29 07:50:02 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2017-01-25 22:41:56 +0100 |
commit | 0c7e5d920da932f5bedd4863a7e525ba387c0d39 (patch) | |
tree | 1be3e3891d6dc6b06d94f645def8ec8b28b6e5f6 /engines/cryo | |
parent | 2e8b3e9462a89ef81d4a3a7e19db4d5482ebe1d8 (diff) | |
download | scummvm-rg350-0c7e5d920da932f5bedd4863a7e525ba387c0d39.tar.gz scummvm-rg350-0c7e5d920da932f5bedd4863a7e525ba387c0d39.tar.bz2 scummvm-rg350-0c7e5d920da932f5bedd4863a7e525ba387c0d39.zip |
CRYO: Simplify some code using rect
Diffstat (limited to 'engines/cryo')
-rw-r--r-- | engines/cryo/eden.cpp | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/engines/cryo/eden.cpp b/engines/cryo/eden.cpp index 844748e04a..c3cad9a1ae 100644 --- a/engines/cryo/eden.cpp +++ b/engines/cryo/eden.cpp @@ -892,14 +892,8 @@ void EdenGame::saveFriezes() { // Original name: sauvefriseshaut void EdenGame::saveTopFrieze(int16 x) { // Save top bar - underTopBarScreenRect.top = 0; //TODO: wrong fields order? - underTopBarScreenRect.left = x; - underTopBarScreenRect.right = x + 320 - 1; - underTopBarScreenRect.bottom = 15; - underTopBarBackupRect.top = 0; - underTopBarBackupRect.left = 0; - underTopBarBackupRect.right = 320 - 1; - underTopBarBackupRect.bottom = 15; + underTopBarScreenRect = Common::Rect(x, 0, x + 320 - 1, 15); + underTopBarBackupRect = Common::Rect(0, 0, 320 - 1, 15); CLBlitter_CopyViewRect(p_mainview, p_underBarsView, &underTopBarScreenRect, &underTopBarBackupRect); } @@ -4965,25 +4959,10 @@ void EdenGame::init_globals() { } void EdenGame::initrect() { - underTopBarScreenRect.top = 0; - underTopBarScreenRect.left = 0; - underTopBarScreenRect.right = 320 - 1; - underTopBarScreenRect.bottom = 16 - 1; - - underTopBarBackupRect.top = 0; - underTopBarBackupRect.left = 0; - underTopBarBackupRect.right = 320 - 1; - underTopBarBackupRect.bottom = 16 - 1; - - underBottomBarScreenRect.top = 176; - underBottomBarScreenRect.left = 0; - underBottomBarScreenRect.right = 320 - 1; - underBottomBarScreenRect.bottom = 200 - 1; //TODO: original bug? this cause crash in copyrect (this, underBottomBarBackupRect) - - underBottomBarBackupRect.top = 16; - underBottomBarBackupRect.left = 0; - underBottomBarBackupRect.right = 320 - 1; - underBottomBarBackupRect.bottom = 40 - 1; + underTopBarScreenRect = Common::Rect(0, 0, 320 - 1, 16 - 1); + underTopBarBackupRect = Common::Rect(0, 0, 320 - 1, 16 - 1); + underBottomBarScreenRect = Common::Rect(0, 176, 320 - 1, 200 - 1); //TODO: original bug? this cause crash in copyrect (this, underBottomBarBackupRect) + underBottomBarBackupRect = Common::Rect(0, 16, 320 - 1, 40 - 1); } void EdenGame::closesalle() { |