Ticket #8763: plugin-v1.patch
File plugin-v1.patch, 6.0 KB (added by , 17 years ago) |
---|
-
configure
1183 1183 BUILD_PLUGINS := 1 1184 1184 PLUGIN_PREFIX := lib 1185 1185 PLUGIN_SUFFIX := .so 1186 PLUGIN_EXTRA_DEPS = $(EXECUTABLE)1186 PLUGIN_EXTRA_DEPS = 1187 1187 CXXFLAGS += -DDYNAMIC_MODULES 1188 1188 CXXFLAGS += -fpic 1189 1189 PLUGIN_LDFLAGS += -shared … … 1201 1201 BUILD_PLUGINS := 1 1202 1202 PLUGIN_PREFIX := lib 1203 1203 PLUGIN_SUFFIX := .so 1204 PLUGIN_EXTRA_DEPS = $(EXECUTABLE)1204 PLUGIN_EXTRA_DEPS = 1205 1205 CXXFLAGS += -DDYNAMIC_MODULES 1206 1206 CXXFLAGS += -fpic 1207 1207 PLUGIN_LDFLAGS += -shared … … 1237 1237 PLUGIN_SUFFIX := .dll 1238 1238 PLUGIN_EXTRA_DEPS = $(EXECUTABLE) 1239 1239 CXXFLAGS += -DDYNAMIC_MODULES 1240 PLUGIN_LDFLAGS := -shared ./libscummvm.a $(LIBS) $(LDFLAGS)1240 PLUGIN_LDFLAGS := -shared ./libscummvm.a 1241 1241 PRE_OBJS_FLAGS := -Wl,--whole-archive 1242 1242 POST_OBJS_FLAGS := -Wl,--export-all-symbols -Wl,--no-whole-archive -Wl,--out-implib,./libscummvm.a 1243 1243 ' -
engines/scumm/smush/smush_player.cpp
59 59 #include <png.h> 60 60 #endif 61 61 62 #ifdef USE_ZLIB 63 #include <zlib.h> 64 #endif 62 #include "common/zlib.h" 65 63 66 64 namespace Scumm { 67 65 … … 820 818 821 819 unsigned long decompressedSize = READ_BE_UINT32(chunkBuffer); 822 820 byte *fobjBuffer = (byte *)malloc(decompressedSize); 823 int result = uncompress(fobjBuffer, &decompressedSize, chunkBuffer + 4, chunkSize - 4);824 if (result != Z_OK)821 int result = Common::uncompress(fobjBuffer, &decompressedSize, chunkBuffer + 4, chunkSize - 4); 822 if (result != Common::ZLIB_OK) 825 823 error("SmushPlayer::handleZlibFrameObject() Zlib uncompress error"); 826 824 free(chunkBuffer); 827 825 -
engines/scumm/module.mk
116 116 # This module can be built as a plugin 117 117 ifdef BUILD_PLUGINS 118 118 PLUGIN := 1 119 # HACK HACK evil HACK HACK120 PLUGIN_LDFLAGS += -lz121 119 endif 122 120 123 121 # Include common rules -
engines/agos/res.cpp
32 32 #include "agos/intern.h" 33 33 #include "agos/sound.h" 34 34 35 #include "common/zlib.h" 35 36 36 #ifdef USE_ZLIB37 #include <zlib.h>38 #endif39 40 37 using Common::File; 41 38 42 39 namespace AGOS { … … 77 74 error("decompressData: Read failed"); 78 75 79 76 unsigned long decompressedSize = dstSize; 80 int result = uncompress(dst, &decompressedSize, srcBuffer, srcSize);81 if (result != Z_OK)77 int result = Common::uncompress(dst, &decompressedSize, srcBuffer, srcSize); 78 if (result != Common::ZLIB_OK) 82 79 error("decompressData: Zlib uncompress error"); 83 80 free(srcBuffer); 84 81 } else { -
common/zlib.cpp
1 /* ScummVM - Graphic Adventure Engine 2 * 3 * ScummVM is the legal property of its developers, whose names 4 * are too numerous to list here. Please refer to the COPYRIGHT 5 * file distributed with this source distribution. 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 * $URL$ 22 * $Id$ 23 */ 24 25 #include "common/zlib.h" 26 27 #if defined(USE_ZLIB) 28 #include <zlib.h> 29 30 namespace Common { 31 32 int uncompress(byte *dst, unsigned long *dstLen, const byte *src, unsigned long srcLen) { 33 return ::uncompress(dst, dstLen, src, srcLen); 34 } 35 36 } // end of namespace Common 37 38 #endif 39 -
common/module.mk
13 13 stream.o \ 14 14 util.o \ 15 15 system.o \ 16 unzip.o 16 unzip.o \ 17 zlib.o 17 18 18 19 # Include common rules 19 20 include $(srcdir)/rules.mk -
common/zlib.h
1 /* ScummVM - Graphic Adventure Engine 2 * 3 * ScummVM is the legal property of its developers, whose names 4 * are too numerous to list here. Please refer to the COPYRIGHT 5 * file distributed with this source distribution. 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 * $URL$ 22 * $Id$ 23 */ 24 25 #include "common/scummsys.h" 26 27 #if defined(USE_ZLIB) 28 29 #ifndef COMMON_ZLIB_H 30 #define COMMON_ZLIB_H 31 32 #include <zlib.h> 33 34 namespace Common { 35 36 enum { 37 ZLIB_OK = Z_OK 38 }; 39 40 int uncompress(byte *dst, unsigned long *dstLen, const byte *src, unsigned long srcLen); 41 42 } // end of namespace Common 43 44 #endif 45 46 #endif 47