Halfway done

This commit is contained in:
Senad Uka
2022-11-27 18:57:45 +01:00
parent 8f158db4a9
commit 7d0d4881f5
13 changed files with 178 additions and 98 deletions

View File

@@ -35,11 +35,11 @@
#include <stdbool.h>
#include <SDL.h>
#include "sdlhelpers.h"
#include "utils.h"
#define GRID_MAX_X_CELLS (20)
#define GRID_MAX_Y_CELLS (20)
#define GRID_MAX_X_CELLS (15)
#define GRID_MAX_Y_CELLS (15)
struct Cell
{

28
include/letter.h Normal file
View File

@@ -0,0 +1,28 @@
#ifndef LETTER_H
#define LETTER_H
#include <stdio.h>
#include <stdbool.h>
#include <SDL.h>
#include "sdlhelpers.h"
#include "utils.h"
struct Letter
{
SDL_Rect rect;
// Grid background color
SDL_Color backgroundColor;
// Grid border thickness and color
unsigned int border;
SDL_Color borderColor;
int isFromPreviousMove;
int letterIndex;
};
#endif // LETTER_H

13
include/sdlhelpers.h Normal file
View File

@@ -0,0 +1,13 @@
//
// Created by hamo on 11/25/22.
//
#include <SDL2/SDL.h>
#ifndef LETTERGAME_SDLHELPERS_H
#define LETTERGAME_SDLHELPERS_H
int
SDH_fill_rounded_box_b( SDL_Surface* dst, int xo, int yo,
int w, int h, int r, Uint32 color );
Uint32 ColourToUint(int R, int G, int B);
SDL_Colour UintToColour(Uint32 colour);
#endif //LETTERGAME_SDLHELPERS_H