@@ -3,7 +3,7 @@ include $(top_srcdir)/lol/build/autotools/common.am | |||||
ACLOCAL_AMFLAGS = -I lol/build/autotools/m4 | ACLOCAL_AMFLAGS = -I lol/build/autotools/m4 | ||||
SUBDIRS = lol roflmao | |||||
SUBDIRS = lol neercs | |||||
test: check | test: check | ||||
@@ -1,47 +0,0 @@ | |||||
# roflmao | |||||
[![Build Status (Travis-CI)](https://travis-ci.org/lolengine/lol-roflmao.svg?branch=master)](https://travis-ci.org/lolengine/lol-roflmao) | |||||
[![Build Status (Semaphore-CI)](https://semaphoreci.com/api/v1/samhocevar/lol-roflmao/branches/master/badge.svg)](https://semaphoreci.com/samhocevar/lol-roflmao) | |||||
`roflmao` is a simple project using Lol Engine. If you want to get | |||||
started with Lol Engine, you may either: | |||||
- fork this project | |||||
- duplicate this project (see [“duplicating a repository”](https://help.github.com/articles/duplicating-a-repository/)) | |||||
## Setup | |||||
Make sure Lol Engine and its submodules are properly initialised: | |||||
git submodule update --init --recursive | |||||
On Linux, make sure the following packages are installed: | |||||
automake autoconf libtool pkg-config | |||||
libglew-dev | |||||
libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev | |||||
## Configure | |||||
The default application is called `roflmao` and lies in its own subdirectory. | |||||
You should rename it to whatever your application will be called. Make sure | |||||
to modify the following files: | |||||
configure.ac | |||||
Makefile.am | |||||
roflmao/Makefile.am | |||||
roflmao/roflmao.cpp | |||||
You can of course have several projects in the same repository. | |||||
## Build | |||||
Then bootstrap the project and configure it: | |||||
./bootstrap | |||||
./configure | |||||
Finally, build the project: | |||||
make | |||||
@@ -2,7 +2,7 @@ dnl | |||||
dnl Configure script for a Lol Engine project | dnl Configure script for a Lol Engine project | ||||
dnl | dnl | ||||
AC_INIT(roflmao, 0.0) | |||||
AC_INIT(neercs, 0.0) | |||||
dnl | dnl | ||||
dnl Standard autoconf setup and tools requirements | dnl Standard autoconf setup and tools requirements | ||||
@@ -18,20 +18,43 @@ AC_PROG_CXX | |||||
AM_PROG_LIBTOOL | AM_PROG_LIBTOOL | ||||
AC_LIBTOOL_CXX | AC_LIBTOOL_CXX | ||||
AC_CONFIG_FILES( | |||||
[Makefile | |||||
roflmao/Makefile | |||||
]) | |||||
dnl | dnl | ||||
dnl Inherit all Lol Engine checks | dnl Inherit all Lol Engine checks | ||||
dnl | dnl | ||||
LOL_AC_SUBPROJECT() | LOL_AC_SUBPROJECT() | ||||
dnl | |||||
dnl Additional checks | |||||
dnl | |||||
PKG_CHECK_MODULES(CACA, caca >= 0.99.beta17) | |||||
dnl Unix-specific libutil | |||||
AC_CHECK_LIB(util, forkpty, | |||||
[UTIL_LIBS="${UTIL_LIBS} -lutil" | |||||
dnl Override future forkpty detection | |||||
ac_cv_func_forkpty="yes"]) | |||||
AC_CHECK_FUNCS(forkpty) | |||||
AC_CHECK_FUNCS(getopt_long) | |||||
AC_CHECK_HEADERS(glob.h endian.h getopt.h) | |||||
AC_CHECK_HEADERS(libutil.h util.h pty.h) | |||||
AC_CHECK_HEADERS(linux/kdev_t.h linux/major.h) | |||||
AC_CHECK_HEADERS(security/pam_appl.h security/pam_misc.h) | |||||
AC_CHECK_HEADERS(pam/pam_appl.h pam/pam_misc.h) | |||||
AC_SUBST(UTIL_LIBS) | |||||
AC_SUBST(PAM_LIBS) | |||||
dnl | dnl | ||||
dnl Perform the actual commands | dnl Perform the actual commands | ||||
dnl | dnl | ||||
AC_CONFIG_FILES( | |||||
[Makefile | |||||
neercs/Makefile | |||||
]) | |||||
AC_OUTPUT | AC_OUTPUT | ||||
@@ -1 +1 @@ | |||||
Subproject commit 99c8c2353e082b20cf8d6f2a5501331dfc2a54ca | |||||
Subproject commit e27698f8ec9a606b6a012f9d33392790905f3728 |
@@ -14,9 +14,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Engine", "Engine", "{1AFD58 | |||||
msbuild\config-build.xml = msbuild\config-build.xml | msbuild\config-build.xml = msbuild\config-build.xml | ||||
EndProjectSection | EndProjectSection | ||||
EndProject | EndProject | ||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "roflmao", "roflmao\roflmao.vcxproj", "{3D02B33D-C348-43C8-AB6A-FB6E6F3C0E7C}" | |||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "neercs", "neercs\neercs.vcxproj", "{3D02B33D-C348-43C8-AB6A-FB6E6F3C0E7C}" | |||||
EndProject | EndProject | ||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Roflmao", "Roflmao", "{03B9D2E1-AFBA-4F66-8DE0-6499C9F9155F}" | |||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Neercs", "Neercs", "{03B9D2E1-AFBA-4F66-8DE0-6499C9F9155F}" | |||||
EndProject | EndProject | ||||
Global | Global | ||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | GlobalSection(SolutionConfigurationPlatforms) = preSolution |
@@ -1,11 +1,7 @@ | |||||
include $(top_srcdir)/build/autotools/common.am | |||||
include $(top_srcdir)/lol/build/autotools/common.am | |||||
if !USE_ANDROID | |||||
if BUILD_NEERCS | |||||
bin_PROGRAMS = neercs | bin_PROGRAMS = neercs | ||||
endif | |||||
endif | |||||
neercs_SOURCES = \ | neercs_SOURCES = \ | ||||
neercs.cpp neercs.h \ | neercs.cpp neercs.h \ | ||||
@@ -1,5 +1,9 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||||
<PropertyGroup Label="LolMacros"> | |||||
<LolDir Condition="Exists('$(SolutionDir)\lol')">$(SolutionDir)\lol</LolDir> | |||||
<LolDir Condition="!Exists('$(SolutionDir)\lol')">$(SolutionDir)\..</LolDir> | |||||
</PropertyGroup> | |||||
<ItemGroup Label="ProjectConfigurations"> | <ItemGroup Label="ProjectConfigurations"> | ||||
<ProjectConfiguration Include="Debug|ORBIS"> | <ProjectConfiguration Include="Debug|ORBIS"> | ||||
<Configuration>Debug</Configuration> | <Configuration>Debug</Configuration> | ||||
@@ -67,17 +71,6 @@ | |||||
<ClCompile Include="video\render.cpp" /> | <ClCompile Include="video\render.cpp" /> | ||||
<ClCompile Include="video\text-render.cpp" /> | <ClCompile Include="video\text-render.cpp" /> | ||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | |||||
<ProjectReference Include="$(SolutionDir)\..\src\lol-core.vcxproj"> | |||||
<Project>{9e62f2fe-3408-4eae-8238-fd84238ceeda}</Project> | |||||
</ProjectReference> | |||||
<ProjectReference Include="$(SolutionDir)\..\src\bullet\lol-bullet.vcxproj"> | |||||
<Project>{83d3b207-c601-4025-8f41-01dedc354661}</Project> | |||||
</ProjectReference> | |||||
<ProjectReference Include="$(SolutionDir)\..\src\lua\lol-lua.vcxproj"> | |||||
<Project>{d84021ca-b233-4e0f-8a52-071b83bbccc4}</Project> | |||||
</ProjectReference> | |||||
</ItemGroup> | |||||
<ItemGroup> | <ItemGroup> | ||||
<LolFxCompile Include="video\simple.lolfx" /> | <LolFxCompile Include="video\simple.lolfx" /> | ||||
<LolFxCompile Include="video\text.lolfx" /> | <LolFxCompile Include="video\text.lolfx" /> | ||||
@@ -92,32 +85,35 @@ | |||||
<LolFxCompile Include="video\mirror.lolfx" /> | <LolFxCompile Include="video\mirror.lolfx" /> | ||||
<LolFxCompile Include="video\radial.lolfx" /> | <LolFxCompile Include="video\radial.lolfx" /> | ||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | |||||
<ProjectReference Include="$(LolDir)\src\lol-core.vcxproj"> | |||||
<Project>{9e62f2fe-3408-4eae-8238-fd84238ceeda}</Project> | |||||
</ProjectReference> | |||||
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-bullet.vcxproj"> | |||||
<Project>{83d3b207-c601-4025-8f41-01dedc354661}</Project> | |||||
</ProjectReference> | |||||
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-lua.vcxproj"> | |||||
<Project>{d84021ca-b233-4e0f-8a52-071b83bbccc4}</Project> | |||||
</ProjectReference> | |||||
</ItemGroup> | |||||
<PropertyGroup Label="Globals"> | <PropertyGroup Label="Globals"> | ||||
<ProjectGuid>{587FCCE9-1D8D-4398-B8B6-E8F4E9A92233}</ProjectGuid> | |||||
<ProjectGuid>{3d02b33d-c348-43c8-ab6a-fb6e6f3c0e7c}</ProjectGuid> | |||||
<ConfigurationType>Application</ConfigurationType> | <ConfigurationType>Application</ConfigurationType> | ||||
<Keyword>Win32Proj</Keyword> | <Keyword>Win32Proj</Keyword> | ||||
</PropertyGroup> | </PropertyGroup> | ||||
<Import Project="$(SolutionDir)\msbuild\lol.config.props" /> | |||||
<Import Project="$(LolDir)\build\msbuild\lol.config.props" /> | |||||
<ImportGroup Label="ExtensionSettings"> | <ImportGroup Label="ExtensionSettings"> | ||||
<Import Project="$(SolutionDir)\msbuild\lolfx.props" /> | |||||
<Import Project="$(LolDir)\build\msbuild\lolfx.props" /> | |||||
</ImportGroup> | </ImportGroup> | ||||
<ImportGroup Label="PropertySheets"> | <ImportGroup Label="PropertySheets"> | ||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||||
<Import Project="$(SolutionDir)\msbuild\lol.vars.props" /> | |||||
<Import Project="$(LolDir)\build\msbuild\lol.vars.props" /> | |||||
</ImportGroup> | </ImportGroup> | ||||
<PropertyGroup Label="UserMacros" /> | <PropertyGroup Label="UserMacros" /> | ||||
<Import Project="$(SolutionDir)\msbuild\lol.rules.props" /> | |||||
<ItemDefinitionGroup> | |||||
<ClCompile> | |||||
<AdditionalIncludeDirectories>$(CacaIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | |||||
</ClCompile> | |||||
<Link> | |||||
<AdditionalDependencies>$(CacaDeps);%(AdditionalDependencies)</AdditionalDependencies> | |||||
<AdditionalLibraryDirectories>$(CacaLibs);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | |||||
</Link> | |||||
</ItemDefinitionGroup> | |||||
<Import Project="$(LolDir)\build\msbuild\lol.rules.props" /> | |||||
<ItemDefinitionGroup /> | |||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||||
<ImportGroup Label="ExtensionTargets"> | <ImportGroup Label="ExtensionTargets"> | ||||
<Import Project="$(SolutionDir)\msbuild\lolfx.targets" /> | |||||
<Import Project="$(LolDir)\build\msbuild\lolfx.targets" /> | |||||
</ImportGroup> | </ImportGroup> | ||||
</Project> | </Project> |
@@ -150,7 +150,7 @@ int parse_conf_line(char *buf, int size, struct screen_list *screen_list) | |||||
char *line = NULL; | char *line = NULL; | ||||
int l = 0; | int l = 0; | ||||
int in_quote = 0, end_spaces = 0; | int in_quote = 0, end_spaces = 0; | ||||
static struct option *prev = NULL; | |||||
static struct option_t *prev = NULL; | |||||
if (size <= 0) | if (size <= 0) | ||||
return -1; | return -1; | ||||
@@ -221,7 +221,7 @@ int parse_conf_line(char *buf, int size, struct screen_list *screen_list) | |||||
} | } | ||||
else | else | ||||
{ | { | ||||
struct option *option = malloc(sizeof(struct option)); | |||||
struct option_t *option = malloc(sizeof(struct option_t)); | |||||
if (!option) | if (!option) | ||||
{ | { | ||||
fprintf(stderr, "Can't allocate memory at %s:%d\n", | fprintf(stderr, "Can't allocate memory at %s:%d\n", | ||||
@@ -247,7 +247,7 @@ int parse_conf_line(char *buf, int size, struct screen_list *screen_list) | |||||
return s; | return s; | ||||
} | } | ||||
int get_key_value(char *line, struct option *option) | |||||
int get_key_value(char *line, struct option_t *option) | |||||
{ | { | ||||
unsigned int i, o = 0, b = 0, end_spaces = 0; | unsigned int i, o = 0, b = 0, end_spaces = 0; | ||||
char *cur = NULL; | char *cur = NULL; | ||||
@@ -350,7 +350,7 @@ struct config_line *get_config(const char *name) | |||||
int fill_config(struct screen_list *screen_list) | int fill_config(struct screen_list *screen_list) | ||||
{ | { | ||||
int i = 0; | int i = 0; | ||||
struct option *option = screen_list->config; | |||||
struct option_t *option = screen_list->config; | |||||
while (option) | while (option) | ||||
{ | { | ||||
@@ -242,7 +242,7 @@ struct screen_list | |||||
long long unsigned int last_switch; /* Cube */ | long long unsigned int last_switch; /* Cube */ | ||||
struct screen **screen; /* Windows */ | struct screen **screen; /* Windows */ | ||||
struct option *config; /* Option parsing and configuration */ | |||||
struct option_t *config; /* Option parsing and configuration */ | |||||
struct sys sys; /* System stuff */ | struct sys sys; /* System stuff */ | ||||
struct recurrent_list *recurrent_list; /* Recurrents functions */ | struct recurrent_list *recurrent_list; /* Recurrents functions */ | ||||
@@ -256,12 +256,12 @@ struct screen_list | |||||
}; | }; | ||||
/* Configuration */ | /* Configuration */ | ||||
struct option | |||||
struct option_t | |||||
{ | { | ||||
char *key; | char *key; | ||||
char *value; | char *value; | ||||
struct option *next; | |||||
struct option_t *next; | |||||
}; | }; | ||||
struct config_line | struct config_line | ||||
{ | { | ||||
@@ -398,7 +398,7 @@ int remove_recurrent(struct recurrent_list *list, int n); | |||||
/* Configuration file */ | /* Configuration file */ | ||||
int read_configuration_file(char *filename, struct screen_list *screen_list); | int read_configuration_file(char *filename, struct screen_list *screen_list); | ||||
int parse_conf_line(char *buf, int size, struct screen_list *screen_list); | int parse_conf_line(char *buf, int size, struct screen_list *screen_list); | ||||
int get_key_value(char *line, struct option *option); | |||||
int get_key_value(char *line, struct option_t *option); | |||||
int fill_config(struct screen_list *screen_list); | int fill_config(struct screen_list *screen_list); | ||||
struct config_line *get_config(const char *name); | struct config_line *get_config(const char *name); | ||||
struct config_line *get_config_option(void); | struct config_line *get_config_option(void); | ||||
@@ -147,7 +147,7 @@ struct screen_list *create_screen_list(void) | |||||
void free_screen_list(struct screen_list *screen_list) | void free_screen_list(struct screen_list *screen_list) | ||||
{ | { | ||||
int i; | int i; | ||||
struct option *option; | |||||
struct option_t *option; | |||||
if (screen_list->dp) | if (screen_list->dp) | ||||
caca_free_display(screen_list->dp); | caca_free_display(screen_list->dp); | ||||
@@ -190,7 +190,7 @@ void free_screen_list(struct screen_list *screen_list) | |||||
while (option) | while (option) | ||||
{ | { | ||||
struct option *kromeugnon = option; | |||||
struct option_t *kromeugnon = option; | |||||
option = option->next; | option = option->next; | ||||
if (kromeugnon->key) | if (kromeugnon->key) | ||||
free(kromeugnon->key); | free(kromeugnon->key); | ||||
@@ -1,2 +0,0 @@ | |||||
roflmao | |||||
*.exe |
@@ -1,10 +0,0 @@ | |||||
include $(top_srcdir)/lol/build/autotools/common.am | |||||
bin_PROGRAMS = roflmao | |||||
roflmao_SOURCES = roflmao.cpp | |||||
roflmao_CPPFLAGS = $(AM_CPPFLAGS) | |||||
roflmao_DEPENDENCIES = @LOL_DEPS@ | |||||
roflmao_LDFLAGS = $(AM_LDFLAGS) | |||||
@@ -1,16 +0,0 @@ | |||||
// | |||||
// Roflmao — Lol Engine Test App | |||||
// | |||||
#if HAVE_CONFIG_H | |||||
# include "config.h" | |||||
#endif | |||||
#include <lol/engine.h> | |||||
int main(int argc, char **argv) | |||||
{ | |||||
lol::System::Init(argc, argv); | |||||
return EXIT_SUCCESS; | |||||
} | |||||
@@ -1,67 +0,0 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||||
<PropertyGroup Label="LolMacros"> | |||||
<LolDir Condition="Exists('$(SolutionDir)\lol')">$(SolutionDir)\lol</LolDir> | |||||
<LolDir Condition="!Exists('$(SolutionDir)\lol')">$(SolutionDir)\..</LolDir> | |||||
</PropertyGroup> | |||||
<ItemGroup Label="ProjectConfigurations"> | |||||
<ProjectConfiguration Include="Debug|ORBIS"> | |||||
<Configuration>Debug</Configuration> | |||||
<Platform>ORBIS</Platform> | |||||
</ProjectConfiguration> | |||||
<ProjectConfiguration Include="Debug|Win32"> | |||||
<Configuration>Debug</Configuration> | |||||
<Platform>Win32</Platform> | |||||
</ProjectConfiguration> | |||||
<ProjectConfiguration Include="Debug|x64"> | |||||
<Configuration>Debug</Configuration> | |||||
<Platform>x64</Platform> | |||||
</ProjectConfiguration> | |||||
<ProjectConfiguration Include="Release|ORBIS"> | |||||
<Configuration>Release</Configuration> | |||||
<Platform>ORBIS</Platform> | |||||
</ProjectConfiguration> | |||||
<ProjectConfiguration Include="Release|Win32"> | |||||
<Configuration>Release</Configuration> | |||||
<Platform>Win32</Platform> | |||||
</ProjectConfiguration> | |||||
<ProjectConfiguration Include="Release|x64"> | |||||
<Configuration>Release</Configuration> | |||||
<Platform>x64</Platform> | |||||
</ProjectConfiguration> | |||||
</ItemGroup> | |||||
<ItemGroup> | |||||
<ClCompile Include="roflmao.cpp" /> | |||||
</ItemGroup> | |||||
<ItemGroup> | |||||
<ProjectReference Include="$(LolDir)\src\lol-core.vcxproj"> | |||||
<Project>{9e62f2fe-3408-4eae-8238-fd84238ceeda}</Project> | |||||
</ProjectReference> | |||||
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-bullet.vcxproj"> | |||||
<Project>{83d3b207-c601-4025-8f41-01dedc354661}</Project> | |||||
</ProjectReference> | |||||
<ProjectReference Include="$(LolDir)\src\3rdparty\lol-lua.vcxproj"> | |||||
<Project>{d84021ca-b233-4e0f-8a52-071b83bbccc4}</Project> | |||||
</ProjectReference> | |||||
</ItemGroup> | |||||
<PropertyGroup Label="Globals"> | |||||
<ProjectGuid>{3d02b33d-c348-43c8-ab6a-fb6e6f3c0e7c}</ProjectGuid> | |||||
<ConfigurationType>Application</ConfigurationType> | |||||
<Keyword>Win32Proj</Keyword> | |||||
</PropertyGroup> | |||||
<Import Project="$(LolDir)\build\msbuild\lol.config.props" /> | |||||
<ImportGroup Label="ExtensionSettings"> | |||||
<Import Project="$(LolDir)\build\msbuild\lolfx.props" /> | |||||
</ImportGroup> | |||||
<ImportGroup Label="PropertySheets"> | |||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | |||||
<Import Project="$(LolDir)\build\msbuild\lol.vars.props" /> | |||||
</ImportGroup> | |||||
<PropertyGroup Label="UserMacros" /> | |||||
<Import Project="$(LolDir)\build\msbuild\lol.rules.props" /> | |||||
<ItemDefinitionGroup /> | |||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | |||||
<ImportGroup Label="ExtensionTargets"> | |||||
<Import Project="$(LolDir)\build\msbuild\lolfx.targets" /> | |||||
</ImportGroup> | |||||
</Project> |