now load waypoints from memory as well

changed versioning scheme
updated linux makefiles
This commit is contained in:
jeefo 2016-03-13 19:20:25 +03:00
commit a61cd3b021
9 changed files with 20 additions and 44 deletions

View file

@ -28,7 +28,7 @@ LOCAL_SRC_FILES := \
support.cpp \
waypoint.cpp \
LOCAL_CFLAGS += -O2 -DLINUX -D_LINUX -DPOSIX -DHAVE_STDINT_H -D__extern_always_inline=inline -D_strdup=strdup -Dstricmp=strcasecmp -Dstrcmpi=strcasecmp -fno-strict-aliasing -Wall -Werror -Wno-uninitialized -Wno-unused -Wno-switch -Wno-c++11-compat-deprecated-writable-strings
LOCAL_CPPFLAGS += -w -Wno-invalid-offsetof -fno-exceptions -fno-rtti
LOCAL_CFLAGS += -O2 -DLINUX -D_LINUX -DPOSIX -DHAVE_STDINT_H -D__extern_always_inline=inline -D_strdup=strdup -Dstricmp=strcasecmp -Dstrcmpi=strcasecmp -fno-strict-aliasing -Wall -Werror
LOCAL_CPPFLAGS += -w -fno-exceptions -fno-rtti
include $(BUILD_SHARED_LIBRARY)

View file

@ -59,8 +59,8 @@ void Engine::Printf (const char *fmt, ...)
vsnprintf (string, SIZEOF_CHAR (string), TraslateMessage (fmt), ap);
va_end (ap);
strcat (string, "\n");
g_engfuncs.pfnServerPrint (string);
g_engfuncs.pfnServerPrint ("\n");
}
void Engine::ChatPrintf (const char *fmt, ...)

View file

@ -485,12 +485,12 @@ MemoryFile::MF_Unloader MemoryFile::Unloader = NULL;
void InitConfig (void)
{
// assign engine loaders to memoryfile handler
if (MemoryFile::Loader == NULL || MemoryFile::Unloader == NULL)
if (!MemoryFile::Loader && !MemoryFile::Unloader)
{
MemoryFile::Loader = reinterpret_cast <MemoryFile::MF_Loader> (g_engfuncs.pfnLoadFileForMe);
MemoryFile::Unloader = reinterpret_cast <MemoryFile::MF_Unloader> (g_engfuncs.pfnFreeFile);
}
MemoryFile fp;
char line[512];

View file

@ -1056,7 +1056,7 @@ void Waypoint::InitTypes (void)
bool Waypoint::Load (void)
{
File fp (CheckSubfolderFile (), "rb");
MemoryFile fp (CheckSubfolderFile ());
WaypointHeader header;
memset (&header, 0, sizeof (header));