This commit is contained in:
p.kosyh 2010-09-13 09:27:39 +00:00
parent 524c1e8813
commit 334d116894
5 changed files with 17 additions and 9 deletions

View file

@ -1,3 +1,6 @@
#include "externals.h"
#include "internals.h"
#include <SDL.h>
#include <SDL_image.h>
#include <SDL_ttf.h>
@ -6,9 +9,6 @@
#include "SDL_gfxBlitFunc.h"
#include "SDL_anigif.h"
#include "externals.h"
#include "internals.h"
#define Surf(p) ((SDL_Surface *)p)
static SDL_Surface *screen = NULL;

View file

@ -1,8 +1,8 @@
#include <SDL.h>
#include "externals.h"
#include "internals.h"
#include <SDL.h>
static int m_focus = 0;
static int m_minimized = 0;

View file

@ -366,6 +366,13 @@ static int luaB_get_savepath(lua_State *L) {
return 1;
}
static int luaB_get_gamepath(lua_State *L) {
char path[PATH_MAX];
char *p = getdir(path, sizeof(path) - 1);
lua_pushstring(L, p);
return 1;
}
static gtimer_t instead_timer = NULL;
static int instead_timer_nr = 0;
@ -420,6 +427,7 @@ static const luaL_Reg base_funcs[] = {
{"print", luaB_print}, /* for some mystic, it is needed in win version (with -debug) */
{"is_sound", luaB_is_sound},
{"get_savepath", luaB_get_savepath},
{"get_gamepath", luaB_get_gamepath},
{"set_timer", luaB_set_timer},
{NULL, NULL}
};

View file

@ -2,7 +2,7 @@
#define _SDL_ICONV_H
#ifdef _SDL_ICONV
#include <SDL_stdinc.h>
#define iconv SDL_iconv
#define iconv_t SDL_iconv_t
#define iconv_open SDL_iconv_open

View file

@ -1,9 +1,9 @@
#include <SDL.h>
#include <SDL_mixer.h>
#include "externals.h"
#include "internals.h"
#include <SDL.h>
#include <SDL_mixer.h>
int audio_rate = 22050;
Uint16 audio_format = MIX_DEFAULT_FORMAT;
int audio_channels = 2;