Start atlas
This commit is contained in:
23
util/atlas.h
Normal file
23
util/atlas.h
Normal 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
|
Reference in New Issue
Block a user