~silwol/freenukum/trunk

« back to all changes in this revision

Viewing changes to src/fn_test_tile.c

  • Committer: Wolfgang Silbermayr
  • Date: 2009-02-20 08:45:51 UTC
  • Revision ID: wolfgang@silbermayr.at-20090220084551-x9o1nmtr4zrqqu1a
Removing obsolete functions

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
/* --------------------------------------------------------------- */
34
34
 
35
35
#include "fn_tile.h"
 
36
#include "fntexture.h"
36
37
 
37
38
/* --------------------------------------------------------------- */
38
39
 
60
61
    fd = open(argv[1], O_RDONLY);
61
62
 
62
63
    SDL_Surface * screen;
63
 
    SDL_Surface * tile;
 
64
    FnTexture * tile;
64
65
 
65
66
    if (SDL_Init(SDL_INIT_VIDEO) == -1)
66
67
    {
82
83
    size_t i = 0;
83
84
    while (i != h.tiles)
84
85
    {
85
 
        tile = fn_tile_load_to_sdl(
 
86
        tile = fn_tile_load(
86
87
            fd, env, &h, 0);
87
 
        SDL_BlitSurface(tile, NULL, screen, &r);
88
 
        SDL_FreeSurface(tile);
 
88
        fn_texture_blit_to_sdl_surface(tile, NULL, screen, &r);
 
89
        g_object_unref(tile);
89
90
        i++;
90
91
        r.x += 8 * h.width * pixelsize;
91
92
        r.y = 0;