Skip to content

Commit

Permalink
physac fix merged
Browse files Browse the repository at this point in the history
  • Loading branch information
EmperorPenguin18 committed Aug 20, 2024
1 parent f885e67 commit 889a6eb
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 35 deletions.
1 change: 1 addition & 0 deletions decoder/common.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#ifndef __COMMON_H__
#define __COMMON_H__

#include <stdlib.h>
#include <string.h>
Expand Down
2 changes: 1 addition & 1 deletion engine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ add_dependencies(${title} data)
fetch_header(${title} sokol sokol_gfx.h /usr/include https://github.com/floooh/sokol 55bc9cf3fa4051d485d10412c75c893c3135e885 "") # Commit May 6, 2024
fetch_header(${title} sokol sokol_gl.h /usr/include https://github.com/floooh/sokol 55bc9cf3fa4051d485d10412c75c893c3135e885 "util") # Commit May 6, 2024
fetch_header(${title} sokol_gp sokol_gp.h /usr/include https://github.com/edubart/sokol_gp a6ce39f93fb2da2c47b70cdd4d1c0a35c0e756ef "") # Commit Mar 22, 2024
fetch_header(${title} physac physac.h /usr/include https://github.com/EmperorPenguin18/physac c8f2816199cbd8559bc6529cac829e5cb02136ef "src") # My fork
fetch_header(${title} physac physac.h /usr/include https://github.com/victorfisac/Physac 999bc37eccdde91e8b1cc34b2fb00ce702a14928 "src") # Commit Aug 17, 2024
fetch_header(${title} minilua minilua.h /usr/include https://github.com/edubart/minilua 79a00fab1639517de38a372db9e60fd6cc730d69 "") # v5.4.6
fetch_header(${title} fontstash fontstash.h /usr/include https://github.com/memononen/fontstash b5ddc9741061343740d85d636d782ed3e07cf7be "src") # Commit Apr 22, 2019
fetch_header(${title} glibc force_link_glibc_2.23.h /usr/include https://github.com/wheybags/glibc_version_header 60d54829f34f21dc440126ad5630e6a9789a48b2 "version_headers/x64") # Commit May 3, 2019
Expand Down
68 changes: 34 additions & 34 deletions engine/actions.h
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
#ifndef __ACTIONS_H__
#define __ACTIONS_H__

#include <minilua.h>

#define FUNC_DEF(NAME) int tidal_##NAME(lua_State*);

#define FUNC_ENTRY(NAME) { #NAME, tidal_##NAME },

#define FUNC_LIST \
X(create) \
X(set_size) \
X(set_sprite) \
X(set_shape) \
X(set_gravity) \
X(set_pos) \
X(set_font) \
X(set_text) \
X(set_music) \
X(set_cb_keydown) \
X(set_background_colour) \
X(set_font_colour) \
X(set_font_size) \
X(set_rotation) \
X(quit) \

#ifndef GBA
int tidal_create(lua_State*);
int tidal_set_size(lua_State*);
int tidal_set_sprite(lua_State*);
int tidal_set_shape(lua_State*);
int tidal_set_gravity(lua_State*);
int tidal_set_pos(lua_State*);
int tidal_set_font(lua_State*);
int tidal_set_text(lua_State*);
int tidal_set_music(lua_State*);
int tidal_set_cb_keydown(lua_State*);
int tidal_set_background_colour(lua_State*);
int tidal_set_font_colour(lua_State*);
int tidal_set_font_size(lua_State*);
int tidal_set_rotation(lua_State*);
int tidal_quit(lua_State*);

static const struct luaL_Reg actions[] = {
{"create", tidal_create},
{"set_size", tidal_set_size},
{"set_sprite", tidal_set_sprite},
{"set_shape", tidal_set_shape},
{"set_gravity", tidal_set_gravity},
{"set_pos", tidal_set_pos},
{"set_font", tidal_set_font},
{"set_text", tidal_set_text},
{"set_music", tidal_set_music},
{"set_cb_keydown", tidal_set_cb_keydown},
{"set_background_colour", tidal_set_background_colour},
{"set_font_colour", tidal_set_font_colour},
{"set_font_size", tidal_set_font_size},
{"set_rotation", tidal_set_rotation},
{"quit", tidal_quit},
{NULL, NULL}

#define X(name) FUNC_DEF(name)
FUNC_LIST
#undef X

#define X(name) FUNC_ENTRY(name)
static const struct luaL_Reg actions[] = { \
FUNC_LIST
{NULL, NULL} \
};
#undef X

#endif //GBA

#endif
#endif //__ACTIONS_H__
1 change: 1 addition & 0 deletions engine/common.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#ifndef __COMMON_H__
#define __COMMON_H__

#include <stdlib.h>
#include <string.h>
Expand Down
1 change: 1 addition & 0 deletions engine/engine.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#ifndef __ENGINE_H__
#define __ENGINE_H__

#include <stdbool.h>
#define _STDBOOL_H
Expand Down

0 comments on commit 889a6eb

Please sign in to comment.