#ifndef RENDERING_H #define RENDERING_H #include #include "../game.h" #define SCREEN_WIDTH 600 #define SCREEN_HEIGHT 600 #define CELL_WIDTH ((float) SCREEN_WIDTH / (float) BOARD_WIDTH) #define CELL_HEIGHT ((float) SCREEN_HEIGHT / (float) BOARD_HEIGHT) #define BACKGROUND_COLOR 0x190A0FFF #define GRID_COLOR 0xEBCBF4FF #define WALL_COLOR (GRID_COLOR) #define AGENT_COLOR_ALIVE 0x8447FFFF // #define AGENT_COLOR_DEAD 0x392A2FFF #define AGENT_COLOR_DEAD (BACKGROUND_COLOR) #define FOOD_COLOR 0xE1F0C4FF #define HEX_COLOR(hex) \ ((hex) >> (3 * 8)) & 0xFF, \ ((hex) >> (2 * 8)) & 0xFF, \ ((hex) >> (1 * 8)) & 0xFF, \ ((hex) >> (0 * 8)) & 0xFF int scc(int code); void *scp(void *ptr); void render_board_grid(SDL_Renderer *renderer); void render_game(SDL_Renderer *renderer, const Game *game); #endif