From 3ca0937c1cc5c229eb07d4e07de2979c0e024e47 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 10 Jan 2010 13:12:34 +0000 Subject: (svn r18769) -Codechange: replace MiniLZO with the real library. If you're using MSVC update openttd-useful, otherwise make sure you've got liblzo2 and it's development files installed. --- src/saveload/saveload.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/saveload') diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp index 2126d54a4..1633e853e 100644 --- a/src/saveload/saveload.cpp +++ b/src/saveload/saveload.cpp @@ -1244,9 +1244,11 @@ static void SlFixPointers() /******************************************* ********** START OF LZO CODE ************** *******************************************/ + +#ifdef WITH_LZO #define LZO_SIZE 8192 -#include "../3rdparty/minilzo/minilzo.h" +#include static size_t ReadLZO() { @@ -1305,6 +1307,8 @@ static void UninitLZO() free(_sl.buf_ori); } +#endif /* WITH_LZO */ + /********************************************* ******** START OF NOCOMP CODE (uncompressed)* *********************************************/ @@ -1596,7 +1600,11 @@ struct SaveLoadFormat { static const SaveLoadFormat _saveload_formats[] = { {"memory", 0, NULL, NULL, NULL, InitMem, WriteMem, UnInitMem}, +#if defined(WITH_LZO) {"lzo", TO_BE32X('OTTD'), InitLZO, ReadLZO, UninitLZO, InitLZO, WriteLZO, UninitLZO}, +#else + {"lzo", TO_BE32X('OTTD'), NULL, NULL, NULL, NULL, NULL, NULL}, +#endif {"none", TO_BE32X('OTTN'), InitNoComp, ReadNoComp, UninitNoComp, InitNoComp, WriteNoComp, UninitNoComp}, #if defined(WITH_ZLIB) {"zlib", TO_BE32X('OTTZ'), InitReadZlib, ReadZlib, UninitReadZlib, InitWriteZlib, WriteZlib, UninitWriteZlib}, -- cgit v1.2.3-70-g09d2