From 8074486a637f8a211170f8ef71565c7e560f1b96 Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Fri, 19 Feb 2016 11:55:33 +0100 Subject: [PATCH] =?UTF-8?q?OSX=20ready,=20encara=20no=20compila.=20Impleme?= =?UTF-8?q?ntaci=C3=B3=20del=20lector=20de=20GIFs=20quasi=20acabada?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .hgignore | 1 + Info.plist | 34 ++ aee.xcodeproj/project.pbxproj | 370 ++++++++++++ .../contents.xcworkspacedata | 7 + .../UserInterfaceState.xcuserstate | Bin 0 -> 24194 bytes .../xcdebugger/Breakpoints_v2.xcbkptlist | 23 + .../xcschemes/aee.xcscheme | 91 +++ .../xcschemes/xcschememanagement.plist | 22 + gif.c | 533 ++++++++++++++++++ jdraw8.cpp | 6 +- jdraw8.h | 6 +- jfile.cpp | 4 +- jfile.h | 4 +- jgame.h | 11 - main.cpp | 8 +- modulesequence.cpp | 3 +- 16 files changed, 1099 insertions(+), 24 deletions(-) create mode 100644 Info.plist create mode 100644 aee.xcodeproj/project.pbxproj create mode 100644 aee.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 aee.xcodeproj/project.xcworkspace/xcuserdata/raimonzamora.xcuserdatad/UserInterfaceState.xcuserstate create mode 100644 aee.xcodeproj/xcuserdata/raimonzamora.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist create mode 100644 aee.xcodeproj/xcuserdata/raimonzamora.xcuserdatad/xcschemes/aee.xcscheme create mode 100644 aee.xcodeproj/xcuserdata/raimonzamora.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100644 gif.c diff --git a/.hgignore b/.hgignore index b8f24d1..b202373 100644 --- a/.hgignore +++ b/.hgignore @@ -10,3 +10,4 @@ Debug/* *.opensdf *.user *.dll +.DS_Store \ No newline at end of file diff --git a/Info.plist b/Info.plist new file mode 100644 index 0000000..4c80a93 --- /dev/null +++ b/Info.plist @@ -0,0 +1,34 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSApplicationCategoryType + public.app-category.arcade-games + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + Copyright © 2016 Raimon Zamora. All rights reserved. + NSPrincipalClass + NSApplication + + diff --git a/aee.xcodeproj/project.pbxproj b/aee.xcodeproj/project.pbxproj new file mode 100644 index 0000000..cd7874b --- /dev/null +++ b/aee.xcodeproj/project.pbxproj @@ -0,0 +1,370 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 02252FB81C764D2E002D1DA1 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02252FB71C764D2E002D1DA1 /* main.cpp */; }; + 02B01D591C767C1700CD186D /* SDL2_image.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 02B01D581C767C1700CD186D /* SDL2_image.framework */; }; + 02B01D5B1C767C2C00CD186D /* SDL2_mixer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 02B01D5A1C767C2C00CD186D /* SDL2_mixer.framework */; }; + 02EA2BEF1C764B3800E5A247 /* SDL2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 02EA2BEE1C764B3800E5A247 /* SDL2.framework */; }; + 02F8247B1C767CE2007AAE83 /* bola.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02F8245D1C767CE2007AAE83 /* bola.cpp */; }; + 02F8247C1C767CE2007AAE83 /* data.jrf in Resources */ = {isa = PBXBuildFile; fileRef = 02F8245F1C767CE2007AAE83 /* data.jrf */; }; + 02F8247D1C767CE2007AAE83 /* engendro.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02F824601C767CE2007AAE83 /* engendro.cpp */; }; + 02F8247E1C767CE2007AAE83 /* jdraw8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02F824631C767CE2007AAE83 /* jdraw8.cpp */; }; + 02F8247F1C767CE2007AAE83 /* jfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02F824651C767CE2007AAE83 /* jfile.cpp */; }; + 02F824801C767CE2007AAE83 /* jgame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02F824671C767CE2007AAE83 /* jgame.cpp */; }; + 02F824811C767CE2007AAE83 /* jinput.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02F824691C767CE2007AAE83 /* jinput.cpp */; }; + 02F824821C767CE2007AAE83 /* jsound.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02F8246B1C767CE2007AAE83 /* jsound.cpp */; }; + 02F824831C767CE2007AAE83 /* mapa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02F8246D1C767CE2007AAE83 /* mapa.cpp */; }; + 02F824841C767CE2007AAE83 /* marcador.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02F8246F1C767CE2007AAE83 /* marcador.cpp */; }; + 02F824851C767CE2007AAE83 /* modulegame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02F824711C767CE2007AAE83 /* modulegame.cpp */; }; + 02F824861C767CE2007AAE83 /* modulesequence.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02F824731C767CE2007AAE83 /* modulesequence.cpp */; }; + 02F824871C767CE2007AAE83 /* momia.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02F824751C767CE2007AAE83 /* momia.cpp */; }; + 02F824881C767CE2007AAE83 /* prota.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02F824771C767CE2007AAE83 /* prota.cpp */; }; + 02F824891C767CE2007AAE83 /* sprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02F824791C767CE2007AAE83 /* sprite.cpp */; }; + 02F8248B1C772310007AAE83 /* gif.c in Sources */ = {isa = PBXBuildFile; fileRef = 02F8248A1C772310007AAE83 /* gif.c */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 02252FB71C764D2E002D1DA1 /* main.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; path = main.cpp; sourceTree = ""; }; + 02B01D581C767C1700CD186D /* SDL2_image.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL2_image.framework; path = ../../../../../Library/Frameworks/SDL2_image.framework; sourceTree = ""; }; + 02B01D5A1C767C2C00CD186D /* SDL2_mixer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL2_mixer.framework; path = ../../../../../Library/Frameworks/SDL2_mixer.framework; sourceTree = ""; }; + 02CF35B91C7649C300180C9F /* aee.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = aee.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 02CF35C71C7649C300180C9F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 02EA2BEE1C764B3800E5A247 /* SDL2.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL2.framework; path = ../../../../../Library/Frameworks/SDL2.framework; sourceTree = ""; }; + 02F8245D1C767CE2007AAE83 /* bola.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = bola.cpp; sourceTree = ""; }; + 02F8245E1C767CE2007AAE83 /* bola.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bola.h; sourceTree = ""; }; + 02F8245F1C767CE2007AAE83 /* data.jrf */ = {isa = PBXFileReference; lastKnownFileType = file; path = data.jrf; sourceTree = ""; }; + 02F824601C767CE2007AAE83 /* engendro.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = engendro.cpp; sourceTree = ""; }; + 02F824611C767CE2007AAE83 /* engendro.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = engendro.h; sourceTree = ""; }; + 02F824621C767CE2007AAE83 /* info.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = info.h; sourceTree = ""; }; + 02F824631C767CE2007AAE83 /* jdraw8.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jdraw8.cpp; sourceTree = ""; }; + 02F824641C767CE2007AAE83 /* jdraw8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jdraw8.h; sourceTree = ""; }; + 02F824651C767CE2007AAE83 /* jfile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jfile.cpp; sourceTree = ""; }; + 02F824661C767CE2007AAE83 /* jfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jfile.h; sourceTree = ""; }; + 02F824671C767CE2007AAE83 /* jgame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jgame.cpp; sourceTree = ""; }; + 02F824681C767CE2007AAE83 /* jgame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jgame.h; sourceTree = ""; }; + 02F824691C767CE2007AAE83 /* jinput.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jinput.cpp; sourceTree = ""; }; + 02F8246A1C767CE2007AAE83 /* jinput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jinput.h; sourceTree = ""; }; + 02F8246B1C767CE2007AAE83 /* jsound.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jsound.cpp; sourceTree = ""; }; + 02F8246C1C767CE2007AAE83 /* jsound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jsound.h; sourceTree = ""; }; + 02F8246D1C767CE2007AAE83 /* mapa.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mapa.cpp; sourceTree = ""; }; + 02F8246E1C767CE2007AAE83 /* mapa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mapa.h; sourceTree = ""; }; + 02F8246F1C767CE2007AAE83 /* marcador.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = marcador.cpp; sourceTree = ""; }; + 02F824701C767CE2007AAE83 /* marcador.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = marcador.h; sourceTree = ""; }; + 02F824711C767CE2007AAE83 /* modulegame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = modulegame.cpp; sourceTree = ""; }; + 02F824721C767CE2007AAE83 /* modulegame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = modulegame.h; sourceTree = ""; }; + 02F824731C767CE2007AAE83 /* modulesequence.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = modulesequence.cpp; sourceTree = ""; }; + 02F824741C767CE2007AAE83 /* modulesequence.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = modulesequence.h; sourceTree = ""; }; + 02F824751C767CE2007AAE83 /* momia.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = momia.cpp; sourceTree = ""; }; + 02F824761C767CE2007AAE83 /* momia.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = momia.h; sourceTree = ""; }; + 02F824771C767CE2007AAE83 /* prota.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = prota.cpp; sourceTree = ""; }; + 02F824781C767CE2007AAE83 /* prota.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = prota.h; sourceTree = ""; }; + 02F824791C767CE2007AAE83 /* sprite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sprite.cpp; sourceTree = ""; }; + 02F8247A1C767CE2007AAE83 /* sprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sprite.h; sourceTree = ""; }; + 02F8248A1C772310007AAE83 /* gif.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = gif.c; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 02CF35B61C7649C300180C9F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 02B01D5B1C767C2C00CD186D /* SDL2_mixer.framework in Frameworks */, + 02B01D591C767C1700CD186D /* SDL2_image.framework in Frameworks */, + 02EA2BEF1C764B3800E5A247 /* SDL2.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 02CF35B01C7649C300180C9F = { + isa = PBXGroup; + children = ( + 02F8248A1C772310007AAE83 /* gif.c */, + 02F8245D1C767CE2007AAE83 /* bola.cpp */, + 02F8245E1C767CE2007AAE83 /* bola.h */, + 02F8245F1C767CE2007AAE83 /* data.jrf */, + 02F824601C767CE2007AAE83 /* engendro.cpp */, + 02F824611C767CE2007AAE83 /* engendro.h */, + 02F824621C767CE2007AAE83 /* info.h */, + 02F824631C767CE2007AAE83 /* jdraw8.cpp */, + 02F824641C767CE2007AAE83 /* jdraw8.h */, + 02F824651C767CE2007AAE83 /* jfile.cpp */, + 02F824661C767CE2007AAE83 /* jfile.h */, + 02F824671C767CE2007AAE83 /* jgame.cpp */, + 02F824681C767CE2007AAE83 /* jgame.h */, + 02F824691C767CE2007AAE83 /* jinput.cpp */, + 02F8246A1C767CE2007AAE83 /* jinput.h */, + 02F8246B1C767CE2007AAE83 /* jsound.cpp */, + 02F8246C1C767CE2007AAE83 /* jsound.h */, + 02252FB71C764D2E002D1DA1 /* main.cpp */, + 02F8246D1C767CE2007AAE83 /* mapa.cpp */, + 02F8246E1C767CE2007AAE83 /* mapa.h */, + 02F8246F1C767CE2007AAE83 /* marcador.cpp */, + 02F824701C767CE2007AAE83 /* marcador.h */, + 02F824711C767CE2007AAE83 /* modulegame.cpp */, + 02F824721C767CE2007AAE83 /* modulegame.h */, + 02F824731C767CE2007AAE83 /* modulesequence.cpp */, + 02F824741C767CE2007AAE83 /* modulesequence.h */, + 02F824751C767CE2007AAE83 /* momia.cpp */, + 02F824761C767CE2007AAE83 /* momia.h */, + 02F824771C767CE2007AAE83 /* prota.cpp */, + 02F824781C767CE2007AAE83 /* prota.h */, + 02F824791C767CE2007AAE83 /* sprite.cpp */, + 02F8247A1C767CE2007AAE83 /* sprite.h */, + 02CF35C71C7649C300180C9F /* Info.plist */, + 02EA2BEE1C764B3800E5A247 /* SDL2.framework */, + 02B01D581C767C1700CD186D /* SDL2_image.framework */, + 02B01D5A1C767C2C00CD186D /* SDL2_mixer.framework */, + 02CF35BA1C7649C300180C9F /* Products */, + ); + sourceTree = ""; + }; + 02CF35BA1C7649C300180C9F /* Products */ = { + isa = PBXGroup; + children = ( + 02CF35B91C7649C300180C9F /* aee.app */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 02CF35B81C7649C300180C9F /* aee */ = { + isa = PBXNativeTarget; + buildConfigurationList = 02CF35CA1C7649C300180C9F /* Build configuration list for PBXNativeTarget "aee" */; + buildPhases = ( + 02CF35B51C7649C300180C9F /* Sources */, + 02CF35B61C7649C300180C9F /* Frameworks */, + 02CF35B71C7649C300180C9F /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = aee; + productName = aee; + productReference = 02CF35B91C7649C300180C9F /* aee.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 02CF35B11C7649C300180C9F /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0720; + ORGANIZATIONNAME = "Raimon Zamora"; + TargetAttributes = { + 02CF35B81C7649C300180C9F = { + CreatedOnToolsVersion = 7.2; + }; + }; + }; + buildConfigurationList = 02CF35B41C7649C300180C9F /* Build configuration list for PBXProject "aee" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 02CF35B01C7649C300180C9F; + productRefGroup = 02CF35BA1C7649C300180C9F /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 02CF35B81C7649C300180C9F /* aee */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 02CF35B71C7649C300180C9F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 02F8247C1C767CE2007AAE83 /* data.jrf in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 02CF35B51C7649C300180C9F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 02F824841C767CE2007AAE83 /* marcador.cpp in Sources */, + 02F824801C767CE2007AAE83 /* jgame.cpp in Sources */, + 02F824881C767CE2007AAE83 /* prota.cpp in Sources */, + 02F824851C767CE2007AAE83 /* modulegame.cpp in Sources */, + 02252FB81C764D2E002D1DA1 /* main.cpp in Sources */, + 02F824831C767CE2007AAE83 /* mapa.cpp in Sources */, + 02F8247D1C767CE2007AAE83 /* engendro.cpp in Sources */, + 02F824871C767CE2007AAE83 /* momia.cpp in Sources */, + 02F824861C767CE2007AAE83 /* modulesequence.cpp in Sources */, + 02F8247B1C767CE2007AAE83 /* bola.cpp in Sources */, + 02F824811C767CE2007AAE83 /* jinput.cpp in Sources */, + 02F8247E1C767CE2007AAE83 /* jdraw8.cpp in Sources */, + 02F8248B1C772310007AAE83 /* gif.c in Sources */, + 02F824821C767CE2007AAE83 /* jsound.cpp in Sources */, + 02F8247F1C767CE2007AAE83 /* jfile.cpp in Sources */, + 02F824891C767CE2007AAE83 /* sprite.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 02CF35C81C7649C300180C9F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + 02CF35C91C7649C300180C9F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + }; + name = Release; + }; + 02CF35CB1C7649C300180C9F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(LOCAL_LIBRARY_DIR)/Frameworks", + ); + HEADER_SEARCH_PATHS = ( + "$(LOCAL_LIBRARY_DIR)/Frameworks/SDL2.framework/headers", + "$(LOCAL_LIBRARY_DIR)/Frameworks/SDL2_image.framework/headers", + "$(LOCAL_LIBRARY_DIR)/Frameworks/SDL2_mixer.framework/headers", + ); + INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.jailers.aee; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 02CF35CC1C7649C300180C9F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(LOCAL_LIBRARY_DIR)/Frameworks", + ); + HEADER_SEARCH_PATHS = ( + "$(LOCAL_LIBRARY_DIR)/Frameworks/SDL2.framework/headers", + "$(LOCAL_LIBRARY_DIR)/Frameworks/SDL2_image.framework/headers", + "$(LOCAL_LIBRARY_DIR)/Frameworks/SDL2_mixer.framework/headers", + ); + INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.jailers.aee; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 02CF35B41C7649C300180C9F /* Build configuration list for PBXProject "aee" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 02CF35C81C7649C300180C9F /* Debug */, + 02CF35C91C7649C300180C9F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 02CF35CA1C7649C300180C9F /* Build configuration list for PBXNativeTarget "aee" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 02CF35CB1C7649C300180C9F /* Debug */, + 02CF35CC1C7649C300180C9F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 02CF35B11C7649C300180C9F /* Project object */; +} diff --git a/aee.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/aee.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..e23a578 --- /dev/null +++ b/aee.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/aee.xcodeproj/project.xcworkspace/xcuserdata/raimonzamora.xcuserdatad/UserInterfaceState.xcuserstate b/aee.xcodeproj/project.xcworkspace/xcuserdata/raimonzamora.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000000000000000000000000000000000000..7fb0dd619a550cda6adf1990e517f7a8851cc97f GIT binary patch literal 24194 zcmdVC30#!b_b`6%eKr<>0R~1EVGst9ZJ1%-2bdWa0a4UcR2pDJluZWQt^3$wW~rHF zi>4sCn`UaZnM-AsEiPG^S(ass?PaU^KhHeO2#VkOzMuc+_j_MTn0cOi&pr3tbIv{6 zy)~_k4Yu}#gp&v(f*8ai4)Mb8!XINJW?0*74K2-MBU);vT5H>F<033=wNo14@u-OQ zmR28x?_9gxn~XvNazVaGiTuzI6orPOXcU8DQ5=d#W>koZP%$b&!%!(IL*-~Vsz8%b zJ(_|V&{Q-HHKHcej9So4bQ`)CEkXCAhtUG`29^v$B8%{XW?92fQ{IMN8pjT5|6^8u?5%QT3m;%cnWUDEw~-e!}IYi_*P8uU3d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7!^ieqrY*WG0tc(mKe*7!;KZjO5+$~t#PLDZsR@1rN)Ph-NsGE-Nt>!ca3L_znVNu zfu=zwwJF>bX^Ju#O=YGEQ>AINX{xEo)M9Ei*-SG`x0&uV-EVr(^ss4_X^pAV^n&RX z(-G5A)0?JGO`n^-FnwvdX!_0^Vb+41FFI3nwpb`m zF18d;EuLQ7QM{mdQSm*+ON*BmKU}=3cujFvad+{y;_bz|iw_nbDLz{KR`K!T_lwUI ze^mTQ@%iF!ioY-ZxdfNEl(?68mUx#8ED0(JDG4hHFNrNlEXgV{mToNFQo5`3VCj+4 zw@W`P{i^hv((g-uD!o+td+A?gu4MztJj=Yxlx6;91Iq%-a?9$a)WwcNd2Sw6Hpwp?4TFHbH{E6*&?DbFi6mKT;6msgeFTs~P2 T + + + + + + + + diff --git a/aee.xcodeproj/xcuserdata/raimonzamora.xcuserdatad/xcschemes/aee.xcscheme b/aee.xcodeproj/xcuserdata/raimonzamora.xcuserdatad/xcschemes/aee.xcscheme new file mode 100644 index 0000000..0937597 --- /dev/null +++ b/aee.xcodeproj/xcuserdata/raimonzamora.xcuserdatad/xcschemes/aee.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/aee.xcodeproj/xcuserdata/raimonzamora.xcuserdatad/xcschemes/xcschememanagement.plist b/aee.xcodeproj/xcuserdata/raimonzamora.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..1141490 --- /dev/null +++ b/aee.xcodeproj/xcuserdata/raimonzamora.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + aee.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 02CF35B81C7649C300180C9F + + primary + + + + + diff --git a/gif.c b/gif.c new file mode 100644 index 0000000..061feae --- /dev/null +++ b/gif.c @@ -0,0 +1,533 @@ +#include +#include +#include +#include + +#define EXTENSION_INTRODUCER 0x21 +#define IMAGE_DESCRIPTOR 0x2C +#define TRAILER 0x3B + +#define GRAPHIC_CONTROL 0xF9 +#define APPLICATION_EXTENSION 0xFF +#define COMMENT_EXTENSION 0xFE +#define PLAINTEXT_EXTENSION 0x01 + +typedef struct +{ + unsigned short width; + unsigned short height; + unsigned char fields; + unsigned char background_color_index; + unsigned char pixel_aspect_ratio; +} +screen_descriptor_t; + +typedef struct +{ + unsigned char r; + unsigned char g; + unsigned char b; +} +rgb; + +typedef struct +{ + unsigned short image_left_position; + unsigned short image_top_position; + unsigned short image_width; + unsigned short image_height; + unsigned char fields; +} +image_descriptor_t; + +typedef struct +{ + unsigned char byte; + int prev; + int len; +} +dictionary_entry_t; + +typedef struct +{ + unsigned char extension_code; + unsigned char block_size; +} +extension_t; + +typedef struct +{ + unsigned char fields; + unsigned short delay_time; + unsigned char transparent_color_index; +} +graphic_control_extension_t; + +typedef struct +{ + unsigned char application_id[ 8 ]; + unsigned char version[ 3 ]; +} +application_extension_t; + +typedef struct +{ + unsigned short left; + unsigned short top; + unsigned short width; + unsigned short height; + unsigned char cell_width; + unsigned char cell_height; + unsigned char foreground_color; + unsigned char background_color; +} +plaintext_extension_t; + +static unsigned short width = 0; +static unsigned short height = 0; +static unsigned char* uncompressed_data = NULL; + +void uncompress( int code_length, + const unsigned char *input, + int input_length, + unsigned char *out ) +{ + //int maxbits; + int i, bit; + int code, prev = -1; + dictionary_entry_t *dictionary; + int dictionary_ind; + unsigned int mask = 0x01; + int reset_code_length; + int clear_code; // This varies depending on code_length + int stop_code; // one more than clear code + int match_len; + + clear_code = 1 << ( code_length ); + stop_code = clear_code + 1; + // To handle clear codes + reset_code_length = code_length; + + // Create a dictionary large enough to hold "code_length" entries. + // Once the dictionary overflows, code_length increases + dictionary = ( dictionary_entry_t * ) + malloc( sizeof( dictionary_entry_t ) * ( 1 << ( code_length + 1 ) ) ); + + // Initialize the first 2^code_len entries of the dictionary with their + // indices. The rest of the entries will be built up dynamically. + + // Technically, it shouldn't be necessary to initialize the + // dictionary. The spec says that the encoder "should output a + // clear code as the first code in the image data stream". It doesn't + // say must, though... + for ( dictionary_ind = 0; + dictionary_ind < ( 1 << code_length ); + dictionary_ind++ ) + { + dictionary[ dictionary_ind ].byte = dictionary_ind; + // XXX this only works because prev is a 32-bit int (> 12 bits) + dictionary[ dictionary_ind ].prev = -1; + dictionary[ dictionary_ind ].len = 1; + } + + // 2^code_len + 1 is the special "end" code; don't give it an entry here + dictionary_ind++; + dictionary_ind++; + + // TODO verify that the very last byte is clear_code + 1 + while ( input_length ) + { + code = 0x0; + // Always read one more bit than the code length + for ( i = 0; i < ( code_length + 1 ); i++ ) + { + // This is different than in the file read example; that + // was a call to "next_bit" + bit = ( *input & mask ) ? 1 : 0; + mask <<= 1; + + if ( mask == 0x100 ) + { + mask = 0x01; + input++; + input_length--; + } + + code = code | ( bit << i ); + } + + if ( code == clear_code ) + { + code_length = reset_code_length; + dictionary = ( dictionary_entry_t * ) realloc( dictionary, + sizeof( dictionary_entry_t ) * ( 1 << ( code_length + 1 ) ) ); + + for ( dictionary_ind = 0; + dictionary_ind < ( 1 << code_length ); + dictionary_ind++ ) + { + dictionary[ dictionary_ind ].byte = dictionary_ind; + // XXX this only works because prev is a 32-bit int (> 12 bits) + dictionary[ dictionary_ind ].prev = -1; + dictionary[ dictionary_ind ].len = 1; + } + dictionary_ind++; + dictionary_ind++; + prev = -1; + continue; + } + else if ( code == stop_code ) + { + if ( input_length > 1 ) + { + fprintf( stderr, "Malformed GIF (early stop code)\n" ); + exit( 0 ); + } + break; + } + + // Update the dictionary with this character plus the _entry_ + // (character or string) that came before it + if ( ( prev > -1 ) && ( code_length < 12 ) ) + { + if ( code > dictionary_ind ) + { + fprintf( stderr, "code = %.02x, but dictionary_ind = %.02x\n", + code, dictionary_ind ); + exit( 0 ); + } + + // Special handling for KwKwK + if ( code == dictionary_ind ) + { + int ptr = prev; + + while ( dictionary[ ptr ].prev != -1 ) + { + ptr = dictionary[ ptr ].prev; + } + dictionary[ dictionary_ind ].byte = dictionary[ ptr ].byte; + } + else + { + int ptr = code; + while ( dictionary[ ptr ].prev != -1 ) + { + ptr = dictionary[ ptr ].prev; + } + dictionary[ dictionary_ind ].byte = dictionary[ ptr ].byte; + } + + dictionary[ dictionary_ind ].prev = prev; + + dictionary[ dictionary_ind ].len = dictionary[ prev ].len + 1; + + dictionary_ind++; + + // GIF89a mandates that this stops at 12 bits + if ( ( dictionary_ind == ( 1 << ( code_length + 1 ) ) ) && + ( code_length < 11 ) ) + { + code_length++; + + dictionary = ( dictionary_entry_t * ) realloc( dictionary, + sizeof( dictionary_entry_t ) * ( 1 << ( code_length + 1 ) ) ); + } + } + + prev = code; + + // Now copy the dictionary entry backwards into "out" + match_len = dictionary[ code ].len; + while ( code != -1 ) + { + out[ dictionary[ code ].len - 1 ] = dictionary[ code ].byte; + if ( dictionary[ code ].prev == code ) + { + fprintf( stderr, "Internal error; self-reference." ); + exit( 0 ); + } + code = dictionary[ code ].prev; + } + + out += match_len; + } +} + +static int read_sub_blocks( FILE* gif_file, unsigned char **data ) +{ + int data_length; + int index; + unsigned char block_size; + + // Everything following are data sub-blocks, until a 0-sized block is + // encountered. + data_length = 0; + *data = NULL; + index = 0; + + while ( 1 ) + { + if ( fread( &block_size, 1, 1, gif_file ) < 1 ) + { + perror( "Invalid GIF file (too short): " ); + return -1; + } + + if ( block_size == 0 ) // end of sub-blocks + { + break; + } + + data_length += block_size; + *data = realloc( *data, data_length ); + + // TODO this could be split across block size boundaries + if ( fread( *data + index, 1, block_size, gif_file ) < + block_size ) + { + perror( "Invalid GIF file (too short): " ); + return -1; + } + + index += block_size; + } + + return data_length; +} + +static int process_image_descriptor( FILE* gif_file, + rgb *gct, + int gct_size, + int resolution_bits ) +{ + image_descriptor_t image_descriptor; + int disposition; + int compressed_data_length; + unsigned char *compressed_data = NULL; + unsigned char lzw_code_size; + int uncompressed_data_length = 0; + //unsigned char *uncompressed_data = NULL; + + // TODO there could actually be lots of these + if ( fread( &image_descriptor, 1, 9, gif_file ) < 9 ) + { + perror( "Invalid GIF file (too short)" ); + disposition = 0; + goto done; + } + + // TODO if LCT = true, read the LCT + + disposition = 1; + + if ( fread( &lzw_code_size, 1, 1, gif_file ) < 1 ) + { + perror( "Invalid GIF file (too short): " ); + disposition = 0; + goto done; + } + + compressed_data_length = read_sub_blocks( gif_file, &compressed_data ); + + width = image_descriptor.image_width; + height = image_descriptor.image_height; + uncompressed_data_length = image_descriptor.image_width * + image_descriptor.image_height; + uncompressed_data = malloc( uncompressed_data_length ); + + uncompress( lzw_code_size, compressed_data, compressed_data_length, + uncompressed_data ); + +done: + if ( compressed_data ) + free( compressed_data ); + + //if ( uncompressed_data ) + // free( uncompressed_data ); + + return disposition; +} + +static int process_extension( FILE* gif_file ) +{ + extension_t extension; + graphic_control_extension_t gce; + application_extension_t application; + plaintext_extension_t plaintext; + unsigned char *extension_data = NULL; + int extension_data_length; + + if ( fread( &extension, 1, 2, gif_file ) < 2 ) + { + perror( "Invalid GIF file (too short): " ); + return 0; + } + + switch ( extension.extension_code ) + { + case GRAPHIC_CONTROL: + if ( fread( &gce, 1, 4, gif_file ) < 4 ) + { + perror( "Invalid GIF file (too short): " ); + return 0; + } + + break; + case APPLICATION_EXTENSION: + if ( fread( &application, 1, 11, gif_file ) < 11 ) + { + perror( "Invalid GIF file (too short): " ); + return 0; + } + break; + case 0xFE: + // comment extension; do nothing - all the data is in the + // sub-blocks that follow. + break; + case 0x01: + if ( fread( &plaintext, 1, 12, gif_file ) < 12 ) + { + perror( "Invalid GIF file (too short): " ); + return 0; + } + break; + default: + fprintf( stderr, "Unrecognized extension code.\n" ); + exit( 0 ); + } + + // All extensions are followed by data sub-blocks; even if it's + // just a single data sub-block of length 0 + extension_data_length = read_sub_blocks( gif_file, &extension_data ); + + if ( extension_data != NULL ) + free( extension_data ); + + return 1; +} + +/** + * @param gif_file the file descriptor of a file containing a + * GIF-encoded file. This should point to the first byte in + * the file when invoked. + */ +static void process_gif_stream( FILE* gif_file ) +{ + unsigned char header[ 7 ]; + screen_descriptor_t screen_descriptor; + int color_resolution_bits; + + int global_color_table_size =0; // number of entries in global_color_table + rgb *global_color_table = NULL; + + unsigned char block_type = 0x0; + + // A GIF file starts with a Header (section 17) + if ( fread( header, 1, 6, gif_file ) != 6 ) + { + perror( "Invalid GIF file (too short)" ); + return; + } + header[ 6 ] = 0x0; + + // XXX there's another format, GIF87a, that you may still find + // floating around. + if ( strcmp( "GIF89a", (char*)header ) ) + { + fprintf( stderr, + "Invalid GIF file (header is '%s', should be 'GIF89a')\n", + header ); + return; + } + + // Followed by a logical screen descriptor + // Note that this works because GIFs specify little-endian order; on a + // big-endian machine, the height & width would need to be reversed. + + // Can't use sizeof here since GCC does byte alignment; + // sizeof( screen_descriptor_t ) = 8! + if ( fread( &screen_descriptor, 1, 7, gif_file ) < 7 ) + { + perror( "Invalid GIF file (too short)" ); + return; + } + + color_resolution_bits = ( ( screen_descriptor.fields & 0x70 ) >> 4 ) + 1; + + if ( screen_descriptor.fields & 0x80 ) + { + //int i; + // If bit 7 is set, the next block is a global color table; read it + global_color_table_size = 1 << + ( ( ( screen_descriptor.fields & 0x07 ) + 1 ) ); + + global_color_table = ( rgb * ) malloc( 3 * global_color_table_size ); + + // XXX this could conceivably return a short count... + if ( fread( global_color_table, 1, 3 * global_color_table_size, gif_file ) < + 3 * global_color_table_size ) + { + perror( "Unable to read global color table" ); + return; + } + } + + while ( block_type != TRAILER ) + { + if ( fread( &block_type, 1, 1, gif_file ) < 1 ) + { + perror( "Invalid GIF file (too short)" ); + return; + } + + switch ( block_type ) + { + case IMAGE_DESCRIPTOR: + if ( !process_image_descriptor( gif_file, + global_color_table, + global_color_table_size, + color_resolution_bits ) ) + { + return; + } + break; + case EXTENSION_INTRODUCER: + if ( !process_extension( gif_file ) ) + { + return; + } + break; + case TRAILER: + break; + default: + fprintf( stderr, "Bailing on unrecognized block type %.02x\n", + block_type ); + return; + } + } +} + + +int main( int argc, char *argv[] ) +{ + FILE* gif_file; + + if ( argc < 2 ) + { + fprintf( stderr, "Usage: %s \n", argv[ 0 ] ); + exit( 0 ); + } + + gif_file = fopen( argv[ 1 ], "rb" ); + + if ( gif_file == NULL ) + { + fprintf( stderr, "Unable to open file '%s'", argv[ 1 ] ); + perror( ": " ); + } + + process_gif_stream( gif_file ); + + fclose( gif_file ); +} diff --git a/jdraw8.cpp b/jdraw8.cpp index 2cca36f..e2ea80f 100755 --- a/jdraw8.cpp +++ b/jdraw8.cpp @@ -19,7 +19,7 @@ SDL_Window* sdlWindow = NULL; SDL_Renderer* sdlRenderer = NULL; SDL_Texture* sdlTexture = NULL; -void JD8_Init(char *title) { +void JD8_Init(const char *title) { screen = (JD8_Surface)calloc( 1, 64000 ); main_palette = (JD8_Palette)calloc( 1, 768 ); pixel_data = (Uint32*)calloc(1, 320 * 200 * 4); // 1048576 ); @@ -50,7 +50,7 @@ JD8_Surface JD8_NewSurface() { return surface; } -JD8_Surface JD8_LoadSurface(char *file) { +JD8_Surface JD8_LoadSurface(const char *file) { int filesize = 0; char *buffer = JF_GetBufferFromResource(file, filesize); @@ -71,7 +71,7 @@ JD8_Surface JD8_LoadSurface(char *file) { return image; } -JD8_Palette JD8_LoadPalette(char *file) { +JD8_Palette JD8_LoadPalette(const char *file) { int filesize = 0; char *buffer = NULL; buffer = JF_GetBufferFromResource(file, filesize); diff --git a/jdraw8.h b/jdraw8.h index 7005a2f..8e83462 100755 --- a/jdraw8.h +++ b/jdraw8.h @@ -10,7 +10,7 @@ struct Color { typedef Uint8* JD8_Surface; typedef Color* JD8_Palette; -void JD8_Init(char *title); +void JD8_Init(const char *title); void JD8_Quit(); @@ -18,9 +18,9 @@ void JD8_ClearScreen(Uint8 color); JD8_Surface JD8_NewSurface(); -JD8_Surface JD8_LoadSurface(char *file); +JD8_Surface JD8_LoadSurface(const char *file); -JD8_Palette JD8_LoadPalette(char *file); +JD8_Palette JD8_LoadPalette(const char *file); void JD8_SetScreenPalette(JD8_Palette palette); diff --git a/jfile.cpp b/jfile.cpp index b3f4c3a..57b7c3f 100755 --- a/jfile.cpp +++ b/jfile.cpp @@ -30,7 +30,7 @@ struct DATA_File { const char *resourceFileName = "data.jrf"; DATA_File *data_file = NULL; -void JF_SetResourceFile(char *p_resourceFileName) { +void JF_SetResourceFile(const char *p_resourceFileName) { resourceFileName = p_resourceFileName; } @@ -56,7 +56,7 @@ void JF_GetDataFile() { fd.close(); } -char *JF_GetBufferFromResource(char *resourcename, int& filesize) { +char *JF_GetBufferFromResource(const char *resourcename, int& filesize) { if( data_file == NULL ) { JF_GetDataFile(); diff --git a/jfile.h b/jfile.h index 3f36d29..57155bc 100755 --- a/jfile.h +++ b/jfile.h @@ -1,7 +1,7 @@ #pragma once -void JF_SetResourceFile(char *p_resourceFileName); +void JF_SetResourceFile(const char *p_resourceFileName); -char *JF_GetBufferFromResource(char *resourcename, int& filesize); +char *JF_GetBufferFromResource(const char *resourcename, int& filesize); void JF_Quit(); \ No newline at end of file diff --git a/jgame.h b/jgame.h index b9c86bf..3dc2944 100755 --- a/jgame.h +++ b/jgame.h @@ -1,16 +1,5 @@ #pragma once #include "SDL.h" - -#ifndef NDEBUG - #ifndef DPRINT(text, ...) - #define DPRINT(text, ...) dprintf(__FILE__, __LINE__, text, __VA_ARGS__) - void dprintf(const char* szFile, long lLine, const char* fmt, ...); - #endif -#else // #ifdef NDEBUG - #ifndef DPRINT(text, ...) - #define DPRINT(text, ...) ((void)0) - #endif -#endif void JG_Init(); diff --git a/main.cpp b/main.cpp index c4b4c01..32391f5 100755 --- a/main.cpp +++ b/main.cpp @@ -18,12 +18,16 @@ int main( int argc, char* args[] ) { #else char res_file[255] = ""; strcpy(res_file, dirname(args[0])); - strcat(res_file, "/data.jrf"); +#ifdef __APPLE__ + strcat(res_file, "/../Resources/data.jrf"); +#else + strcat(res_file, "/data.jrf"); +#endif printf("ARXIU DE RECURSOS: %s\n", res_file); JF_SetResourceFile(res_file); #endif - srand( time(NULL) ); + srand( unsigned(time(NULL)) ); JG_Init(); JD8_Init("Aventures En Egipte"); diff --git a/modulesequence.cpp b/modulesequence.cpp index 4d751b6..0e842a9 100755 --- a/modulesequence.cpp +++ b/modulesequence.cpp @@ -63,6 +63,7 @@ int ModuleSequence::Go() { } } + return 0; } const int minim( const int a, const int b ) { @@ -619,7 +620,7 @@ void ModuleSequence::doMenu() { void ModuleSequence::doSlides() { JG_SetUpdateTicks(20); - char* arxiu; + const char* arxiu; if( this->info->num_piramide == 7 ) { if( this->info->diners < 200 ) { arxiu = "intro2.gif";