[Add] Qtcreator project support for the IDE users of the world.
This commit is contained in:
parent
ae7af81e75
commit
652d9352ad
5
.gitignore
vendored
5
.gitignore
vendored
@ -39,3 +39,8 @@ docs/doxygen/docs/*
|
||||
win32/Lephisto/*
|
||||
win32/Pack/*
|
||||
win32/Makefile
|
||||
|
||||
# Qt crap.
|
||||
qt/*.user
|
||||
qt/Makefile
|
||||
|
||||
|
180
qt/qt.pro
Normal file
180
qt/qt.pro
Normal file
@ -0,0 +1,180 @@
|
||||
TEMPLATE = app
|
||||
TARGET = Lephisto
|
||||
DEPENDPATH += . \
|
||||
.. \
|
||||
../src \
|
||||
../lib/lua \
|
||||
../utils/mkspr \
|
||||
../utils/pack \
|
||||
|
||||
# ../win32/ext/include/AL \
|
||||
# ../win32/ext/include/SDL
|
||||
|
||||
INCLUDEPATH += . \
|
||||
../lib/lua \
|
||||
../src \
|
||||
/usr/include/libxml2 \
|
||||
#../win32/ext/include/SDL \
|
||||
/usr/include/freetype2
|
||||
|
||||
MY_DEFINES = $$VERSION = -DVMAJOR=$(VMAJOR) -DVMINOR=$(VMINOR) -DVREV=$(VREV)
|
||||
|
||||
# Input
|
||||
HEADERS += ../src/ai.h \
|
||||
../src/base64.h \
|
||||
../src/board.h \
|
||||
../src/collision.h \
|
||||
../src/colour.h \
|
||||
../src/conf.h \
|
||||
../src/economy.h \
|
||||
../src/faction.h \
|
||||
../src/font.h \
|
||||
../src/hook.h \
|
||||
../src/input.h \
|
||||
../src/joystick.h \
|
||||
../src/land.h \
|
||||
../src/lephisto.h \
|
||||
../src/lfile.h \
|
||||
../src/llua.h \
|
||||
../src/llua_space.h \
|
||||
../src/lluadef.h \
|
||||
../src/log.h \
|
||||
../src/ltime.h \
|
||||
../src/map.h \
|
||||
../src/md5.h \
|
||||
../src/menu.h \
|
||||
../src/misn_lua.h \
|
||||
../src/mission.h \
|
||||
../src/music.h \
|
||||
../src/nebulae.h \
|
||||
../src/opengl.h \
|
||||
../src/outfit.h \
|
||||
../src/pack.h \
|
||||
../src/pause.h \
|
||||
../src/perlin.h \
|
||||
../src/physics.h \
|
||||
../src/pilot.h \
|
||||
../src/plasmaf.h \
|
||||
../src/player.h \
|
||||
../src/rng.h \
|
||||
../src/save.h \
|
||||
../src/ship.h \
|
||||
../src/sound.h \
|
||||
../src/space.h \
|
||||
../src/spfx.h \
|
||||
../src/toolkit.h \
|
||||
../src/weapon.h \
|
||||
../src/xml.h \
|
||||
../lib/lua/lapi.h \
|
||||
../lib/lua/lauxlib.h \
|
||||
../lib/lua/lcode.h \
|
||||
../lib/lua/ldebug.h \
|
||||
../lib/lua/ldo.h \
|
||||
../lib/lua/lfunc.h \
|
||||
../lib/lua/lgc.h \
|
||||
../lib/lua/llex.h \
|
||||
../lib/lua/llimits.h \
|
||||
../lib/lua/lmem.h \
|
||||
../lib/lua/lobject.h \
|
||||
../lib/lua/lopcodes.h \
|
||||
../lib/lua/lparser.h \
|
||||
../lib/lua/lstate.h \
|
||||
../lib/lua/lstring.h \
|
||||
../lib/lua/ltable.h \
|
||||
../lib/lua/ltm.h \
|
||||
../lib/lua/lua.h \
|
||||
../lib/lua/luaconf.h \
|
||||
../lib/lua/lualib.h \
|
||||
../lib/lua/lundump.h \
|
||||
../lib/lua/lvm.h \
|
||||
../lib/lua/lzio.h \
|
||||
../utils/pack/md5.h \
|
||||
|
||||
SOURCES += ../src/ai.c \
|
||||
../src/base64.c \
|
||||
../src/board.c \
|
||||
../src/collision.c \
|
||||
../src/colour.c \
|
||||
../src/conf.c \
|
||||
../src/economy.c \
|
||||
../src/faction.c \
|
||||
../src/font.c \
|
||||
../src/hook.c \
|
||||
../src/input.c \
|
||||
../src/joystick.c \
|
||||
../src/land.c \
|
||||
../src/lephisto.c \
|
||||
../src/lfile.c \
|
||||
../src/llua.c \
|
||||
../src/llua_space.c \
|
||||
../src/ltime.c \
|
||||
../src/map.c \
|
||||
../src/md5.c \
|
||||
../src/menu.c \
|
||||
../src/misn_lua.c \
|
||||
../src/mission.c \
|
||||
../src/music.c \
|
||||
../src/nebulae.c \
|
||||
../src/opengl.c \
|
||||
../src/outfit.c \
|
||||
../src/pack.c \
|
||||
../src/pause.c \
|
||||
../src/perlin.c \
|
||||
../src/physics.c \
|
||||
../src/pilot.c \
|
||||
../src/plasmaf.c \
|
||||
../src/player.c \
|
||||
../src/rng.c \
|
||||
../src/save.c \
|
||||
../src/ship.c \
|
||||
../src/sound.c \
|
||||
../src/space.c \
|
||||
../src/spfx.c \
|
||||
../src/toolkit.c \
|
||||
../src/weapon.c \
|
||||
../lib/lua/lapi.c \
|
||||
../lib/lua/lauxlib.c \
|
||||
../lib/lua/lbaselib.c \
|
||||
../lib/lua/lcode.c \
|
||||
../lib/lua/ldblib.c \
|
||||
../lib/lua/ldebug.c \
|
||||
../lib/lua/ldo.c \
|
||||
../lib/lua/ldump.c \
|
||||
../lib/lua/lfunc.c \
|
||||
../lib/lua/lgc.c \
|
||||
../lib/lua/linit.c \
|
||||
../lib/lua/liolib.c \
|
||||
../lib/lua/llex.c \
|
||||
../lib/lua/lmathlib.c \
|
||||
../lib/lua/lmem.c \
|
||||
../lib/lua/loadlib.c \
|
||||
../lib/lua/lobject.c \
|
||||
../lib/lua/lopcodes.c \
|
||||
../lib/lua/loslib.c \
|
||||
../lib/lua/lparser.c \
|
||||
../lib/lua/lstate.c \
|
||||
../lib/lua/lstring.c \
|
||||
../lib/lua/lstrlib.c \
|
||||
../lib/lua/ltable.c \
|
||||
../lib/lua/ltablib.c \
|
||||
../lib/lua/ltm.c \
|
||||
../lib/lua/lua.c \
|
||||
../lib/lua/luac.c \
|
||||
../lib/lua/lundump.c \
|
||||
../lib/lua/lvm.c \
|
||||
../lib/lua/lzio.c \
|
||||
../utils/mkspr/main.c \
|
||||
../utils/pack/main.c \
|
||||
../utils/pack/md5.c
|
||||
|
||||
linux {
|
||||
LIBS += \
|
||||
-lSDL \
|
||||
-lSDL_config \
|
||||
-lSDL_mixer \
|
||||
-lSDL_image \
|
||||
-lGL \
|
||||
-L/usr/local/lib -lxml2 \
|
||||
-L/usr/local/lib -freetype \
|
||||
-lpng
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <SDL.h>
|
||||
#include <SDL/SDL.h>
|
||||
|
||||
/* Input types. */
|
||||
typedef enum {
|
||||
|
@ -4,7 +4,7 @@
|
||||
* @brief Handles joystick initialization.
|
||||
*/
|
||||
|
||||
#include <SDL.h>
|
||||
#include <SDL/SDL.h>
|
||||
#include <string.h>
|
||||
#include "lephisto.h"
|
||||
#include "log.h"
|
||||
|
@ -9,7 +9,7 @@
|
||||
* @brief Control the overall game flow: data loading/unloading and game loop.
|
||||
*/
|
||||
|
||||
#include <SDL.h>
|
||||
#include <SDL/SDL.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "lephisto.h"
|
||||
|
20
src/opengl.h
20
src/opengl.h
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
#include <SDL.h>
|
||||
#include <SDL_opengl.h>
|
||||
#include <SDL/SDL.h>
|
||||
#include <SDL/SDL_opengl.h>
|
||||
#include "colour.h"
|
||||
#include "physics.h"
|
||||
|
||||
@ -74,21 +74,21 @@ void gl_freeTexture(glTexture* texture);
|
||||
/* Rendering. */
|
||||
/* Blits a sprite, relative pos. */
|
||||
void gl_blitSprite(const glTexture* sprite, const double bx, const double by,
|
||||
const int sx, const int sy, const glColour* c);
|
||||
const int sx, const int sy, const glColour* c);
|
||||
|
||||
/* Blit a sprite, absolute position. */
|
||||
void gl_blitStaticSprite(const glTexture* sprite,
|
||||
const double bx, const double by,
|
||||
const int sx, const int sy, const glColour* c);
|
||||
const double bx, const double by,
|
||||
const int sx, const int sy, const glColour* c);
|
||||
|
||||
/* Blit a texture scaled, absolure pos. */
|
||||
void gl_blitScale(const glTexture* texture,
|
||||
const double bx, const double by,
|
||||
const double bw, const double bh, const glColour* c);
|
||||
const double bx, const double by,
|
||||
const double bw, const double bh, const glColour* c);
|
||||
|
||||
/* Blit the entire image, absolute pos. */
|
||||
void gl_blitStatic(const glTexture* texture, const double bx, const double by,
|
||||
const glColour* c);
|
||||
const glColour* c);
|
||||
|
||||
/* Bind the camera to a vector. */
|
||||
void gl_bindCamera(const Vec2* pos);
|
||||
@ -96,8 +96,8 @@ void gl_bindCamera(const Vec2* pos);
|
||||
/* Circle drawing. */
|
||||
void gl_drawCircle(const double x, const double y, const double r);
|
||||
void gl_drawCircleInRect(const double x, const double y, const double r,
|
||||
const double rc, const double ry, const double rw,
|
||||
const double rh);
|
||||
const double rc, const double ry, const double rw,
|
||||
const double rh);
|
||||
|
||||
/* Initialize/cleanup. */
|
||||
int gl_init(void);
|
||||
|
@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <SDL.h>
|
||||
#include <SDL/SDL.h>
|
||||
#include "opengl.h"
|
||||
#include "font.h"
|
||||
|
||||
@ -70,9 +70,9 @@ int window_exists(const char* wdwname);
|
||||
unsigned int window_get(const char* wdwname);
|
||||
char* window_getInput(const unsigned int wid, char* name);
|
||||
void window_posWidget(const unsigned int wid,
|
||||
char* name, int* x, int* y);
|
||||
char* name, int* x, int* y);
|
||||
void window_moveWidget(const unsigned int wid,
|
||||
char* name, int x, int y);
|
||||
char* name, int x, int y);
|
||||
/* Specific. */
|
||||
char* toolkit_getList(const unsigned int wid, char* name);
|
||||
int toolkit_getListPos(const unsigned int wid, char* name);
|
||||
|
16
src/xml.h
16
src/xml.h
@ -44,35 +44,35 @@
|
||||
/* Encompassing element. */
|
||||
#define xmlw_startElem(w, str) \
|
||||
if(xmlTextWriterStartElement(w, (xmlChar*)str) < 0) { \
|
||||
ERR("xmlw: Unable to create start element"); return -1; }
|
||||
ERR("xmlw: Unable to create start element"); return -1; }
|
||||
|
||||
#define xmlw_endElem(w) \
|
||||
if(xmlTextWriterEndElement(w) < 0) { \
|
||||
ERR("xmlw: Unable to create end element"); return -1; }
|
||||
ERR("xmlw: Unable to create end element"); return -1; }
|
||||
|
||||
/* Other stuff. */
|
||||
#define xmlw_elem(w, n, str, args...) \
|
||||
if(xmlTextWriterWriteFormatElement(w, (xmlChar*)n, str, ## args) < 0) { \
|
||||
ERR("xmlw: Unable to write format element"); return -1; }
|
||||
ERR("xmlw: Unable to write format element"); return -1; }
|
||||
|
||||
#define xmlw_raw(w,b,l) \
|
||||
if(xmlTextWriterWriteRawLen(w, (xmlChar*)b, l) < 0) { \
|
||||
ERR("xmlw: unable to write raw element"); return -1; }
|
||||
ERR("xmlw: unable to write raw element"); return -1; }
|
||||
|
||||
#define xmlw_attr(w, str, val...) \
|
||||
if(xmlTextWriterWriteFormatAttribute(w, (xmlChar*)str, ## val) < 0) { \
|
||||
ERR("xmlw: Unable to write element attribute"); return -1; }
|
||||
ERR("xmlw: Unable to write element attribute"); return -1; }
|
||||
|
||||
#define xmlw_str(w, str, val...) \
|
||||
if(xmlTextWriterWriteFormatString(w, str, ## val) < 0) { \
|
||||
ERR("xmlw: Unable to write element data"); return -1; }
|
||||
ERR("xmlw: Unable to write element data"); return -1; }
|
||||
|
||||
/* Document level. */
|
||||
#define xmlw_start(w) \
|
||||
if(xmlTextWriterStartDocument(writer, NULL, "UTF-8", NULL) < 0) { \
|
||||
ERR("xmlw: Unable to start document"); return -1; }
|
||||
ERR("xmlw: Unable to start document"); return -1; }
|
||||
|
||||
#define xmlw_done(w) \
|
||||
if(xmlTextWriterEndDocument(w) < 0) { \
|
||||
ERR("xmlw: Unable to end document"); return -1; }
|
||||
ERR("xmlw: Unable to end document"); return -1; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user