]> git.localhorst.tv Git - l2e.git/commitdiff
changed party layout position interpretation to better reflect the original game
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Wed, 8 Aug 2012 12:12:31 +0000 (14:12 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Wed, 8 Aug 2012 12:12:31 +0000 (14:12 +0200)
src/battle/PartyLayout.h
src/main.cpp

index df247f348ad1b8110ecae3bcd2bac3528d9e12ff..d16f2bdd6eb678212b60e1c098cdbdc3b2777f87 100644 (file)
@@ -28,8 +28,8 @@ public:
                dest.reserve(positions.size());
                for (std::vector<geometry::Point<Uint8> >::const_iterator i(positions.begin()), end(positions.end()); i != end; ++i) {
                        dest.push_back(geometry::Point<U>(
-                                       i->X() * width / 256,
-                                       i->Y() * height / 256
+                                       i->X() * width / 255,
+                                       i->Y() * height / 223
                                        ));
                }
        }
index ab02016cff4d67511af6f986f595067c58dfd875..c3d73cb93ec43b6c2cc1bac78498e58d283a3406 100644 (file)
@@ -55,10 +55,10 @@ int main(int argc, char **argv) {
                // temporary test data
                SDL_Surface *bg(IMG_Load("test-data/battle-bg.png"));
                PartyLayout monstersLayout;
-               monstersLayout.AddPosition(Point<Uint8>(104, 109));
-               monstersLayout.AddPosition(Point<Uint8>(140, 118));
-               monstersLayout.AddPosition(Point<Uint8>(176, 109));
-               monstersLayout.AddPosition(Point<Uint8>(212, 118));
+               monstersLayout.AddPosition(Point<Uint8>(88, 104));
+               monstersLayout.AddPosition(Point<Uint8>(128, 104));
+               monstersLayout.AddPosition(Point<Uint8>(168, 104));
+               monstersLayout.AddPosition(Point<Uint8>(208, 104));
                PartyLayout heroesLayout;
                heroesLayout.AddPosition(Point<Uint8>(27, 219));
                heroesLayout.AddPosition(Point<Uint8>(104, 227));