blob: 694882eaa3f9114b6f42e967fa6e55615e774205 (
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
39
40
41
42
43
44
45
46
47
48
49
|
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <math.h>
#include <raylib.h>
#include <raygui.h>
#include "sldjConfig.h"
#include "scripting.h"
#include "libsldj/util.h"
#ifndef SLDJ_H
#define SLDJ_H
typedef struct Sldj {
RenderTexture viewport;
Rectangle viewPortRect;
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];
struct {
Rectangle fpsSlider;
float fpsSliderValue;
} gui;
} Sldj;
void initSldj(Sldj* sldj);
void updateSldj(Sldj* sldj);
void closeSldj(Sldj* sldj);
void resizeGui(Sldj* sldj);
void resetViewportRect(Sldj* sldj, float scale);
void resetViewport(Sldj* sldj, int width, int height, float scale);
void reloadScriptContext(Sldj* sldj);
void reloadScript(Sldj* sldj);
#endif
|