Start atlas

This commit is contained in:
2025-06-01 22:13:02 +02:00
parent 96a9a45c20
commit 84805b92cb
64 changed files with 954 additions and 243 deletions

23
util/atlas.h Normal file
View File

@@ -0,0 +1,23 @@
//
// Created by bruno on 1.6.2025.
//
#ifndef FACTORYGAME_ATLAS_H
#define FACTORYGAME_ATLAS_H
#define ATLAS_SIZE 512
#define TILE_SIZE 32
#define QUADRANT_SIZE 16
#define ATLAS_TILES_PER_ROW (ATLAS_SIZE / TILE_SIZE)
#include "SDL2/SDL.h"
extern SDL_Texture *atlasTexture;
SDL_Rect allocate_32x32(SDL_Texture *srcTexture, SDL_Renderer *renderer);
SDL_Rect allocate_16x16(SDL_Texture *srcTexture, SDL_Renderer *renderer);
void initAtlas(SDL_Renderer *renderer);
#endif //FACTORYGAME_ATLAS_H