Ignore:
Timestamp:
Aug 14, 2010, 11:15:43 PM (10 years ago)
Author:
sam
Message:

The frame counter is now an asset object.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/game.cpp

    r106 r111  
    1212#include "game.h"
    1313#include "map.h"
    14 #include "font.h"
    1514
    1615/*
     
    2423private:
    2524    Map *map;
    26     Font *font;
    2725    int x, y;
    2826    int mousex, mousey;
     
    4038    data = new GameData();
    4139    data->map = new Map(mapname);
    42     data->font = new Font("gfx/font/ascii.png");
    4340    data->x = data->y = 0;
    4441    data->done = 0;
     
    4845Game::~Game()
    4946{
    50     delete data->font;
    5147    delete data->map;
    5248    delete data;
     
    7369    scene->Render();
    7470    delete scene;
    75 
    76     char buf[1024];
    77     sprintf(buf, "Frame %i", data->frame++);
    78     data->font->Print(10, 10, buf);
    7971}
    8072
Note: See TracChangeset for help on using the changeset viewer.