]> git.r.bdr.sh - rbdr/pico-engine/commitdiff
Update project so it compiles main
authorBen Beltran <redacted>
Wed, 27 Jun 2018 20:55:22 +0000 (15:55 -0500)
committerBen Beltran <redacted>
Wed, 27 Jun 2018 20:55:22 +0000 (15:55 -0500)
Used homebrew from SDL and Lua 5.3

18 files changed:
LuaDebugger.cpp
LuaDebugger.h
LuaScript.h
LuaVirtualMachine.cpp
LuaVirtualMachine.h
Pico Engine.xcodeproj/project.pbxproj
Pico Engine.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist [new file with mode: 0644]
Pico Engine.xcodeproj/project.xcworkspace/xcuserdata/benbeltran.xcuserdatad/UserInterfaceState.xcuserstate
Pico Engine.xcodeproj/project.xcworkspace/xcuserdata/rbdr.xcuserdatad/UserInterfaceState.xcuserstate [new file with mode: 0644]
Pico Engine.xcodeproj/xcuserdata/benbeltran.xcuserdatad/xcschemes/Pico-Lua-Test.xcscheme
Pico Engine.xcodeproj/xcuserdata/rbdr.xcuserdatad/xcschemes/xcschememanagement.plist [new file with mode: 0644]
SDLMain.h
SDLMain.m
game_overwatch.cpp
luainc.h
map.cpp
stdafx.h
tilesheet.gif [new file with mode: 0644]

index 18f39092950c09875f4404510b7a8e49002d3260..5e363f1b5ab66c13b7febe851e2f0f4c475de9c1 100644 (file)
@@ -64,7 +64,6 @@ static void LuaHook (lua_State *lua, lua_Debug *ar)
       LuaHookCall (lua);\r
       break;\r
    case LUA_HOOKRET:\r
-   case LUA_HOOKTAILRET:\r
       LuaHookRet (lua);\r
       break;\r
    case LUA_HOOKLINE:\r
@@ -119,4 +118,4 @@ void CLuaDebugger::ErrorRun (int iErrorCode)
    // Get the error string that appears on top of stack when a function\r
    // fails to run\r
    printf ("Error: %s\n", lua_tostring ((lua_State *) m_vm, -1));\r
-}
\ No newline at end of file
+}\r
index a4c764e61edfa87160df5c4958f06ec9a35baf9a..61b77f5ac3a0e7af0e5e594b985977d7d06a2d08 100644 (file)
@@ -15,7 +15,7 @@
 #define __LUA_DEBUGGER_H__\r
 \r
 #include "luainc.h"\r
-#include "luavirtualmachine.h"\r
+#include "LuaVirtualMachine.h"\r
 \r
 enum\r
 {\r
@@ -44,4 +44,4 @@ protected:
 };\r
 \r
 \r
-#endif // __LUA_DEBUGGER_H__
\ No newline at end of file
+#endif // __LUA_DEBUGGER_H__\r
index 96c588c54b2acd231ec51cc7af175ea5f8db44aa..332522929ccfba64b73640593ae5dc12afe705a3 100644 (file)
@@ -16,7 +16,7 @@
 #define __LUA_SCRIPT_BASE_H__\r
 \r
 #include "luainc.h"\r
-#include "luavirtualmachine.h"\r
+#include "LuaVirtualMachine.h"\r
 \r
 class CLuaScript\r
 {\r
@@ -64,4 +64,4 @@ protected:
 };\r
 \r
 \r
-#endif // __LUA_SCRIPT_BASE_H__
\ No newline at end of file
+#endif // __LUA_SCRIPT_BASE_H__\r
index 0ad5096622c30fcc13fe7445ce371961005e7a10..24460a097c14ee82464f63bf9e55208deee8b0f6 100644 (file)
@@ -12,7 +12,7 @@
 // ---------------------------------------------------------------------------\r
 // LIBRARY INCLUDE FILES\r
 #include "luainc.h"\r
-#include "luavirtualmachine.h"\r
+#include "LuaVirtualMachine.h"\r
 #include <assert.h>\r
 #include <string.h>\r
 #include <stdio.h>\r
@@ -129,7 +129,7 @@ bool CLuaVirtualMachine::InitialiseVM (void)
    // Open Lua!\r
    if (Ok ()) DestroyVM ();\r
 \r
-   m_pState = lua_open ();\r
+   m_pState = luaL_newstate ();\r
 \r
    if (m_pState) \r
    {\r
index 61cf65b07e0c14b28bf159f7fb241513474e0ff6..8d42dfff3f71f4c6ccf188eb9fa82d9383b6bc17 100644 (file)
@@ -15,7 +15,7 @@
 #define __LUA_VIRTUAL_MACHINE_H__\r
 \r
 #include "luainc.h"\r
-#include "luadebugger.h"\r
+#include "LuaDebugger.h"\r
 \r
 class CLuaDebugger;\r
 \r
@@ -54,4 +54,4 @@ protected:
 };\r
 \r
 \r
-#endif // __LUA_VIRTUAL_MACHINE_H__
\ No newline at end of file
+#endif // __LUA_VIRTUAL_MACHINE_H__\r
index 5ae6364304a1571fa7210d2403ba4ed0ef2b0347..fb888fb888f55b6b54e7c9efb36cab80626938f2 100644 (file)
@@ -9,8 +9,6 @@
 /* Begin PBXBuildFile section */
                002F3A2E09D0888800EBEB88 /* SDLMain.m in Sources */ = {isa = PBXBuildFile; fileRef = 002F3A2C09D0888800EBEB88 /* SDLMain.m */; };
                8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
-               8E0441C614FE8379000B923E /* SDL_gfx.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E0441C514FE8379000B923E /* SDL_gfx.framework */; };
-               8E0441C814FE83A8000B923E /* Lua.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E0441C714FE83A8000B923E /* Lua.framework */; };
                8E15FEF41071DB470046A4C4 /* dejavubold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 8E15FEF31071DB470046A4C4 /* dejavubold.ttf */; };
                8E15FEF61071DB5B0046A4C4 /* mappink.bin in Resources */ = {isa = PBXBuildFile; fileRef = 8E15FEF51071DB5B0046A4C4 /* mappink.bin */; };
                8E2005E912FA4E3B00BA92CE /* audio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8E2005E812FA4E3B00BA92CE /* audio.cpp */; };
                8E4BCB2C105F641B0051A838 /* mapweird.bin in Resources */ = {isa = PBXBuildFile; fileRef = 8E4BCB24105F641B0051A838 /* mapweird.bin */; };
                8E5C11CD12E796DA002FED0B /* npc_jumper.lua in Copy Scripts to Folder */ = {isa = PBXBuildFile; fileRef = 8E5C11CC12E796DA002FED0B /* npc_jumper.lua */; };
                8E5D1EAD12E8FF8200AFF51E /* npc_walker.lua in Copy Scripts to Folder */ = {isa = PBXBuildFile; fileRef = 8E5D1EAA12E8FF4100AFF51E /* npc_walker.lua */; };
-               8E5DE9A2140413F900CCD79E /* SDL_image.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E5DE99D140413F900CCD79E /* SDL_image.framework */; };
-               8E5DE9A3140413F900CCD79E /* SDL_mixer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E5DE99E140413F900CCD79E /* SDL_mixer.framework */; };
-               8E5DE9A4140413F900CCD79E /* SDL_ttf.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E5DE99F140413F900CCD79E /* SDL_ttf.framework */; };
-               8E5DE9A5140413F900CCD79E /* SDL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E5DE9A0140413F900CCD79E /* SDL.framework */; };
                8E660B8B109CDE9500DC2D83 /* walkersprite.png in Copy Sprites to Folder */ = {isa = PBXBuildFile; fileRef = 8E660B8A109CDE9500DC2D83 /* walkersprite.png */; };
                8E662C1F14E8E09800E9CD0E /* tilesheet.png in Copy Sprites to Folder */ = {isa = PBXBuildFile; fileRef = 8E662C1D14E8DBE600E9CD0E /* tilesheet.png */; };
                8E6682E6118E22A200E1FC0A /* map2.bin in Resources */ = {isa = PBXBuildFile; fileRef = 8E6682E5118E22A200E1FC0A /* map2.bin */; };
                8EBF903212E8C8BC00A5D281 /* LuaScript.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8EBF902C12E8C8BC00A5D281 /* LuaScript.cpp */; };
                8EBF903312E8C8BC00A5D281 /* LuaVirtualMachine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8EBF902F12E8C8BC00A5D281 /* LuaVirtualMachine.cpp */; };
                8EC2FAFC13061BFF00085F6D /* shot.wav in Copy SFX to Folder */ = {isa = PBXBuildFile; fileRef = 8EBF5BF6122DD6D600B7AF64 /* shot.wav */; };
+               8ED18CC7158939D7007091AE /* tilesheet.gif in Resources */ = {isa = PBXBuildFile; fileRef = 8ED18CC6158939D7007091AE /* tilesheet.gif */; };
+               8ED18CC815893A06007091AE /* tilesheet.gif in Copy Sprites to Folder */ = {isa = PBXBuildFile; fileRef = 8ED18CC6158939D7007091AE /* tilesheet.gif */; };
                8EE7BFA912F3A51A00D5C66A /* shot.lua in Copy Scripts to Folder */ = {isa = PBXBuildFile; fileRef = 8EB151C812E964B300122F7F /* shot.lua */; };
                8EEC047412CE07500043F29D /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
                8EEC047512CE07500043F29D /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002F3C0009D093BD00EBEB88 /* OpenGL.framework */; };
+               B556B5B520E42C12007CD29E /* libSDL_image-1.2.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B556B5B420E42C12007CD29E /* libSDL_image-1.2.0.dylib */; };
+               B556B5B720E42C28007CD29E /* libSDL_mixer-1.2.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B556B5B620E42C28007CD29E /* libSDL_mixer-1.2.0.dylib */; };
+               B556B5B920E42C39007CD29E /* libSDL_ttf-2.0.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B556B5B820E42C39007CD29E /* libSDL_ttf-2.0.0.dylib */; };
+               B556B5BB20E42C52007CD29E /* liblua.5.3.4.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B556B5BA20E42C52007CD29E /* liblua.5.3.4.dylib */; };
+               B556B5BD20E42C64007CD29E /* libSDL_gfx.15.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B556B5BC20E42C64007CD29E /* libSDL_gfx.15.dylib */; };
+               B556B5BF20E42CAF007CD29E /* libSDL-1.2.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B556B5BE20E42CAF007CD29E /* libSDL-1.2.0.dylib */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXCopyFilesBuildPhase section */
                        files = (
                                8E660B8B109CDE9500DC2D83 /* walkersprite.png in Copy Sprites to Folder */,
                                8EA9F18A122F15B000759947 /* picosprite.png in Copy Sprites to Folder */,
+                               8ED18CC815893A06007091AE /* tilesheet.gif in Copy Sprites to Folder */,
                                8E662C1F14E8E09800E9CD0E /* tilesheet.png in Copy Sprites to Folder */,
                                8EA9F1F5122F2AEB00759947 /* shotsprite.png in Copy Sprites to Folder */,
                        );
                32CA4F630368D1EE00C91783 /* Pico_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Pico_Prefix.pch; sourceTree = "<group>"; };
                8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
                8D1107320486CEB800E47090 /* Pico Engine.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Pico Engine.app"; sourceTree = BUILT_PRODUCTS_DIR; };
-               8E0441C514FE8379000B923E /* SDL_gfx.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL_gfx.framework; path = ../../../../../../Library/Frameworks/SDL_gfx.framework; sourceTree = "<group>"; };
-               8E0441C714FE83A8000B923E /* Lua.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Lua.framework; path = ../../../../../../Library/Frameworks/Lua.framework; sourceTree = "<group>"; };
                8E15FEF31071DB470046A4C4 /* dejavubold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = dejavubold.ttf; sourceTree = "<group>"; };
                8E15FEF51071DB5B0046A4C4 /* mappink.bin */ = {isa = PBXFileReference; lastKnownFileType = archive.macbinary; path = mappink.bin; sourceTree = "<group>"; };
                8E2005D112FA4E0000BA92CE /* newpicoambient.ogg */ = {isa = PBXFileReference; lastKnownFileType = file; path = newpicoambient.ogg; sourceTree = "<group>"; };
                8E4BCB24105F641B0051A838 /* mapweird.bin */ = {isa = PBXFileReference; lastKnownFileType = archive.macbinary; path = mapweird.bin; sourceTree = "<group>"; };
                8E5C11CC12E796DA002FED0B /* npc_jumper.lua */ = {isa = PBXFileReference; explicitFileType = sourcecode.lua; fileEncoding = 4; lastKnownFileType = text; path = npc_jumper.lua; sourceTree = "<group>"; };
                8E5D1EAA12E8FF4100AFF51E /* npc_walker.lua */ = {isa = PBXFileReference; explicitFileType = sourcecode.lua; fileEncoding = 4; lastKnownFileType = text; path = npc_walker.lua; sourceTree = "<group>"; };
-               8E5DE99D140413F900CCD79E /* SDL_image.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL_image.framework; path = ../../../../../../Library/Frameworks/SDL_image.framework; sourceTree = "<group>"; };
-               8E5DE99E140413F900CCD79E /* SDL_mixer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL_mixer.framework; path = ../../../../../../Library/Frameworks/SDL_mixer.framework; sourceTree = "<group>"; };
-               8E5DE99F140413F900CCD79E /* SDL_ttf.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL_ttf.framework; path = ../../../../../../Library/Frameworks/SDL_ttf.framework; sourceTree = "<group>"; };
-               8E5DE9A0140413F900CCD79E /* SDL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL.framework; path = ../../../../../../Library/Frameworks/SDL.framework; sourceTree = "<group>"; };
                8E660B8A109CDE9500DC2D83 /* walkersprite.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = walkersprite.png; sourceTree = "<group>"; };
                8E662C1D14E8DBE600E9CD0E /* tilesheet.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = tilesheet.png; sourceTree = "<group>"; };
                8E6682E5118E22A200E1FC0A /* map2.bin */ = {isa = PBXFileReference; lastKnownFileType = archive.macbinary; path = map2.bin; sourceTree = "<group>"; };
                8EBF902F12E8C8BC00A5D281 /* LuaVirtualMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LuaVirtualMachine.cpp; sourceTree = "<group>"; };
                8EBF903012E8C8BC00A5D281 /* LuaVirtualMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LuaVirtualMachine.h; sourceTree = "<group>"; };
                8EBF906912E8C98E00A5D281 /* luainc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = luainc.h; sourceTree = "<group>"; };
+               8ED18CC6158939D7007091AE /* tilesheet.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = tilesheet.gif; sourceTree = "<group>"; };
+               B556B5B420E42C12007CD29E /* libSDL_image-1.2.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libSDL_image-1.2.0.dylib"; path = "../../../../../usr/local/Cellar/sdl_image/1.2.12_7/lib/libSDL_image-1.2.0.dylib"; sourceTree = "<group>"; };
+               B556B5B620E42C28007CD29E /* libSDL_mixer-1.2.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libSDL_mixer-1.2.0.dylib"; path = "../../../../../usr/local/Cellar/sdl_mixer/1.2.12_3/lib/libSDL_mixer-1.2.0.dylib"; sourceTree = "<group>"; };
+               B556B5B820E42C39007CD29E /* libSDL_ttf-2.0.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libSDL_ttf-2.0.0.dylib"; path = "../../../../../usr/local/Cellar/sdl_ttf/2.0.11_1/lib/libSDL_ttf-2.0.0.dylib"; sourceTree = "<group>"; };
+               B556B5BA20E42C52007CD29E /* liblua.5.3.4.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = liblua.5.3.4.dylib; path = ../../../../../usr/local/Cellar/lua/5.3.4_4/lib/liblua.5.3.4.dylib; sourceTree = "<group>"; };
+               B556B5BC20E42C64007CD29E /* libSDL_gfx.15.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libSDL_gfx.15.dylib; path = ../../../../../usr/local/Cellar/sdl_gfx/2.0.26/lib/libSDL_gfx.15.dylib; sourceTree = "<group>"; };
+               B556B5BE20E42CAF007CD29E /* libSDL-1.2.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libSDL-1.2.0.dylib"; path = "../../../../../usr/local/Cellar/sdl/1.2.15/lib/libSDL-1.2.0.dylib"; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
                        isa = PBXFrameworksBuildPhase;
                        buildActionMask = 2147483647;
                        files = (
+                               B556B5BF20E42CAF007CD29E /* libSDL-1.2.0.dylib in Frameworks */,
+                               B556B5BD20E42C64007CD29E /* libSDL_gfx.15.dylib in Frameworks */,
+                               B556B5BB20E42C52007CD29E /* liblua.5.3.4.dylib in Frameworks */,
+                               B556B5B920E42C39007CD29E /* libSDL_ttf-2.0.0.dylib in Frameworks */,
+                               B556B5B720E42C28007CD29E /* libSDL_mixer-1.2.0.dylib in Frameworks */,
+                               B556B5B520E42C12007CD29E /* libSDL_image-1.2.0.dylib in Frameworks */,
                                8EEC047412CE07500043F29D /* Cocoa.framework in Frameworks */,
                                8EEC047512CE07500043F29D /* OpenGL.framework in Frameworks */,
-                               8E5DE9A2140413F900CCD79E /* SDL_image.framework in Frameworks */,
-                               8E5DE9A3140413F900CCD79E /* SDL_mixer.framework in Frameworks */,
-                               8E5DE9A4140413F900CCD79E /* SDL_ttf.framework in Frameworks */,
-                               8E5DE9A5140413F900CCD79E /* SDL.framework in Frameworks */,
-                               8E0441C614FE8379000B923E /* SDL_gfx.framework in Frameworks */,
-                               8E0441C814FE83A8000B923E /* Lua.framework in Frameworks */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
                        isa = PBXGroup;
                        children = (
-                               8E0441C714FE83A8000B923E /* Lua.framework */,
-                               8E0441C514FE8379000B923E /* SDL_gfx.framework */,
-                               8E5DE99D140413F900CCD79E /* SDL_image.framework */,
-                               8E5DE99E140413F900CCD79E /* SDL_mixer.framework */,
-                               8E5DE99F140413F900CCD79E /* SDL_ttf.framework */,
-                               8E5DE9A0140413F900CCD79E /* SDL.framework */,
                                1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
                                002F3C0009D093BD00EBEB88 /* OpenGL.framework */,
                        );
                29B97323FDCFA39411CA2CEA /* Frameworks */ = {
                        isa = PBXGroup;
                        children = (
+                               B556B5BE20E42CAF007CD29E /* libSDL-1.2.0.dylib */,
+                               B556B5BC20E42C64007CD29E /* libSDL_gfx.15.dylib */,
+                               B556B5BA20E42C52007CD29E /* liblua.5.3.4.dylib */,
+                               B556B5B820E42C39007CD29E /* libSDL_ttf-2.0.0.dylib */,
+                               B556B5B620E42C28007CD29E /* libSDL_mixer-1.2.0.dylib */,
+                               B556B5B420E42C12007CD29E /* libSDL_image-1.2.0.dylib */,
                                1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
                                1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
                        );
                        isa = PBXGroup;
                        children = (
                                8E662C1D14E8DBE600E9CD0E /* tilesheet.png */,
+                               8ED18CC6158939D7007091AE /* tilesheet.gif */,
                                8EA9F189122F15B000759947 /* picosprite.png */,
                                8EA9F1F4122F2AEB00759947 /* shotsprite.png */,
                                8E660B8A109CDE9500DC2D83 /* walkersprite.png */,
                29B97313FDCFA39411CA2CEA /* Project object */ = {
                        isa = PBXProject;
                        attributes = {
-                               LastUpgradeCheck = 0430;
+                               LastUpgradeCheck = 0450;
                                ORGANIZATIONNAME = "Koala Workshop";
                        };
                        buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Pico Engine" */;
                                8E965FE1123048510056F76F /* map0.bin in Resources */,
                                8E8C972112C095550010C970 /* picolevel1.mp3 in Resources */,
                                8E8C984F12C0A3C20010C970 /* picobg1.png in Resources */,
+                               8ED18CC7158939D7007091AE /* tilesheet.gif in Resources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                        isa = XCBuildConfiguration;
                        buildSettings = {
                                ARCHS = "$(ARCHS_STANDARD_64_BIT)";
+                               COMBINE_HIDPI_IMAGES = YES;
                                COPY_PHASE_STRIP = NO;
                                FRAMEWORK_SEARCH_PATHS = (
                                        "$(inherited)",
                                HEADER_SEARCH_PATHS = (
                                        "$(HOME)/Library/Frameworks/SDL.framework/Headers",
                                        "$(HEADER_SEARCH_PATHS)",
+                                       /usr/local/include/SDL,
+                                       /usr/local/include/lua,
                                );
                                INFOPLIST_FILE = Info.plist;
                                INSTALL_PATH = "$(HOME)/Applications";
+                               LIBRARY_SEARCH_PATHS = (
+                                       "$(inherited)",
+                                       /usr/local/Cellar/sdl_image/1.2.12_7/lib,
+                                       /usr/local/Cellar/sdl_mixer/1.2.12_3/lib,
+                                       /usr/local/Cellar/sdl_ttf/2.0.11_1/lib,
+                                       /usr/local/Cellar/lua/5.3.4_4/lib,
+                                       /usr/local/Cellar/sdl_gfx/2.0.26/lib,
+                                       /usr/local/Cellar/sdl/1.2.15/lib,
+                               );
                                PRODUCT_NAME = "Pico Engine";
                                WRAPPER_EXTENSION = app;
                                ZERO_LINK = YES;
                        isa = XCBuildConfiguration;
                        buildSettings = {
                                ARCHS = "$(ARCHS_STANDARD_64_BIT)";
+                               COMBINE_HIDPI_IMAGES = YES;
                                FRAMEWORK_SEARCH_PATHS = (
                                        "$(inherited)",
                                        "\"$(DEVELOPER_FRAMEWORKS_DIR)\"",
                                GCC_MODEL_TUNING = G5;
                                INFOPLIST_FILE = Info.plist;
                                INSTALL_PATH = "$(HOME)/Applications";
+                               LIBRARY_SEARCH_PATHS = (
+                                       "$(inherited)",
+                                       /usr/local/Cellar/sdl_image/1.2.12_7/lib,
+                                       /usr/local/Cellar/sdl_mixer/1.2.12_3/lib,
+                                       /usr/local/Cellar/sdl_ttf/2.0.11_1/lib,
+                                       /usr/local/Cellar/lua/5.3.4_4/lib,
+                                       /usr/local/Cellar/sdl_gfx/2.0.26/lib,
+                                       /usr/local/Cellar/sdl/1.2.15/lib,
+                               );
                                PRODUCT_NAME = "Pico Engine";
                                WRAPPER_EXTENSION = app;
                        };
diff --git a/Pico Engine.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Pico Engine.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644 (file)
index 0000000..18d9810
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IDEDidComputeMac32BitWarning</key>
+       <true/>
+</dict>
+</plist>
index 429b117c22c61e25d16e96793cf9dd9eeeb83a2f..0514a7eeacefc7504c034d2f477dc11ba1c178b7 100644 (file)
Binary files a/Pico Engine.xcodeproj/project.xcworkspace/xcuserdata/benbeltran.xcuserdatad/UserInterfaceState.xcuserstate and b/Pico Engine.xcodeproj/project.xcworkspace/xcuserdata/benbeltran.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/Pico Engine.xcodeproj/project.xcworkspace/xcuserdata/rbdr.xcuserdatad/UserInterfaceState.xcuserstate b/Pico Engine.xcodeproj/project.xcworkspace/xcuserdata/rbdr.xcuserdatad/UserInterfaceState.xcuserstate
new file mode 100644 (file)
index 0000000..b25c627
Binary files /dev/null and b/Pico Engine.xcodeproj/project.xcworkspace/xcuserdata/rbdr.xcuserdatad/UserInterfaceState.xcuserstate differ
index e2ca1bbbf69efe1706ad12a891084ee9f2177138..622ba984235103ba53cf3e188910f3c1a4fda740 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "0430"
+   LastUpgradeVersion = "0450"
    version = "1.8">
    <BuildAction
       parallelizeBuildables = "YES"
@@ -23,7 +23,7 @@
       </BuildActionEntries>
    </BuildAction>
    <TestAction
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
       shouldUseLaunchSchemeArgsEnv = "YES"
       buildConfiguration = "Debug">
diff --git a/Pico Engine.xcodeproj/xcuserdata/rbdr.xcuserdatad/xcschemes/xcschememanagement.plist b/Pico Engine.xcodeproj/xcuserdata/rbdr.xcuserdatad/xcschemes/xcschememanagement.plist
new file mode 100644 (file)
index 0000000..e6dc535
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>SchemeUserState</key>
+       <dict>
+               <key>Pico Engine.xcscheme</key>
+               <dict>
+                       <key>orderHint</key>
+                       <integer>0</integer>
+               </dict>
+       </dict>
+</dict>
+</plist>
index 4683df57a5e61fc41b189e67245f4a0a32d7552d..ab39046dec9bffec941474a8e779797af04c83bb 100644 (file)
--- a/SDLMain.h
+++ b/SDLMain.h
@@ -1,11 +1,16 @@
 /*   SDLMain.m - main entry point for our Cocoa-ized SDL app
-       Initial Version: Darrell Walisser <dwaliss1@purdue.edu>
-       Non-NIB-Code & other changes: Max Horn <max@quendi.de>
+ Initial Version: Darrell Walisser <dwaliss1@purdue.edu>
+ Non-NIB-Code & other changes: Max Horn <max@quendi.de>
+ Feel free to customize this file to suit your needs
+ */
 
-    Feel free to customize this file to suit your needs
-*/
+#ifndef _SDLMain_h_
+#define _SDLMain_h_
 
 #import <Cocoa/Cocoa.h>
 
 @interface SDLMain : NSObject
 @end
+
+#endif /* _SDLMain_h_ */
index 2931eefd891a58a376ff80cf38168b60f88416e8..830d25e142cee02a5268905997e281d4ff1b559e 100644 (file)
--- a/SDLMain.m
+++ b/SDLMain.m
@@ -5,7 +5,7 @@
  Feel free to customize this file to suit your needs
  */
 
-#include "SDL/SDL.h"
+#include "SDL.h"
 #include "SDLMain.h"
 #include <sys/param.h> /* for MAXPATHLEN */
 #include <unistd.h>
@@ -45,7 +45,7 @@ static NSString *getApplicationName(void)
 {
     const NSDictionary *dict;
     NSString *appName = 0;
-       
+    
     /* Determine the application name */
     dict = (const NSDictionary *)CFBundleGetInfoDictionary(CFBundleGetMainBundle());
     if (dict)
@@ -53,7 +53,7 @@ static NSString *getApplicationName(void)
     
     if (![appName length])
         appName = [[NSProcessInfo processInfo] processName];
-       
+    
     return appName;
 }
 
@@ -105,11 +105,11 @@ static NSString *getApplicationName(void)
     NSRange aRange;
     NSEnumerator *enumerator;
     NSMenuItem *menuItem;
-       
+    
     aRange = [[aMenu title] rangeOfString:@"SDL App"];
     if (aRange.length != 0)
         [aMenu setTitle: [[aMenu title] stringByReplacingRange:aRange with:appName]];
-       
+    
     enumerator = [[aMenu itemArray] objectEnumerator];
     while ((menuItem = [enumerator nextObject]))
     {
@@ -137,31 +137,31 @@ static void setApplicationMenu(void)
     /* Add menu items */
     title = [@"About " stringByAppendingString:appName];
     [appleMenu addItemWithTitle:title action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""];
-       
+    
     [appleMenu addItem:[NSMenuItem separatorItem]];
-       
+    
     title = [@"Hide " stringByAppendingString:appName];
     [appleMenu addItemWithTitle:title action:@selector(hide:) keyEquivalent:@"h"];
-       
+    
     menuItem = (NSMenuItem *)[appleMenu addItemWithTitle:@"Hide Others" action:@selector(hideOtherApplications:) keyEquivalent:@"h"];
     [menuItem setKeyEquivalentModifierMask:(NSAlternateKeyMask|NSCommandKeyMask)];
-       
+    
     [appleMenu addItemWithTitle:@"Show All" action:@selector(unhideAllApplications:) keyEquivalent:@""];
-       
+    
     [appleMenu addItem:[NSMenuItem separatorItem]];
-       
+    
     title = [@"Quit " stringByAppendingString:appName];
     [appleMenu addItemWithTitle:title action:@selector(terminate:) keyEquivalent:@"q"];
-       
+    
     
     /* Put menu into the menubar */
     menuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""];
     [menuItem setSubmenu:appleMenu];
     [[NSApp mainMenu] addItem:menuItem];
-       
+    
     /* Tell the application object that this is now the application menu */
     [NSApp setAppleMenu:appleMenu];
-       
+    
     /* Finally give up our references to the objects */
     [appleMenu release];
     [menuItem release];
@@ -173,7 +173,7 @@ static void setupWindowMenu(void)
     NSMenu      *windowMenu;
     NSMenuItem  *windowMenuItem;
     NSMenuItem  *menuItem;
-       
+    
     windowMenu = [[NSMenu alloc] initWithTitle:@"Window"];
     
     /* "Minimize" item */
@@ -188,7 +188,7 @@ static void setupWindowMenu(void)
     
     /* Tell the application object that this is now the window menu */
     [NSApp setWindowsMenu:windowMenu];
-       
+    
     /* Finally give up our references to the objects */
     [windowMenu release];
     [windowMenuItem release];
@@ -199,7 +199,7 @@ static void CustomApplicationMain (int argc, char **argv)
 {
     NSAutoreleasePool  *pool = [[NSAutoreleasePool alloc] init];
     SDLMain                            *sdlMain;
-       
+    
     /* Ensure the application object is initialised */
     [NSApplication sharedApplication];
     
@@ -213,12 +213,12 @@ static void CustomApplicationMain (int argc, char **argv)
                     [NSApplication sharedApplication];
     }
 #endif /* SDL_USE_CPS */
-       
+    
     /* Set up the menubar */
     [NSApp setMainMenu:[[NSMenu alloc] init]];
     setApplicationMenu();
     setupWindowMenu();
-       
+    
     /* Create SDLMain and make it the app delegate */
     sdlMain = [[SDLMain alloc] init];
     [NSApp setDelegate:sdlMain];
@@ -254,19 +254,19 @@ static void CustomApplicationMain (int argc, char **argv)
     size_t arglen;
     char *arg;
     char **newargv;
-       
+    
     if (!gFinderLaunch)  /* MacOS is passing command line args. */
         return FALSE;
-       
+    
     if (gCalledAppMainline)  /* app has started, ignore this document. */
         return FALSE;
-       
+    
     temparg = [filename UTF8String];
     arglen = SDL_strlen(temparg) + 1;
     arg = (char *) SDL_malloc(arglen);
     if (arg == NULL)
         return FALSE;
-       
+    
     newargv = (char **) realloc(gArgv, sizeof (char *) * (gArgc + 2));
     if (newargv == NULL)
     {
@@ -274,7 +274,7 @@ static void CustomApplicationMain (int argc, char **argv)
         return FALSE;
     }
     gArgv = newargv;
-       
+    
     SDL_strlcpy(arg, temparg, arglen);
     gArgv[gArgc++] = arg;
     gArgv[gArgc] = NULL;
@@ -286,19 +286,19 @@ static void CustomApplicationMain (int argc, char **argv)
 - (void) applicationDidFinishLaunching: (NSNotification *) note
 {
     int status;
-       
+    
     /* Set the working directory to the .app's parent directory */
     [self setupWorkingDirectory:gFinderLaunch];
-       
+    
 #if SDL_USE_NIB_FILE
     /* Set the main menu to contain the real app name instead of "SDL App" */
     [self fixMenu:[NSApp mainMenu] withAppName:getApplicationName()];
 #endif
-       
+    
     /* Hand off to main application code */
     gCalledAppMainline = TRUE;
     status = SDL_main (gArgc, gArgv);
-       
+    
     /* We're done, thank you for playing */
     exit(status);
 }
@@ -315,7 +315,7 @@ static void CustomApplicationMain (int argc, char **argv)
     unichar *buffer;
     NSRange localRange;
     NSString *result;
-       
+    
     bufferSize = selfLen + aStringLen - aRange.length;
     buffer = (unichar *)NSAllocateMemoryPages(bufferSize*sizeof(unichar));
     
@@ -328,7 +328,7 @@ static void CustomApplicationMain (int argc, char **argv)
     localRange.location = 0;
     localRange.length = aStringLen;
     [aString getCharacters:(buffer+aRange.location) range:localRange];
-       
+    
     /* Get last part into buffer */
     localRange.location = aRange.location + aRange.length;
     localRange.length = selfLen - localRange.location;
@@ -370,7 +370,7 @@ int main (int argc, char **argv)
             gArgv[i] = argv[i];
         gFinderLaunch = NO;
     }
-       
+    
 #if SDL_USE_NIB_FILE
     NSApplicationMain (argc, argv);
 #else
index 32e9ad1d77bd9df7e8dfb9ee2e79762127893909..b9605a8e804b3b0e3edf32eef5a5207c78a45c16 100644 (file)
@@ -1,4 +1,4 @@
-#include "stdafx.h"
+ #include "stdafx.h"
 
 
 Game_overwatch::Game_overwatch(){
@@ -416,4 +416,4 @@ void Game_overwatch::kill(Actor *actor){
                delete actor;
                actor = NULL;
        }
-}
\ No newline at end of file
+}
index 336eda2ec5332eec13d493384ff05034c2dd3ac0..8d9aab057eecdb56b7d423472882416096aae40c 100644 (file)
--- a/luainc.h
+++ b/luainc.h
@@ -4,9 +4,9 @@
 \r
 extern "C"\r
 {\r
-   #include "Lua/lua.h"\r
-   #include "Lua/lauxlib.h"\r
-   #include "Lua/lualib.h"\r
+   #include "lua.h"\r
+   #include "lauxlib.h"\r
+   #include "lualib.h"\r
 }\r
 \r
-#endif // __LUA_INC_H__
\ No newline at end of file
+#endif // __LUA_INC_H__\r
diff --git a/map.cpp b/map.cpp
index fcc2d11a34764d70d13990a61a20d10ccdcf274f..99b7b29625c323fca9e26d1f269ee57d93b347b3 100755 (executable)
--- a/map.cpp
+++ b/map.cpp
@@ -25,12 +25,11 @@ Map::Map(void)
        tileset[13] = 1;\r
        tileset[14] = 1;\r
     \r
+\r
     //Get the Sheet\r
-    sheet = IMG_Load("./sprites/tilesheet.png");\r
-//    sheet = SDL_DisplayFormat(raw_sprite);\r
-//    SDL_FreeSurface(raw_sprite);\r
+    sheet = IMG_Load("./sprites/tilesheet.gif");\r
     Uint32 colorkey = SDL_MapRGB(sheet->format, 255, 0, 255);\r
-    SDL_SetColorKey(sheet, SDL_SRCCOLORKEY | SDL_RLEACCEL, colorkey);\r
+    SDL_SetColorKey(sheet, SDL_SRCCOLORKEY | SDL_RLEACCEL, colorkey);  //le ponemos al buddy el colorkey para las transparencias\r
 \r
        std::ifstream in("./map0.bin", std::ios::in | std::ios::binary);\r
        \r
index 73a6e50f4ee02b89e3879cae5b4f4e5b419a39ed..9621e13d7c019e7bcf0ef80e7102939ce7e14c81 100755 (executable)
--- a/stdafx.h
+++ b/stdafx.h
 \r
 //SDL Stuff\r
 \r
-#include "SDL/SDL.h"\r
-#include "SDL_image/SDL_image.h"\r
-#include "SDL_gfx/SDL_gfxPrimitives.h"\r
+#include "SDL.h"\r
+#include "SDL_image.h"\r
+#include "SDL_gfxPrimitives.h"\r
 #include "SDL_ttf.h"\r
-#include "SDL_mixer/SDL_mixer.h"\r
+#include "SDL_mixer.h"\r
 \r
 //Lua in CPP\r
 \r
-#include "luavirtualmachine.h"\r
-#include "luascript.h"\r
-#include "luadebugger.h"\r
+#include "LuaVirtualMachine.h"\r
+#include "LuaScript.h"\r
+#include "LuaDebugger.h"\r
 \r
 //Lua Stuff\r
 \r
@@ -44,4 +44,4 @@
 \r
 #ifdef __APPLE__\r
 #include "CoreFoundation/CoreFoundation.h"\r
-#endif
\ No newline at end of file
+#endif\r
diff --git a/tilesheet.gif b/tilesheet.gif
new file mode 100644 (file)
index 0000000..ed2231b
Binary files /dev/null and b/tilesheet.gif differ