move texture logic to samply.c
This commit is contained in:
parent
aa95148fc9
commit
d2155bf27e
3 changed files with 22 additions and 9 deletions
18
samply.c
18
samply.c
|
@ -3,6 +3,24 @@
|
|||
#include "dat.h"
|
||||
#include "fns.h"
|
||||
|
||||
int
|
||||
samply_step(State *st)
|
||||
{
|
||||
Uint64 ms;
|
||||
SDL_Texture *tx;
|
||||
|
||||
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());
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
put_samply_to_bed(Samply *sam)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue