+stb_image, rm i think unnecessary part of quit
This commit is contained in:
parent
8ec5f46e61
commit
380f715903
4 changed files with 7995 additions and 13 deletions
2
Makefile
2
Makefile
|
@ -2,7 +2,7 @@
|
|||
PREFIX ?= /usr/local
|
||||
|
||||
CFLAGS := $(CFLAGS) `pkg-config --cflags --libs sdl3`
|
||||
LDFLAGS := $(LDFLAGS)
|
||||
LDFLAGS := $(LDFLAGS) -lm
|
||||
|
||||
all: slutpet
|
||||
|
||||
|
|
4
readme
4
readme
|
@ -1 +1,5 @@
|
|||
horny desktop pet thing.
|
||||
|
||||
i think it's probably best to use some sort of extension language.
|
||||
i want people to be able to create their own pets without having to
|
||||
figure out how to recompile.
|
||||
|
|
14
slutpet.c
14
slutpet.c
|
@ -1,24 +1,14 @@
|
|||
#define SDL_MAIN_USE_CALLBACKS
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#include <SDL3/SDL.h>
|
||||
#include <SDL3/SDL_main.h>
|
||||
#include "stb_image.h"
|
||||
|
||||
#include "dat.h"
|
||||
|
||||
void
|
||||
SDL_AppQuit(void *as, SDL_AppResult res)
|
||||
{
|
||||
State *st;
|
||||
|
||||
st = as;
|
||||
if (st) {
|
||||
SDL_Log("destroy renderer...");
|
||||
SDL_DestroyRenderer(st->ren);
|
||||
SDL_Log("destroy window...");
|
||||
SDL_DestroyWindow(st->win);
|
||||
SDL_Log("free state...");
|
||||
SDL_free(st);
|
||||
}
|
||||
|
||||
SDL_Log("bye!");
|
||||
return;
|
||||
}
|
||||
|
|
7988
stb_image.h
Normal file
7988
stb_image.h
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue