Mercurial > otakunoraifu
diff scn2k/scn2k_grpimpl.cc @ 74:f8751d74918b default tip
Remove “duplicate” functions as they can be remplaced by a nearly-identical existing function.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 02 Apr 2011 19:13:54 +0200 |
parents | 1fd20d231376 |
children |
line wrap: on
line diff
--- a/scn2k/scn2k_grpimpl.cc +++ b/scn2k/scn2k_grpimpl.cc @@ -629,38 +629,20 @@ void Grp::impl_objScale(Cmd& cmd) { int base_arg = 0; GrpObj* g = GetGraphicObjVarMode(cmd, base_arg, (cmd.cmd2 == 0x51)); - int zoomx = cmd.args[base_arg + 1].value; - zoomx = zoomx*256/100; + int zoomx = -1; + int zoomy = -1; - int zoomy = cmd.args[base_arg + 2].value; - zoomy = zoomy*256/100; + if (cmd.cmd3 < 1048) { + zoomx = cmd.args[base_arg + 1].value * 256 / 100; + if (cmd.cmd3 == 1046) + zoomy = cmd.args[base_arg + 2].value * 256 / 100; + } else + zoomy = cmd.args[base_arg + 1].value * 256 / 100; g->SetZoomRotate(zoomx, zoomy, -1); cmd.clear(); } -void Grp::impl_objWidth(Cmd& cmd) { - int base_arg = 0; - GrpObj* g = GetGraphicObjVarMode(cmd, base_arg, (cmd.cmd2 == 0x51)); - - int zoom = cmd.args[base_arg + 1].value; - zoom = zoom*256/100; - - g->SetZoomRotate(zoom, -1, -1); - cmd.clear(); -} - -void Grp::impl_objHeight(Cmd& cmd) { - int base_arg = 0; - GrpObj* g = GetGraphicObjVarMode(cmd, base_arg, (cmd.cmd2 == 0x51)); - - int zoom = cmd.args[base_arg + 1].value; - zoom = zoom*256/100; - - g->SetZoomRotate(-1, zoom, -1); - cmd.clear(); -} - void Grp::impl_objRotate(Cmd& cmd) { int base_arg = 0; GrpObj* g = GetGraphicObjVarMode(cmd, base_arg, (cmd.cmd2 == 0x51));