aboutsummaryrefslogtreecommitdiffstats
path: root/src/sldj.h
blob: a577a60466f762e8c74804969b2874707a3789ec (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <math.h>

#include <raylib.h>

#include "sldjConfig.h"
#include "scripting.h"
#include "libsldj/util.h"

#ifndef SLDJ_H
#define SLDJ_H

typedef struct Sldj {
    RenderTexture viewport;

    bool isPaused;
    uint8_t targetFps;
    uint32_t frameCounter;

    // Used for always using a 0 to 2**16 range when scanning.
    uint16_t xCount;
    uint16_t yCount;

    SldjScripting scripting;
    char scriptFilepath[SLDJ_NAMEMAX];
} Sldj;

void initSldj(Sldj* sldj);
void updateSldj(Sldj* sldj);
void closeSldj(Sldj* sldj);

void resetViewport(Sldj* sldj, int width, int height);
void reloadScriptContext(Sldj* sldj);
void reloadScript(Sldj* sldj);

#endif