comparison 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
comparison
equal deleted inserted replaced
73:e4a12dd9a51b 74:f8751d74918b
627 627
628 void Grp::impl_objScale(Cmd& cmd) { 628 void Grp::impl_objScale(Cmd& cmd) {
629 int base_arg = 0; 629 int base_arg = 0;
630 GrpObj* g = GetGraphicObjVarMode(cmd, base_arg, (cmd.cmd2 == 0x51)); 630 GrpObj* g = GetGraphicObjVarMode(cmd, base_arg, (cmd.cmd2 == 0x51));
631 631
632 int zoomx = cmd.args[base_arg + 1].value; 632 int zoomx = -1;
633 zoomx = zoomx*256/100; 633 int zoomy = -1;
634 634
635 int zoomy = cmd.args[base_arg + 2].value; 635 if (cmd.cmd3 < 1048) {
636 zoomy = zoomy*256/100; 636 zoomx = cmd.args[base_arg + 1].value * 256 / 100;
637 if (cmd.cmd3 == 1046)
638 zoomy = cmd.args[base_arg + 2].value * 256 / 100;
639 } else
640 zoomy = cmd.args[base_arg + 1].value * 256 / 100;
637 641
638 g->SetZoomRotate(zoomx, zoomy, -1); 642 g->SetZoomRotate(zoomx, zoomy, -1);
639 cmd.clear();
640 }
641
642 void Grp::impl_objWidth(Cmd& cmd) {
643 int base_arg = 0;
644 GrpObj* g = GetGraphicObjVarMode(cmd, base_arg, (cmd.cmd2 == 0x51));
645
646 int zoom = cmd.args[base_arg + 1].value;
647 zoom = zoom*256/100;
648
649 g->SetZoomRotate(zoom, -1, -1);
650 cmd.clear();
651 }
652
653 void Grp::impl_objHeight(Cmd& cmd) {
654 int base_arg = 0;
655 GrpObj* g = GetGraphicObjVarMode(cmd, base_arg, (cmd.cmd2 == 0x51));
656
657 int zoom = cmd.args[base_arg + 1].value;
658 zoom = zoom*256/100;
659
660 g->SetZoomRotate(-1, zoom, -1);
661 cmd.clear(); 643 cmd.clear();
662 } 644 }
663 645
664 void Grp::impl_objRotate(Cmd& cmd) { 646 void Grp::impl_objRotate(Cmd& cmd) {
665 int base_arg = 0; 647 int base_arg = 0;