-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f885e67
commit 889a6eb
Showing
5 changed files
with
38 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|