~l3kn/quad

9a197beca3e54dda384a71e3390b27175e75e0af — Leon Rische 5 months ago 3b26979
Move header file contents to main file
2 files changed, 15 insertions(+), 14 deletions(-)

M quad.c
D quad.h
M quad.c => quad.c +15 -1
@@ 4,10 4,10 @@

#include <SDL2/SDL.h>

#include "quad.h"
#include "patterns.h"

int width, height, size, menu_size, menu_width;

#define PADDING 20
#define SCALE 2
#define CANVAS_X PADDING + menu_width + menu_size


@@ 19,6 19,20 @@ int width, height, size, menu_size, menu_width;
SDL_Window* window = NULL;
SDL_Renderer* renderer = NULL;

typedef enum {
  RULE, PATTERN,
} nodeType;

typedef struct node {
  nodeType type;
  int index;
} Node;

typedef struct rule {
  Node quads[4];
  Node fallback;
} Rule;

Node selection;
Rule rules[8];
int colors[2] = { COLOR_BLACK, COLOR_WHITE };

D quad.h => quad.h +0 -13
@@ 1,13 0,0 @@
typedef enum {
  NONE, RULE, PATTERN,
} nodeType;

typedef struct node {
  nodeType type;
  int index;
} Node;

typedef struct rule {
  Node quads[4];
  Node fallback;
} Rule;