master chld/cotton_haiku / src / cotton.h
 1#ifndef COTTON_H
 2#define COTTON_H
 3
 4#include <stdint.h>
 5
 6#define MEMORY_SIZE  (64 * 1024)
 7#define VIDEO_WIDTH  250
 8#define VIDEO_HEIGHT 200
 9
10#define COTTOLETTE_SIZE 7 // would be 6 but due to high demand we invited green into the mix because green is cool <3
11
12// i might work on better names another time xP
13static const uint32_t COTTOLETTE[COTTOLETTE_SIZE] = 
14{
15    0xFF000000, // 0 - black
16    0xFFFFFFFF, // 1 - white
17    0xFF28262C, // 2 - rey
18    0xFFA9A0CF, // 3 - wist
19    0xFFE4D8FD, // 4 - wink
20    0xFFF9F5FF, // 5 - laven
21    0xFFD0F0C0, // 6 - the dude nobody invited (geen)
22};
23
24typedef struct
25{
26    uint8_t  memory[MEMORY_SIZE];
27    uint32_t video[VIDEO_WIDTH * VIDEO_HEIGHT];
28
29    // i cant come up with a better name that gets straight to the point than "cursor" so ig it will stay this way for now,,      
30    int cursor_x;
31    int cursor_y;
32
33    uint32_t ticktock;
34    uint32_t c_cottolette; //id write "current_cottolete" but that would be alot to type and im lazyyyyyyy bwaaaaaa
35    
36} Cotton;
37
38void cotton_init(Cotton *c);
39
40#endif