they're very hasty
This commit is contained in:
parent
3840fb0321
commit
d65a270aab
10 changed files with 102 additions and 17 deletions
16
slutpet.c
16
slutpet.c
|
@ -13,7 +13,8 @@ SDL_AppQuit(void *as, SDL_AppResult res)
|
|||
|
||||
st = as;
|
||||
if (st) {
|
||||
free_image(st->test);
|
||||
babble("put samply to bed!!");
|
||||
put_samply_to_bed(st->sam);
|
||||
babble("free state...");
|
||||
SDL_free(st);
|
||||
}
|
||||
|
@ -50,7 +51,10 @@ SDL_AppIterate(void *as)
|
|||
SDL_SetRenderDrawColor(st->ren, 0, 0, 0, SDL_ALPHA_TRANSPARENT);
|
||||
SDL_RenderClear(st->ren);
|
||||
|
||||
SDL_RenderTexture(st->ren, st->test->tex, NULL, NULL);
|
||||
if (SDL_RenderTexture(st->ren, st->sam->idle->tex, NULL, NULL) == false) {
|
||||
fuck("rendertexture fail: %s", SDL_GetError());
|
||||
return SDL_APP_FAILURE;
|
||||
}
|
||||
SDL_RenderPresent(st->ren);
|
||||
return SDL_APP_CONTINUE;
|
||||
}
|
||||
|
@ -86,10 +90,10 @@ SDL_AppInit(void **as, int argc, char **argv)
|
|||
return SDL_APP_FAILURE;
|
||||
}
|
||||
|
||||
babble("create test image...");
|
||||
st->test = load_image(st->ren, "test.png");
|
||||
if (!st->test) {
|
||||
fuck("img creation fail: %s", SDL_GetError());
|
||||
babble("create samply!!...");
|
||||
st->sam = wake_samply_up(st->ren);
|
||||
if (!st->sam) {
|
||||
fuck("samply said no. too bad!");
|
||||
return SDL_APP_FAILURE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue