diff options
author | Strangerke | 2019-10-26 17:18:54 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2019-11-13 22:07:08 +0100 |
commit | bf94210ad975b9668006fddc4a085b024214817b (patch) | |
tree | 560af8ed9690f4fda2e3492f9410830fa82607f5 | |
parent | 83e41cd04bcdc747c79bd17dcc20b78d7daa7dde (diff) | |
download | scummvm-rg350-bf94210ad975b9668006fddc4a085b024214817b.tar.gz scummvm-rg350-bf94210ad975b9668006fddc4a085b024214817b.tar.bz2 scummvm-rg350-bf94210ad975b9668006fddc4a085b024214817b.zip |
GRIFFON: simplify some code in draw by using clip
-rw-r--r-- | engines/griffon/draw.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/engines/griffon/draw.cpp b/engines/griffon/draw.cpp index d224c9f8bc..9cc5ae8bd6 100644 --- a/engines/griffon/draw.cpp +++ b/engines/griffon/draw.cpp @@ -1113,10 +1113,7 @@ void GriffonEngine::drawPlayer() { int ww = 14 * _player.hp / _player.maxHp; - if (ww > 14) - ww = 14; - if (ww < 1) - ww = 1; + ww = CLIP(ww, 1, 14); rcDest.setWidth(ww); rcDest.setHeight(2); |