c: Add lessons 1-10

This commit is contained in:
2025-05-31 18:09:29 +10:00
commit cdb2c800cc
37 changed files with 4420 additions and 0 deletions

22
src/c/application.h Normal file
View File

@@ -0,0 +1,22 @@
#ifndef APPLICATION_H
#define APPLICATION_H
#include <SDL3/SDL_gpu.h>
#include <SDL3/SDL_keycode.h>
#include <stdbool.h>
struct NeHeContext;
extern const struct AppConfig
{
const char* const title;
int width, height;
SDL_GPUTextureFormat createDepthFormat;
bool (*init)(struct NeHeContext*);
void (*quit)(struct NeHeContext*);
void (*resize)(struct NeHeContext*, int width, int height);
void (*draw)(struct NeHeContext* restrict, SDL_GPUCommandBuffer* restrict, SDL_GPUTexture* restrict);
void (*key)(struct NeHeContext*, SDL_Keycode, bool down, bool repeat);
} appConfig;
#endif//APPLICATION_H