X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Forbi.cpp;h=67409e6888f9122a0aeca50389ed24ba44c1f59b;hb=aa28d59d492c490194e8e8f7af086fcb531d170a;hp=42ee9109f450c8f4e3e61dd11be42cdb49bfb077;hpb=79a34acdc1beff20213f03c326a4aa03c5d47c92;p=orbi.git diff --git a/src/orbi.cpp b/src/orbi.cpp index 42ee910..67409e6 100644 --- a/src/orbi.cpp +++ b/src/orbi.cpp @@ -32,7 +32,7 @@ int main(int argc, const char *argv[]) { Tileset tiles( canv.LoadTexture(sdl.GetBasePath() + "../../data/test-tile.png"), - Vector(32, 32) + Vector(16, 16) ); World world(Vector(10, 10)); @@ -48,11 +48,26 @@ int main(int argc, const char *argv[]) { world.SetTile(Vector(9, 5), Tile(0)); world.SetTile(Vector(9, 6), Tile(0)); + world.SetTile(Vector(3, 8), Tile(0)); + world.SetTile(Vector(2, 9), Tile(0)); + world.SetTile(Vector(3, 9), Tile(0)); + Entity e; - e.Bounds() = AABB(Vector(5, 2), Vector(2, 3)); + e.bounds = AABB(0, 0, 2, 3); + e.vbox = AABB(.1, 0, 1.8, 3); + e.hbox = AABB(0, .1, 2, 1.8); + e.Move(Vector(5, 0)); world.AddEntity(e); + Entity mob; + mob.bounds = AABB(0, 0, 2, 1.5); + mob.vbox = mob.bounds; + mob.hbox = mob.bounds; + mob.Move(Vector(1, 0)); + world.AddEntity(mob); + Application app(canv, world, tiles); + app.Control(e); app.Run(); return 0;