upd
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
#ifndef FACTORYGAME_ATLAS_H
|
||||
#define FACTORYGAME_ATLAS_H
|
||||
|
||||
#define ATLAS_SIZE 1024
|
||||
#define MAX_RECTS 2048
|
||||
#define ATLAS_SIZE 2048
|
||||
#define MAX_RECTS 4096
|
||||
#define TILE_SIZE 32
|
||||
#define QUADRANT_SIZE 16
|
||||
#define ATLAS_TILES_PER_ROW (ATLAS_SIZE / TILE_SIZE)
|
||||
|
@@ -90,8 +90,9 @@ void updateMachine(Tile *tile,
|
||||
in1->type = TYPE_AIR;
|
||||
if (in2->type != TYPE_AIR) in2->type = TYPE_AIR;
|
||||
out->type = result;
|
||||
out->tileX = tile->rect.x;
|
||||
out->tileY = tile->rect.y;
|
||||
out->prevTile = out->tile;
|
||||
out->tile.x = tile->rect.x;
|
||||
out->tile.y = tile->rect.y;
|
||||
out->offset = -0.5f;
|
||||
}
|
||||
}
|
||||
|
@@ -13,6 +13,8 @@
|
||||
SDL_Window *window = NULL;
|
||||
volatile bool running = true;
|
||||
|
||||
WaveInfo waveInfo;
|
||||
|
||||
const char OrientStrings[ORIENT_DIRECTION_COUNT][10] = {
|
||||
"LEFT_DOWN",
|
||||
"LEFT",
|
||||
|
13
util/util.h
13
util/util.h
@@ -44,6 +44,19 @@ typedef struct Animation {
|
||||
} Animation;
|
||||
|
||||
|
||||
typedef struct MiniRect {
|
||||
int x;
|
||||
int y;
|
||||
} MiniRect;
|
||||
|
||||
typedef struct WaveInfo {
|
||||
int waveCounter;
|
||||
int waveTimer;
|
||||
} WaveInfo;
|
||||
|
||||
extern WaveInfo waveInfo;
|
||||
|
||||
|
||||
typedef struct OrientedAnimation {
|
||||
SDL_Rect atlasRects[ORIENT_DIRECTION_COUNT][TILE_SIZE * 2];
|
||||
unsigned char frameCount;
|
||||
|
Reference in New Issue
Block a user