#include #include "init.h" #include "logging.h" #include "resources/image.h" #include "tmx.h" int main(void) { struct image *img; SDL_Rect imgrect, surfacerect; init(); tmx_load("data/forest1.tmx"); img = img_png_get("../forest-6-layer-test_ground.png"); img_png_free(img); img = img_png_get("../forest-6-layer-test_ground.png"); img = img_png_get("../forest-6-layer-test_ground.png"); img = img_png_get("../forest-6-layer-test_ground.png"); img = img_png_get("../forest-6-layer-test_ground.png"); img_png_free(img); img_png_free(img); img_png_free(img); img = img_png_get("../forest-6-layer-test_ground.png"); imgrect.w = 240; imgrect.h = 160; surfacerect.x = 0; surfacerect.y = 0; surfacerect.w = 240; surfacerect.h = 160; imgrect.x = 208; imgrect.y = 480; SDL_BlitSurface(img->image, &imgrect, screen, &surfacerect); SDL_Flip(screen); SDL_Delay(500); imgrect.x = 208; imgrect.y = 464; SDL_BlitSurface(img->image, &imgrect, screen, &surfacerect); SDL_Flip(screen); SDL_Delay(500); imgrect.x = 224; imgrect.y = 464; SDL_BlitSurface(img->image, &imgrect, screen, &surfacerect); SDL_Flip(screen); SDL_Delay(500); imgrect.x = 240; imgrect.y = 464; SDL_BlitSurface(img->image, &imgrect, screen, &surfacerect); SDL_Flip(screen); SDL_Delay(500); imgrect.x = 256; imgrect.y = 464; SDL_BlitSurface(img->image, &imgrect, screen, &surfacerect); SDL_Flip(screen); SDL_Delay(500); imgrect.x = 256; imgrect.y = 448; SDL_BlitSurface(img->image, &imgrect, screen, &surfacerect); SDL_Flip(screen); SDL_Delay(500); quit(0); /* Control doesn't actually reach here. */ return 0; }