move texture logic to samply.c
This commit is contained in:
parent
aa95148fc9
commit
d2155bf27e
3 changed files with 22 additions and 9 deletions
12
slutpet.c
12
slutpet.c
|
@ -53,18 +53,12 @@ SDL_AppIterate(void *as)
|
|||
SDL_SetRenderDrawColor(st->ren, 0, 0, 0, SDL_ALPHA_TRANSPARENT);
|
||||
SDL_RenderClear(st->ren);
|
||||
|
||||
ms = SDL_GetTicks();
|
||||
if ((ms / 100) % 2)
|
||||
tx = st->sam->walka->tex;
|
||||
else
|
||||
tx = st->sam->walkb->tex;
|
||||
|
||||
if (SDL_RenderTexture(st->ren, tx, NULL, NULL) == false) {
|
||||
fuck("rendertexture fail: %s", SDL_GetError());
|
||||
if (samply_step(st) < 0)
|
||||
return SDL_APP_FAILURE;
|
||||
}
|
||||
|
||||
SDL_RenderPresent(st->ren);
|
||||
st->lastframe = SDL_GetTicks();
|
||||
|
||||
return SDL_APP_CONTINUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue