Ignore:
Timestamp:
Jul 8, 2010, 2:00:13 AM (11 years ago)
Author:
sam
Message:

Rendering starts to work again. There is no Z-sorting yet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/test-map.cpp

    r75 r79  
    77
    88#include "video.h"
    9 #include "tiler.h"
    10 #include "map.h"
     9#include "game.h"
    1110
    1211int main(int argc, char **argv)
    1312{
    1413    Video *video = new Video("Deus Hax", 640, 480);
    15     Map *map = new Map("maps/testmap-grass.tmx");
     14    Game *game = new Game("maps/testmap-library.tmx");
    1615
    1716    for (int done = 0; !done; )
     
    1918        video->Clear();
    2019
    21         //map->Draw(tiler);
     20        /* Test stuff */
     21        int mx, my;
     22        SDL_GetMouseState(&mx, &my);
     23        game->SetMouse(mx * (640 - 32) / 640, my * (480 - 32) / 480);
    2224
    23         /* Test stuff */
    24         int playerx, playery;
    25         SDL_GetMouseState(&playerx, &playery);
    26         playerx = playerx * (640 - 32) / 640;
    27         playery = playery * (480 - 32) / 480;
    28 
    29         //tiler->AddTile(50, playerx, playery, 1);
    30 
    31         //tiler->Render();
     25        game->Render();
    3226        video->Refresh(33.33333f);
    3327
     
    4842    }
    4943
    50     delete map;
     44    delete game;
    5145    delete video;
    5246
Note: See TracChangeset for help on using the changeset viewer.