Merged rude/love into default

This commit is contained in:
Alex Szpakowski
2013-01-29 11:25:38 -04:00
33 changed files with 46813 additions and 26202 deletions
+2 -1
View File
@@ -22,7 +22,8 @@ glob:*.lib
glob:*.ncb
glob:*.exe
glob:*.bat
glob:platform/macosx/build
glob:platform/macosx/build
glob:platform/macosx/DerivedData
glob:platform/macosx/love.xcodeproj/bill*
glob:platform/macosx/love.xcodeproj/xcuserdata
glob:platform/macosx/love.xcodeproj/project.xcworkspace
+30 -36
View File
@@ -159,10 +159,8 @@
A96F41891412B36D0067FE9A /* wrap_WheelJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A96F41871412B35B0067FE9A /* wrap_WheelJoint.cpp */; };
A96F418C1412B3AD0067FE9A /* WheelJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A96F418A1412B3A30067FE9A /* WheelJoint.cpp */; };
A96F41921412BBEE0067FE9A /* Canvas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A96F41901412BBEE0067FE9A /* Canvas.cpp */; };
A96F41951412BBF80067FE9A /* PixelEffect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A96F41931412BBF80067FE9A /* PixelEffect.cpp */; };
A96F41981412BC000067FE9A /* VertexBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A96F41961412BC000067FE9A /* VertexBuffer.cpp */; };
A96F419B1412BC070067FE9A /* wrap_Canvas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A96F41991412BC070067FE9A /* wrap_Canvas.cpp */; };
A96F419E1412BC0E0067FE9A /* wrap_PixelEffect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A96F419C1412BC0E0067FE9A /* wrap_PixelEffect.cpp */; };
A96F41A41412C91F0067FE9A /* EdgeShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A96F41A21412C91E0067FE9A /* EdgeShape.cpp */; };
A96F41A71412C92B0067FE9A /* wrap_EdgeShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A96F41A51412C92B0067FE9A /* wrap_EdgeShape.cpp */; };
A97E632514604BC200020E43 /* wrap_Keyboard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A97E632314604BC200020E43 /* wrap_Keyboard.cpp */; };
@@ -238,6 +236,8 @@
A9F2D09114BA85EC0035D2A5 /* Audio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A9F2D09014BA85EC0035D2A5 /* Audio.cpp */; };
A9F6E6AE15A1080D00C86200 /* love.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A9F6E6AC15A1080D00C86200 /* love.cpp */; };
A9F6E6B115A1099C00C86200 /* GmeDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A9F6E6AF15A1099C00C86200 /* GmeDecoder.cpp */; };
FAE69DC516A6BE7800C1AC79 /* Shader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAE69DC116A6BE7800C1AC79 /* Shader.cpp */; };
FAE69DC616A6BE7800C1AC79 /* wrap_Shader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAE69DC316A6BE7800C1AC79 /* wrap_Shader.cpp */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
@@ -293,7 +293,7 @@
A93E69EB10420ABF007D418B /* Reference.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Reference.h; sourceTree = "<group>"; };
A93E69EC10420ABF007D418B /* runtime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = runtime.cpp; sourceTree = "<group>"; };
A93E69ED10420ABF007D418B /* runtime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = runtime.h; sourceTree = "<group>"; };
A93E69EE10420ABF007D418B /* types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = types.h; sourceTree = "<group>"; };
A93E69EE10420ABF007D418B /* types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = types.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
A93E69EF10420ABF007D418B /* Vector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Vector.cpp; sourceTree = "<group>"; };
A93E69F010420ABF007D418B /* Vector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Vector.h; sourceTree = "<group>"; };
A93E69F110420ABF007D418B /* version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = version.h; sourceTree = "<group>"; };
@@ -401,14 +401,14 @@
A93E6A8010420AC2007D418B /* wrap_Rasterizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Rasterizer.h; sourceTree = "<group>"; };
A93E6A8210420AC2007D418B /* Drawable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Drawable.cpp; sourceTree = "<group>"; };
A93E6A8310420AC2007D418B /* Drawable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Drawable.h; sourceTree = "<group>"; };
A93E6A8410420AC2007D418B /* Graphics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Graphics.h; sourceTree = "<group>"; };
A93E6A8410420AC2007D418B /* Graphics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = Graphics.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
A93E6A8510420AC2007D418B /* Image.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Image.h; sourceTree = "<group>"; };
A93E6A8710420AC2007D418B /* Font.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Font.cpp; sourceTree = "<group>"; };
A93E6A8810420AC2007D418B /* Font.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Font.h; sourceTree = "<group>"; };
A93E6A8910420AC2007D418B /* GLee.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = GLee.c; sourceTree = "<group>"; };
A93E6A8A10420AC2007D418B /* GLee.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GLee.h; sourceTree = "<group>"; };
A93E6A8D10420AC2007D418B /* Graphics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Graphics.cpp; sourceTree = "<group>"; };
A93E6A8E10420AC2007D418B /* Graphics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Graphics.h; sourceTree = "<group>"; };
A93E6A8D10420AC2007D418B /* Graphics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = Graphics.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
A93E6A8E10420AC2007D418B /* Graphics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = Graphics.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
A93E6A8F10420AC2007D418B /* Image.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Image.cpp; sourceTree = "<group>"; };
A93E6A9010420AC2007D418B /* Image.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Image.h; sourceTree = "<group>"; };
A93E6A9310420AC2007D418B /* Quad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Quad.cpp; sourceTree = "<group>"; };
@@ -417,8 +417,8 @@
A93E6A9610420AC2007D418B /* SpriteBatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpriteBatch.h; sourceTree = "<group>"; };
A93E6A9910420AC2007D418B /* wrap_Font.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Font.cpp; sourceTree = "<group>"; };
A93E6A9A10420AC2007D418B /* wrap_Font.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Font.h; sourceTree = "<group>"; };
A93E6A9D10420AC3007D418B /* wrap_Graphics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Graphics.cpp; sourceTree = "<group>"; };
A93E6A9E10420AC3007D418B /* wrap_Graphics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Graphics.h; sourceTree = "<group>"; };
A93E6A9D10420AC3007D418B /* wrap_Graphics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = wrap_Graphics.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
A93E6A9E10420AC3007D418B /* wrap_Graphics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = wrap_Graphics.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
A93E6A9F10420AC3007D418B /* wrap_Image.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Image.cpp; sourceTree = "<group>"; };
A93E6AA010420AC3007D418B /* wrap_Image.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Image.h; sourceTree = "<group>"; };
A93E6AA110420AC3007D418B /* wrap_Quad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Quad.cpp; sourceTree = "<group>"; };
@@ -532,9 +532,9 @@
A93E6B8C10420ACB007D418B /* wrap_SoundData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_SoundData.h; sourceTree = "<group>"; };
A93E6B8F10420ACC007D418B /* Timer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Timer.cpp; sourceTree = "<group>"; };
A93E6B9010420ACC007D418B /* Timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Timer.h; sourceTree = "<group>"; };
A93E6B9710420ACC007D418B /* boot.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.lua; path = boot.lua; sourceTree = "<group>"; };
A93E6B9710420ACC007D418B /* boot.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.lua; lineEnding = 0; path = boot.lua; sourceTree = "<group>"; };
A93E6B9810420ACC007D418B /* boot.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = boot.lua.h; sourceTree = "<group>"; };
A93E6B9910420ACC007D418B /* graphics.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.lua; path = graphics.lua; sourceTree = "<group>"; };
A93E6B9910420ACC007D418B /* graphics.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.lua; lineEnding = 0; path = graphics.lua; sourceTree = "<group>"; };
A93E6B9A10420ACC007D418B /* graphics.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = graphics.lua.h; sourceTree = "<group>"; };
A93E6E4610420B4A007D418B /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; };
A93E6E4710420B4A007D418B /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
@@ -558,7 +558,7 @@
A968F0C71083A07C00A895AA /* StringMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringMap.h; sourceTree = "<group>"; };
A968F0CE1083A9A900A895AA /* Event.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Event.cpp; sourceTree = "<group>"; };
A968F0D01083A9B900A895AA /* File.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = File.cpp; sourceTree = "<group>"; };
A968F0D21083A9D400A895AA /* Graphics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Graphics.cpp; sourceTree = "<group>"; };
A968F0D21083A9D400A895AA /* Graphics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = Graphics.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
A968F0D41083A9E700A895AA /* Joystick.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Joystick.cpp; sourceTree = "<group>"; };
A968F0D61083A9F200A895AA /* Keyboard.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Keyboard.cpp; sourceTree = "<group>"; };
A968F0D81083A9FC00A895AA /* Mouse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Mouse.cpp; sourceTree = "<group>"; };
@@ -587,15 +587,11 @@
A96F418A1412B3A30067FE9A /* WheelJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WheelJoint.cpp; sourceTree = "<group>"; };
A96F418B1412B3A80067FE9A /* WheelJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WheelJoint.h; sourceTree = "<group>"; };
A96F41901412BBEE0067FE9A /* Canvas.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Canvas.cpp; sourceTree = "<group>"; };
A96F41911412BBEE0067FE9A /* Canvas.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Canvas.h; sourceTree = "<group>"; };
A96F41931412BBF80067FE9A /* PixelEffect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PixelEffect.cpp; sourceTree = "<group>"; };
A96F41941412BBF80067FE9A /* PixelEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PixelEffect.h; sourceTree = "<group>"; };
A96F41911412BBEE0067FE9A /* Canvas.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = Canvas.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
A96F41961412BC000067FE9A /* VertexBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VertexBuffer.cpp; sourceTree = "<group>"; };
A96F41971412BC000067FE9A /* VertexBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VertexBuffer.h; sourceTree = "<group>"; };
A96F41991412BC070067FE9A /* wrap_Canvas.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Canvas.cpp; sourceTree = "<group>"; };
A96F419A1412BC070067FE9A /* wrap_Canvas.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Canvas.h; sourceTree = "<group>"; };
A96F419C1412BC0E0067FE9A /* wrap_PixelEffect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_PixelEffect.cpp; sourceTree = "<group>"; };
A96F419D1412BC0E0067FE9A /* wrap_PixelEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_PixelEffect.h; sourceTree = "<group>"; };
A96F41A21412C91E0067FE9A /* EdgeShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EdgeShape.cpp; sourceTree = "<group>"; };
A96F41A31412C91E0067FE9A /* EdgeShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EdgeShape.h; sourceTree = "<group>"; };
A96F41A51412C92B0067FE9A /* wrap_EdgeShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_EdgeShape.cpp; sourceTree = "<group>"; };
@@ -741,6 +737,10 @@
A9F6E6B015A1099C00C86200 /* GmeDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GmeDecoder.h; sourceTree = "<group>"; };
A9F8833511163C8C00831E98 /* audio.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.lua; path = audio.lua; sourceTree = "<group>"; };
A9F8833611163C8C00831E98 /* audio.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = audio.lua.h; sourceTree = "<group>"; };
FAE69DC116A6BE7800C1AC79 /* Shader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Shader.cpp; sourceTree = "<group>"; };
FAE69DC216A6BE7800C1AC79 /* Shader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Shader.h; sourceTree = "<group>"; };
FAE69DC316A6BE7800C1AC79 /* wrap_Shader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Shader.cpp; sourceTree = "<group>"; };
FAE69DC416A6BE7800C1AC79 /* wrap_Shader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Shader.h; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -1146,10 +1146,10 @@
A9642D7414D1A66000CE0B02 /* OpenGL.h */,
A9B4BA9A1045937F001DBC80 /* ParticleSystem.cpp */,
A9B4BA981045937F001DBC80 /* ParticleSystem.h */,
A96F41931412BBF80067FE9A /* PixelEffect.cpp */,
A96F41941412BBF80067FE9A /* PixelEffect.h */,
A93E6A9310420AC2007D418B /* Quad.cpp */,
A93E6A9410420AC2007D418B /* Quad.h */,
FAE69DC116A6BE7800C1AC79 /* Shader.cpp */,
FAE69DC216A6BE7800C1AC79 /* Shader.h */,
A93E6A9510420AC2007D418B /* SpriteBatch.cpp */,
A93E6A9610420AC2007D418B /* SpriteBatch.h */,
A96F41961412BC000067FE9A /* VertexBuffer.cpp */,
@@ -1164,10 +1164,10 @@
A93E6AA010420AC3007D418B /* wrap_Image.h */,
A9B4BA9B1045937F001DBC80 /* wrap_ParticleSystem.cpp */,
A9B4BA991045937F001DBC80 /* wrap_ParticleSystem.h */,
A96F419C1412BC0E0067FE9A /* wrap_PixelEffect.cpp */,
A96F419D1412BC0E0067FE9A /* wrap_PixelEffect.h */,
A93E6AA110420AC3007D418B /* wrap_Quad.cpp */,
A93E6AA210420AC3007D418B /* wrap_Quad.h */,
FAE69DC316A6BE7800C1AC79 /* wrap_Shader.cpp */,
FAE69DC416A6BE7800C1AC79 /* wrap_Shader.h */,
A93E6AA310420AC3007D418B /* wrap_SpriteBatch.cpp */,
A93E6AA410420AC3007D418B /* wrap_SpriteBatch.h */,
);
@@ -1713,7 +1713,7 @@
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0430;
LastUpgradeCheck = 0460;
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "love" */;
compatibilityVersion = "Xcode 3.2";
@@ -1878,10 +1878,8 @@
A96E254F13B9892100456DEA /* threads.cpp in Sources */,
A96E255113B9892100456DEA /* wrap_Thread.cpp in Sources */,
A96F41921412BBEE0067FE9A /* Canvas.cpp in Sources */,
A96F41951412BBF80067FE9A /* PixelEffect.cpp in Sources */,
A96F41981412BC000067FE9A /* VertexBuffer.cpp in Sources */,
A96F419B1412BC070067FE9A /* wrap_Canvas.cpp in Sources */,
A96F419E1412BC0E0067FE9A /* wrap_PixelEffect.cpp in Sources */,
A901B882143B65C500D77063 /* DrawQable.cpp in Sources */,
A901B885143B661400D77063 /* Quad.cpp in Sources */,
A986ECAF132CEBB000F048C8 /* Fixture.cpp in Sources */,
@@ -1957,6 +1955,8 @@
A9F6E6B115A1099C00C86200 /* GmeDecoder.cpp in Sources */,
A911D2DB15DFECC8005B7EB8 /* Module.cpp in Sources */,
A5474CEF1624903B00C8EEAC /* math.cpp in Sources */,
FAE69DC516A6BE7800C1AC79 /* Shader.cpp in Sources */,
FAE69DC616A6BE7800C1AC79 /* wrap_Shader.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1966,9 +1966,9 @@
C01FCF4B08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = love_Prefix.pch;
@@ -1981,8 +1981,8 @@
C01FCF4C08A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = love_Prefix.pch;
INSTALL_PATH = "$(HOME)/Applications";
@@ -2001,21 +2001,17 @@
GCC_INCREASE_PRECOMPILED_HEADER_SHARING = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = NO;
GCC_TREAT_NONCONFORMANT_CODE_ERRORS_AS_WARNINGS = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
GCC_WARN_ABOUT_MISSING_NEWLINE = NO;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
GCC_WARN_ABOUT_POINTER_SIGNEDNESS = YES;
GCC_WARN_ABOUT_RETURN_TYPE = NO;
GCC_WARN_CHECK_SWITCH_STATEMENTS = NO;
GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS = NO;
GCC_WARN_CHECK_SWITCH_STATEMENTS = YES;
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = NO;
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = NO;
GCC_WARN_MISSING_PARENTHESES = NO;
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = NO;
GCC_WARN_PEDANTIC = NO;
GCC_WARN_PROTOTYPE_CONVERSION = NO;
GCC_WARN_SHADOW = NO;
GCC_WARN_SIGN_COMPARE = YES;
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = NO;
@@ -2029,14 +2025,15 @@
/Library/Frameworks/SDL.framework/Headers,
);
INFOPLIST_FILE = "love-Info.plist";
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.5;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "";
PRODUCT_NAME = love;
SDKROOT = macosx;
WARNING_CFLAGS = (
"-W",
"-Wall",
"-W",
);
};
name = Debug;
@@ -2051,21 +2048,17 @@
GCC_C_LANGUAGE_STANDARD = c99;
GCC_INPUT_FILETYPE = automatic;
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = NO;
GCC_TREAT_NONCONFORMANT_CODE_ERRORS_AS_WARNINGS = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
GCC_WARN_ABOUT_MISSING_NEWLINE = NO;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
GCC_WARN_ABOUT_POINTER_SIGNEDNESS = YES;
GCC_WARN_ABOUT_RETURN_TYPE = NO;
GCC_WARN_CHECK_SWITCH_STATEMENTS = YES;
GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS = NO;
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = NO;
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = NO;
GCC_WARN_MISSING_PARENTHESES = NO;
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = NO;
GCC_WARN_PEDANTIC = NO;
GCC_WARN_PROTOTYPE_CONVERSION = NO;
GCC_WARN_SHADOW = NO;
GCC_WARN_SIGN_COMPARE = YES;
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = NO;
@@ -2082,6 +2075,7 @@
);
INFOPLIST_FILE = "love-Info.plist";
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
LLVM_LTO = YES;
MACOSX_DEPLOYMENT_TARGET = 10.5;
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = "";
@@ -2089,8 +2083,8 @@
SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES;
SDKROOT = macosx;
WARNING_CFLAGS = (
"-W",
"-Wall",
"-W",
);
};
name = Release;
+5 -5
View File
@@ -404,7 +404,7 @@
<ClCompile Include="..\..\src\modules\graphics\opengl\Image.cpp" />
<ClCompile Include="..\..\src\modules\graphics\opengl\OpenGL.cpp" />
<ClCompile Include="..\..\src\modules\graphics\opengl\ParticleSystem.cpp" />
<ClCompile Include="..\..\src\modules\graphics\opengl\PixelEffect.cpp" />
<ClCompile Include="..\..\src\modules\graphics\opengl\Shader.cpp" />
<ClCompile Include="..\..\src\modules\graphics\opengl\Quad.cpp" />
<ClCompile Include="..\..\src\modules\graphics\opengl\SpriteBatch.cpp" />
<ClCompile Include="..\..\src\modules\graphics\opengl\VertexBuffer.cpp" />
@@ -413,7 +413,7 @@
<ClCompile Include="..\..\src\modules\graphics\opengl\wrap_Graphics.cpp" />
<ClCompile Include="..\..\src\modules\graphics\opengl\wrap_Image.cpp" />
<ClCompile Include="..\..\src\modules\graphics\opengl\wrap_ParticleSystem.cpp" />
<ClCompile Include="..\..\src\modules\graphics\opengl\wrap_PixelEffect.cpp" />
<ClCompile Include="..\..\src\modules\graphics\opengl\wrap_Shader.cpp" />
<ClCompile Include="..\..\src\modules\graphics\opengl\wrap_Quad.cpp" />
<ClCompile Include="..\..\src\modules\graphics\opengl\wrap_SpriteBatch.cpp" />
<ClCompile Include="..\..\src\modules\graphics\Quad.cpp" />
@@ -631,7 +631,7 @@
<ClInclude Include="..\..\src\modules\graphics\opengl\Image.h" />
<ClInclude Include="..\..\src\modules\graphics\opengl\OpenGL.h" />
<ClInclude Include="..\..\src\modules\graphics\opengl\ParticleSystem.h" />
<ClInclude Include="..\..\src\modules\graphics\opengl\PixelEffect.h" />
<ClInclude Include="..\..\src\modules\graphics\opengl\Shader.h" />
<ClInclude Include="..\..\src\modules\graphics\opengl\Quad.h" />
<ClInclude Include="..\..\src\modules\graphics\opengl\SpriteBatch.h" />
<ClInclude Include="..\..\src\modules\graphics\opengl\VertexBuffer.h" />
@@ -640,7 +640,7 @@
<ClInclude Include="..\..\src\modules\graphics\opengl\wrap_Graphics.h" />
<ClInclude Include="..\..\src\modules\graphics\opengl\wrap_Image.h" />
<ClInclude Include="..\..\src\modules\graphics\opengl\wrap_ParticleSystem.h" />
<ClInclude Include="..\..\src\modules\graphics\opengl\wrap_PixelEffect.h" />
<ClInclude Include="..\..\src\modules\graphics\opengl\wrap_Shader.h" />
<ClInclude Include="..\..\src\modules\graphics\opengl\wrap_Quad.h" />
<ClInclude Include="..\..\src\modules\graphics\opengl\wrap_SpriteBatch.h" />
<ClInclude Include="..\..\src\modules\graphics\Quad.h" />
@@ -733,4 +733,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
+5 -5
View File
@@ -447,7 +447,7 @@
<ClCompile Include="..\..\src\modules\graphics\Volatile.cpp">
<Filter>modules\graphics</Filter>
</ClCompile>
<ClCompile Include="..\..\src\modules\graphics\opengl\PixelEffect.cpp">
<ClCompile Include="..\..\src\modules\graphics\opengl\Shader.cpp">
<Filter>modules\graphics\opengl</Filter>
</ClCompile>
<ClCompile Include="..\..\src\modules\graphics\opengl\Quad.cpp">
@@ -474,7 +474,7 @@
<ClCompile Include="..\..\src\modules\graphics\opengl\wrap_ParticleSystem.cpp">
<Filter>modules\graphics\opengl</Filter>
</ClCompile>
<ClCompile Include="..\..\src\modules\graphics\opengl\wrap_PixelEffect.cpp">
<ClCompile Include="..\..\src\modules\graphics\opengl\wrap_Shader.cpp">
<Filter>modules\graphics\opengl</Filter>
</ClCompile>
<ClCompile Include="..\..\src\modules\graphics\opengl\wrap_Quad.cpp">
@@ -1129,7 +1129,7 @@
<ClInclude Include="..\..\src\modules\graphics\opengl\ParticleSystem.h">
<Filter>modules\graphics\opengl</Filter>
</ClInclude>
<ClInclude Include="..\..\src\modules\graphics\opengl\PixelEffect.h">
<ClInclude Include="..\..\src\modules\graphics\opengl\Shader.h">
<Filter>modules\graphics\opengl</Filter>
</ClInclude>
<ClInclude Include="..\..\src\modules\graphics\opengl\Quad.h">
@@ -1156,7 +1156,7 @@
<ClInclude Include="..\..\src\modules\graphics\opengl\wrap_ParticleSystem.h">
<Filter>modules\graphics\opengl</Filter>
</ClInclude>
<ClInclude Include="..\..\src\modules\graphics\opengl\wrap_PixelEffect.h">
<ClInclude Include="..\..\src\modules\graphics\opengl\wrap_Shader.h">
<Filter>modules\graphics\opengl</Filter>
</ClInclude>
<ClInclude Include="..\..\src\modules\graphics\opengl\wrap_Quad.h">
@@ -1430,4 +1430,4 @@
<ItemGroup>
<ResourceCompile Include="love.rc" />
</ItemGroup>
</Project>
</Project>
+2 -2
View File
@@ -52,7 +52,7 @@ enum Type
GRAPHICS_PARTICLE_SYSTEM_ID,
GRAPHICS_SPRITE_BATCH_ID,
GRAPHICS_CANVAS_ID,
GRAPHICS_PIXELEFFECT_ID,
GRAPHICS_SHADER_ID,
// Image
IMAGE_IMAGE_DATA_ID,
@@ -123,7 +123,7 @@ const bits GRAPHICS_FONT_T = (bits(1) << GRAPHICS_FONT_ID) | OBJECT_T;
const bits GRAPHICS_PARTICLE_SYSTEM_T = (bits(1) << GRAPHICS_PARTICLE_SYSTEM_ID) | GRAPHICS_DRAWABLE_T;
const bits GRAPHICS_SPRITE_BATCH_T = (bits(1) << GRAPHICS_SPRITE_BATCH_ID) | GRAPHICS_DRAWABLE_T;
const bits GRAPHICS_CANVAS_T = (bits(1) << GRAPHICS_CANVAS_ID) | GRAPHICS_DRAWQABLE_T;
const bits GRAPHICS_PIXELEFFECT_T = (bits(1) << GRAPHICS_PIXELEFFECT_ID) | OBJECT_T;
const bits GRAPHICS_SHADER_T = (bits(1) << GRAPHICS_SHADER_ID) | OBJECT_T;
// Image.
const bits IMAGE_IMAGE_DATA_T = (bits(1) << IMAGE_IMAGE_DATA_ID) | DATA_T;
+2 -1
View File
@@ -158,7 +158,8 @@ StringMap<Graphics::Support, Graphics::SUPPORT_MAX_ENUM>::Entry Graphics::suppor
{
{ "canvas", Graphics::SUPPORT_CANVAS },
{ "hdrcanvas", Graphics::SUPPORT_HDR_CANVAS },
{ "pixeleffect", Graphics::SUPPORT_PIXELEFFECT },
{ "shader", Graphics::SUPPORT_SHADER },
{ "pixeleffect", Graphics::SUPPORT_SHADER }, // for compatibility
{ "npot", Graphics::SUPPORT_NPOT },
{ "subtractive", Graphics::SUPPORT_SUBTRACTIVE },
{ "mipmap", Graphics::SUPPORT_MIPMAP },
+1 -1
View File
@@ -87,7 +87,7 @@ public:
{
SUPPORT_CANVAS = 1,
SUPPORT_HDR_CANVAS,
SUPPORT_PIXELEFFECT,
SUPPORT_SHADER,
SUPPORT_NPOT,
SUPPORT_SUBTRACTIVE,
SUPPORT_MIPMAP,
+1 -2
View File
@@ -30,7 +30,6 @@
#include "common/math.h"
#include "common/Matrix.h"
#include "OpenGL.h"
#include "GLee.h"
namespace love
{
@@ -98,7 +97,7 @@ public:
static void bindDefaultCanvas();
private:
friend class PixelEffect;
friend class Shader;
GLuint getTextureName() const
{
return img;
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+19 -19
View File
@@ -45,8 +45,6 @@ Graphics::Graphics()
, userMatrices(0)
{
currentWindow = love::window::sdl::Window::getSingleton();
resetBoundTexture();
}
Graphics::~Graphics()
@@ -116,6 +114,8 @@ bool Graphics::setMode(int width, int height, bool fullscreen, bool vsync, int f
// Unload all volatile objects. These must be reloaded after
// the display mode change.
Volatile::unloadAll();
uninitializeContext();
bool success = currentWindow->setWindow(width, height, fullscreen, vsync, fsaa);
// Regardless of failure, we'll have to set up OpenGL once again.
@@ -125,6 +125,8 @@ bool Graphics::setMode(int width, int height, bool fullscreen, bool vsync, int f
// Okay, setup OpenGL.
initializeContext();
// Enable blending
glEnable(GL_BLEND);
@@ -138,6 +140,7 @@ bool Graphics::setMode(int width, int height, bool fullscreen, bool vsync, int f
// Enable textures
glEnable(GL_TEXTURE_2D);
setActiveTextureUnit(0);
// Set the viewport to top-left corner
glViewport(0, 0, width, height);
@@ -190,7 +193,7 @@ void Graphics::reset()
DisplayState s;
discardStencil();
Canvas::bindDefaultCanvas();
PixelEffect::detach();
Shader::detach();
restoreState(s);
}
@@ -450,20 +453,21 @@ Canvas *Graphics::newCanvas(int width, int height, Canvas::TextureType texture_t
return NULL; // never reached
}
PixelEffect *Graphics::newPixelEffect(const std::string &code)
Shader *Graphics::newShader(const Shader::ShaderSources &sources)
{
PixelEffect *effect = NULL;
Shader *shader = NULL;
try
{
effect = new PixelEffect(code);
shader = new Shader(sources);
}
catch(love::Exception &e)
catch(love::Exception &)
{
if (effect)
delete effect;
throw(e);
if (shader)
delete shader;
throw;
}
return effect;
return shader;
}
void Graphics::setColor(const Color &c)
@@ -743,11 +747,10 @@ void Graphics::printf(const char *str, float x, float y, float wrap, AlignMode a
void Graphics::point(float x, float y)
{
glDisable(GL_TEXTURE_2D);
bindTexture(0);
glBegin(GL_POINTS);
glVertex2f(x, y);
glEnd();
glEnable(GL_TEXTURE_2D);
}
// Calculate line boundary points u1 and u2. Sketch:
@@ -941,7 +944,7 @@ void Graphics::polyline(const float *coords, size_t count)
// end get line vertex boundaries
// draw the core line
glDisable(GL_TEXTURE_2D);
bindTexture(0);
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(2, GL_FLOAT, 0, (const GLvoid *)vertices);
glDrawArrays(GL_TRIANGLE_STRIP, 0, count);
@@ -951,7 +954,6 @@ void Graphics::polyline(const float *coords, size_t count)
draw_overdraw(overdraw, count, pixel_size, looping);
glDisableClientState(GL_VERTEX_ARRAY);
glEnable(GL_TEXTURE_2D);
// cleanup
delete[] vertices;
@@ -1035,12 +1037,11 @@ void Graphics::arc(DrawMode mode, float x, float y, float radius, float angle1,
}
else
{
glDisable(GL_TEXTURE_2D);
bindTexture(0);
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(2, GL_FLOAT, 0, (const GLvoid *) coords);
glDrawArrays(GL_TRIANGLE_FAN, 0, points + 2);
glDisableClientState(GL_VERTEX_ARRAY);
glEnable(GL_TEXTURE_2D);
}
delete[] coords;
@@ -1059,12 +1060,11 @@ void Graphics::polygon(DrawMode mode, const float *coords, size_t count)
}
else
{
glDisable(GL_TEXTURE_2D);
bindTexture(0);
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(2, GL_FLOAT, 0, (const GLvoid *)coords);
glDrawArrays(GL_POLYGON, 0, count/2-1); // opengl will close the polygon for us
glDisableClientState(GL_VERTEX_ARRAY);
glEnable(GL_TEXTURE_2D);
}
}
+3 -4
View File
@@ -26,7 +26,7 @@
#include <cmath>
// OpenGL
#include "GLee.h"
#include "OpenGL.h"
// LOVE
#include "graphics/Graphics.h"
@@ -37,14 +37,13 @@
#include "window/Window.h"
#include "OpenGL.h"
#include "Font.h"
#include "Image.h"
#include "Quad.h"
#include "SpriteBatch.h"
#include "ParticleSystem.h"
#include "Canvas.h"
#include "PixelEffect.h"
#include "Shader.h"
namespace love
{
@@ -271,7 +270,7 @@ public:
Canvas *newCanvas(int width, int height, Canvas::TextureType texture_type = Canvas::TYPE_NORMAL);
PixelEffect *newPixelEffect(const std::string &code);
Shader *newShader(const Shader::ShaderSources &sources);
/**
* Sets the foreground color.
+2 -4
View File
@@ -28,10 +28,8 @@
#include "image/ImageData.h"
#include "graphics/Image.h"
#include "OpenGL.h"
// OpenGL
#include "GLee.h"
#include "OpenGL.h"
namespace love
{
@@ -127,7 +125,7 @@ private:
void drawv(const Matrix &t, const vertex *v) const;
friend class PixelEffect;
friend class Shader;
GLuint getTextureName() const
{
return texture;
+145 -9
View File
@@ -18,7 +18,10 @@
* 3. This notice may not be removed or altered from any source distribution.
**/
#include <vector>
#include <algorithm>
#include "OpenGL.h"
#include "common/Exception.h"
namespace love
{
@@ -27,33 +30,160 @@ namespace graphics
namespace opengl
{
static GLuint boundTexture = 0;
static bool contextInitialized = false;
void resetBoundTexture()
static int curTextureUnit = 0;
static std::vector<GLuint> textureUnits;
void initializeContext()
{
// OpenGL might not be initialized yet, so we can't do a real reset
boundTexture = 0;
if (contextInitialized)
return;
contextInitialized = true;
textureUnits.clear();
// initialize multiple texture unit support, if available
if (GLEE_VERSION_1_3 || GLEE_ARB_multitexture)
{
GLint maxtextureunits;
glGetIntegerv(GL_MAX_TEXTURE_UNITS, &maxtextureunits);
// shaders/GL2.0 added "Texture Image Units." Total max texture units is the greater of the two
if (GLEE_VERSION_2_0 || GLEE_ARB_vertex_shader)
{
GLint maxtextureimageunits;
glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &maxtextureimageunits);
maxtextureunits = std::max(maxtextureunits, maxtextureimageunits);
}
textureUnits.resize(maxtextureunits, 0);
GLenum curgltextureunit;
glGetIntegerv(GL_ACTIVE_TEXTURE, (GLint *)&curgltextureunit);
curTextureUnit = curgltextureunit - GL_TEXTURE0;
// retrieve currently bound textures for each texture unit
for (size_t i = 0; i < textureUnits.size(); ++i)
{
if (GLEE_VERSION_1_3)
glActiveTexture(GL_TEXTURE0 + i);
else
glActiveTextureARB(GL_TEXTURE0 + i);
glGetIntegerv(GL_TEXTURE_BINDING_2D, (GLint *) &textureUnits[i]);
}
if (GLEE_VERSION_1_3)
glActiveTexture(curgltextureunit);
else
glActiveTextureARB(curgltextureunit);
}
else
{
// multitexturing not supported, so we only have 1 texture unit
textureUnits.resize(1, 0);
curTextureUnit = 0;
glGetIntegerv(GL_TEXTURE_BINDING_2D, (GLint *) &textureUnits[0]);
}
// Set the 'default' texture (id 0) as a repeating white pixel.
// Otherwise, texture2D inside a shader would return black when drawing graphics primitives,
// which would create the need to use different "passthrough" shaders for untextured primitives vs images.
GLuint curtexture = textureUnits[curTextureUnit];
bindTexture(0);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
GLubyte pixel = 255;
glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE8, 1, 1, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, &pixel);
bindTexture(curtexture);
}
void bindTexture(GLuint texture, bool override)
void uninitializeContext()
{
if (texture != boundTexture || texture == 0 || override)
contextInitialized = false;
}
void setActiveTextureUnit(int textureunit)
{
initializeContext();
if (textureunit < 0 || (size_t) textureunit >= textureUnits.size())
throw love::Exception("Invalid texture unit index (%d).", textureunit);
if (textureunit != curTextureUnit)
{
boundTexture = texture;
if (GLEE_VERSION_1_3)
glActiveTexture(GL_TEXTURE0 + textureunit);
else if (GLEE_ARB_multitexture)
glActiveTextureARB(GL_TEXTURE0 + textureunit);
else
throw love::Exception("Multitexturing not supported.");
}
curTextureUnit = textureunit;
}
void bindTexture(GLuint texture)
{
initializeContext();
if (texture != textureUnits[curTextureUnit])
{
textureUnits[curTextureUnit] = texture;
glBindTexture(GL_TEXTURE_2D, texture);
}
}
void bindTextureToUnit(GLuint texture, int textureunit, bool restoreprev)
{
initializeContext();
if (textureunit < 0 || (size_t) textureunit >= textureUnits.size())
throw love::Exception("Invalid texture unit index.");
if (texture != textureUnits[textureunit])
{
int oldtextureunit = curTextureUnit;
setActiveTextureUnit(textureunit);
textureUnits[textureunit] = texture;
glBindTexture(GL_TEXTURE_2D, texture);
if (restoreprev)
setActiveTextureUnit(oldtextureunit);
}
}
void deleteTexture(GLuint texture)
{
if (texture == boundTexture)
boundTexture = 0;
initializeContext();
// glDeleteTextures binds texture 0 to all texture units the deleted texture was bound to
std::vector<GLuint>::iterator it;
for (it = textureUnits.begin(); it != textureUnits.end(); ++it)
{
if (*it == texture)
*it = 0;
}
glDeleteTextures(1, &texture);
}
void setTextureFilter(const graphics::Image::Filter &f)
{
initializeContext();
GLint gmin, gmag;
if (f.mipmap == Image::FILTER_NONE)
@@ -95,6 +225,8 @@ void setTextureFilter(const graphics::Image::Filter &f)
graphics::Image::Filter getTextureFilter()
{
initializeContext();
GLint gmin, gmag;
glGetTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, &gmin);
glGetTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, &gmag);
@@ -144,6 +276,8 @@ graphics::Image::Filter getTextureFilter()
void setTextureWrap(const graphics::Image::Wrap &w)
{
initializeContext();
GLint gs, gt;
switch (w.s)
@@ -174,6 +308,8 @@ void setTextureWrap(const graphics::Image::Wrap &w)
graphics::Image::Wrap getTextureWrap()
{
initializeContext();
GLint gs, gt;
glGetTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, &gs);
+32 -14
View File
@@ -18,8 +18,8 @@
* 3. This notice may not be removed or altered from any source distribution.
**/
#ifndef LOVE_COMMON_OPENGL_H
#define LOVE_COMMON_OPENGL_H
#ifndef LOVE_GRAPHICS_OPENGL_OPENGL_H
#define LOVE_GRAPHICS_OPENGL_OPENGL_H
#include "GLee.h"
#include "graphics/Image.h"
@@ -31,43 +31,61 @@ namespace graphics
namespace opengl
{
// resets the stored bound texture id
void resetBoundTexture();
/**
* Initializes some required context state,
* based on current and default OpenGL state.
**/
void initializeContext();
/**
* Marks current context state as invalid.
**/
void uninitializeContext();
/**
* Helper for setting the active texture unit.
*
* @param textureunit Index in the range of [0, maxtextureunits-1]
**/
void setActiveTextureUnit(int textureunit);
/**
* Helper for binding an OpenGL texture.
* Makes sure we aren't redundantly binding textures.
* @param texture The texture to bind.
* @param override Overrides the checks to guarantee texture bind
**/
void bindTexture(GLuint texture, bool override = false);
void bindTexture(GLuint texture);
/**
* Helper for binding a texture to a specific texture unit.
*
* @param textureunit Index in the range of [0, maxtextureunits-1]
* @param resoreprev Restore previously bound texture unit when done.
**/
void bindTextureToUnit(GLuint texture, int textureunit, bool restoreprev);
/**
* Helper for deleting an OpenGL texture.
* Cleans up if the texture is currently bound.
* @param texture The texture to delete.
**/
void deleteTexture(GLuint texture);
/**
* Sets the image filter mode for the currently bound texture
* @param f The image filter to set
* Sets the image filter mode for the currently bound texture.
*/
void setTextureFilter(const graphics::Image::Filter &f);
/**
* Returns the image filter mode for the currently bound texture
* Returns the image filter mode for the currently bound texture.
*/
graphics::Image::Filter getTextureFilter();
/**
* Sets the image wrap mode for the currently bound texture
* @param w The wrap mode to set
* Sets the image wrap mode for the currently bound texture.
*/
void setTextureWrap(const graphics::Image::Wrap &w);
/**
* Returns the image wrap mode for the currently bound texture
* Returns the image wrap mode for the currently bound texture.
*/
graphics::Image::Wrap getTextureWrap();
@@ -22,7 +22,7 @@
#include "common/math.h"
#include "GLee.h"
#include "OpenGL.h"
#include <cmath>
#include <cstdlib>
-346
View File
@@ -1,346 +0,0 @@
/**
* Copyright (c) 2006-2012 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
**/
#include "PixelEffect.h"
#include "GLee.h"
#include "Graphics.h"
namespace
{
// temporarily attaches a shader program (for setting uniforms, etc)
// reattaches the originally active program when destroyed
struct TemporaryAttacher
{
TemporaryAttacher(love::graphics::opengl::PixelEffect *sp) : s(sp)
{
glGetIntegerv(GL_CURRENT_PROGRAM, &activeProgram);
s->attach();
}
~TemporaryAttacher()
{
glUseProgram(activeProgram);
}
love::graphics::opengl::PixelEffect *s;
GLint activeProgram;
};
} // anonymous namespace
namespace love
{
namespace graphics
{
namespace opengl
{
PixelEffect *PixelEffect::current = NULL;
std::vector<bool> PixelEffect::_unit_available;
GLint PixelEffect::getTextureUnit(const std::string &name)
{
std::map<std::string, GLint>::const_iterator it = _texture_unit_pool.find(name);
if (it != _texture_unit_pool.end())
return it->second;
GLint unit = -1;
for (int i = 1; i < _unit_available.size(); ++i)
{
if (_unit_available[i])
{
unit = i;
break;
}
}
if (unit == -1)
throw love::Exception("No more texture units available");
_unit_available[unit] = false;
_texture_unit_pool[name] = unit;
return unit;
}
PixelEffect::PixelEffect(const std::string &code)
: _program(0)
, _code(code)
{
if (_unit_available.empty())
{
GLint max_units;
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &max_units);
_unit_available.resize(max_units, true);
_unit_available[0] = false;
}
loadVolatile();
}
bool PixelEffect::loadVolatile()
{
_program = glCreateProgram();
// should only fail if this is called between a glBegin()/glEnd() pair
if (_program == 0)
throw love::Exception("Cannot create shader program object.");
GLuint shader = glCreateShader(GL_FRAGMENT_SHADER);
// should only fail if this is called between a glBegin()/glEnd() pair
if (shader == 0)
{
glDeleteProgram(_program);
throw love::Exception("Cannot create shader object.");
}
// compile fragment shader code
const char *src = _code.c_str();
GLint strlen = _code.length();
glShaderSource(shader, 1, (const GLchar **)&src, &strlen);
glCompileShader(shader);
GLint compile_ok;
glGetShaderiv(shader, GL_COMPILE_STATUS, &compile_ok);
if (GL_FALSE == compile_ok)
{
// get compiler error
glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &strlen);
char *error_str = new char[strlen];
glGetShaderInfoLog(shader, strlen, NULL, error_str);
std::string tmp(error_str);
// cleanup before throw
delete[] error_str;
glDeleteShader(shader);
glDeleteProgram(_program);
// XXX: errorlog may contain escape sequences.
throw love::Exception("Cannot compile shader:\n%s", tmp.c_str());
}
// link fragment shader
GLint link_ok;
glAttachShader(_program, shader);
glLinkProgram(_program);
glGetProgramiv(_program, GL_LINK_STATUS, &link_ok);
if (GL_FALSE == link_ok)
{
// this should not happen if compiling is ok, but one can never be too careful
// get linker error
std::string tmp(getWarnings());
// cleanup before throw
glDeleteShader(shader);
glDeleteProgram(_program);
throw love::Exception("Cannot compile shader:\n%s", tmp.c_str());
}
glDeleteShader(shader);
return true;
}
PixelEffect::~PixelEffect()
{
unloadVolatile();
}
void PixelEffect::unloadVolatile()
{
glDeleteProgram(_program);
}
std::string PixelEffect::getGLSLVersion()
{
// GL_SHADING_LANGUAGE_VERSION may not be available in OpenGL < 2.0.
const char *tmp = (const char*)glGetString(GL_SHADING_LANGUAGE_VERSION);
if (NULL == tmp)
return "0.0";
// the version string always begins with a version number of the format
// major_number.minor_number
// or
// major_number.minor_number.release_number
// we can keep release_number, since it does not affect the check below.
std::string versionString(tmp);
size_t minorEndPos = versionString.find(' ');
return versionString.substr(0, minorEndPos);
}
bool PixelEffect::isSupported()
{
return GLEE_VERSION_2_0 && getGLSLVersion() >= "1.2";
}
std::string PixelEffect::getWarnings() const
{
GLint strlen, nullpos;
glGetProgramiv(_program, GL_INFO_LOG_LENGTH, &strlen);
char *temp_str = new char[strlen+1];
// be extra sure that the error string will be 0-terminated
memset(temp_str, '\0', strlen+1);
glGetProgramInfoLog(_program, strlen, &nullpos, temp_str);
temp_str[nullpos] = '\0';
std::string warnings(temp_str);
delete[] temp_str;
return warnings;
}
void PixelEffect::attach()
{
glUseProgram(_program);
current = this;
}
void PixelEffect::detach()
{
glUseProgram(0);
current = NULL;
}
void PixelEffect::sendFloat(const std::string &name, int size, const GLfloat *vec, int count)
{
TemporaryAttacher attacher(this);
GLint location = getUniformLocation(name);
if (size < 1 || size > 4)
{
throw love::Exception("Invalid variable size: %d (expected 1-4).", size);
}
switch (size)
{
case 4:
glUniform4fv(location, count, vec);
break;
case 3:
glUniform3fv(location, count, vec);
break;
case 2:
glUniform2fv(location, count, vec);
break;
case 1:
default:
glUniform1fv(location, count, vec);
break;
}
// throw error if needed
checkSetUniformError();
}
void PixelEffect::sendMatrix(const std::string &name, int size, const GLfloat *m, int count)
{
TemporaryAttacher attacher(this);
GLint location = getUniformLocation(name);
if (size < 2 || size > 4)
{
throw love::Exception("Invalid matrix size: %dx%d "
"(can only set 2x2, 3x3 or 4x4 matrices).", size,size);
}
switch (size)
{
case 4:
glUniformMatrix4fv(location, count, GL_FALSE, m);
break;
case 3:
glUniformMatrix3fv(location, count, GL_FALSE, m);
break;
case 2:
default:
glUniformMatrix2fv(location, count, GL_FALSE, m);
break;
}
// throw error if needed
checkSetUniformError();
}
void PixelEffect::sendImage(const std::string &name, const Image &image)
{
GLint texture_unit = getTextureUnit(name);
TemporaryAttacher attacher(this);
GLint location = getUniformLocation(name);
glActiveTexture(GL_TEXTURE0 + texture_unit);
bindTexture(image.getTextureName(), true); // guarantee it gets bound
glUniform1i(location, texture_unit);
// reset texture unit
glActiveTexture(GL_TEXTURE0);
// throw error if needed
checkSetUniformError();
}
void PixelEffect::sendCanvas(const std::string &name, const Canvas &canvas)
{
GLint texture_unit = getTextureUnit(name);
TemporaryAttacher attacher(this);
GLint location = getUniformLocation(name);
glActiveTexture(GL_TEXTURE0 + texture_unit);
bindTexture(canvas.getTextureName(), true); // guarantee it gets bound
glUniform1i(location, texture_unit);
// reset texture unit
glActiveTexture(GL_TEXTURE0);
// throw error if needed
checkSetUniformError();
}
GLint PixelEffect::getUniformLocation(const std::string &name)
{
std::map<std::string, GLint>::const_iterator it = _uniforms.find(name);
if (it != _uniforms.end())
return it->second;
GLint location = glGetUniformLocation(_program, name.c_str());
if (location == -1)
{
throw love::Exception(
"Cannot get location of shader variable `%s'.\n"
"A common error is to define but not use the variable.", name.c_str());
}
_uniforms[name] = location;
return location;
}
void PixelEffect::checkSetUniformError()
{
GLenum error_code = glGetError();
if (GL_INVALID_OPERATION == error_code)
{
throw love::Exception(
"Invalid operation:\n"
"- Trying to send the wrong value type to shader variable, or\n"
"- Trying to send array values with wrong dimension, or\n"
"- Invalid variable name.");
}
}
} // opengl
} // graphics
} // love
-80
View File
@@ -1,80 +0,0 @@
/**
* Copyright (c) 2006-2012 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
**/
#ifndef LOVE_GRAPHICS_EFFECT_H
#define LOVE_GRAPHICS_EFFECT_H
#include "common/Object.h"
#include <string>
#include <map>
#include <vector>
#include "OpenGL.h"
#include "Image.h"
#include "Canvas.h"
namespace love
{
namespace graphics
{
namespace opengl
{
// A fragment shader
class PixelEffect : public Object, public Volatile
{
public:
PixelEffect(const std::string &code);
virtual ~PixelEffect();
std::string getWarnings() const;
virtual bool loadVolatile();
virtual void unloadVolatile();
void attach();
static void detach();
static std::string getGLSLVersion();
static bool isSupported();
static PixelEffect *current;
void sendFloat(const std::string &name, int size, const GLfloat *vec, int count);
void sendMatrix(const std::string &name, int size, const GLfloat *m, int count);
void sendImage(const std::string &name, const Image &image);
void sendCanvas(const std::string &name, const Canvas &canvas);
private:
GLint getUniformLocation(const std::string &name);
void checkSetUniformError();
GLuint _program;
std::string _code; // volatile and stuff
// uniform location buffer
std::map<std::string, GLint> _uniforms;
// texture unit pool for setting images
std::map<std::string, GLint> _texture_unit_pool;
GLint getTextureUnit(const std::string &name);
static std::vector<bool> _unit_available;
};
} // opengl
} // graphics
} // love
#endif // LOVE_GRAPHICS_EFFECT_H
+2 -2
View File
@@ -21,8 +21,8 @@
#include "Quad.h"
#include "common/Matrix.h"
// GLee
#include "GLee.h"
// OpenGL
#include "OpenGL.h"
// STD
#include <cstring> // For memcpy
+455
View File
@@ -0,0 +1,455 @@
/**
* Copyright (c) 2006-2012 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
**/
#include <algorithm>
#include "Shader.h"
#include "Graphics.h"
namespace love
{
namespace graphics
{
namespace opengl
{
namespace
{
// temporarily attaches a shader program (for setting uniforms, etc)
// reattaches the originally active program when destroyed
struct TemporaryAttacher
{
TemporaryAttacher(Shader *shader)
: curShader(shader)
, prevShader(Shader::current)
{
curShader->attach(true);
}
~TemporaryAttacher()
{
if (prevShader != NULL)
prevShader->attach();
else
Shader::detach();
}
Shader *curShader;
Shader *prevShader;
};
} // anonymous namespace
Shader *Shader::current = NULL;
GLint Shader::maxTextureUnits = 0;
std::vector<int> Shader::textureCounters;
Shader::Shader(const ShaderSources &sources)
: shaderSources(sources)
, program(0)
{
if (shaderSources.empty())
throw love::Exception("Cannot create shader: no source code!");
GLint maxtexunits;
glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &maxtexunits);
maxTextureUnits = std::max(maxtexunits - 1, 0);
// initialize global texture id counters if needed
if (textureCounters.size() < (size_t) maxTextureUnits)
textureCounters.resize(maxTextureUnits, 0);
// load shader source and create program object
loadVolatile();
}
Shader::~Shader()
{
if (current == this)
detach();
unloadVolatile();
}
GLuint Shader::compileCode(ShaderType type, const std::string &code)
{
GLenum glshadertype;
const char *shadertypename = NULL;
switch (type)
{
case TYPE_VERTEX:
glshadertype = GL_VERTEX_SHADER;
shadertypename = "vertex";
break;
case TYPE_FRAGMENT:
glshadertype = GL_FRAGMENT_SHADER;
shadertypename = "fragment";
break;
default:
throw love::Exception("Cannot create shader object: unknown shader type.");
break;
}
// clear existing errors
while (glGetError() != GL_NO_ERROR);
GLuint shaderid = glCreateShader(glshadertype);
if (shaderid == 0) // oh no!
{
GLenum err = glGetError();
if (err == GL_INVALID_ENUM) // invalid or unsupported shader type
throw love::Exception("Cannot create %s shader object: %s shaders not supported.", shadertypename, shadertypename);
else // other errors should only happen between glBegin() and glEnd()
throw love::Exception("Cannot create %s shader object.", shadertypename);
}
const char *src = code.c_str();
size_t srclen = code.length();
glShaderSource(shaderid, 1, (const GLchar **)&src, (GLint *)&srclen);
glCompileShader(shaderid);
GLint status;
glGetShaderiv(shaderid, GL_COMPILE_STATUS, &status);
if (status == GL_FALSE)
{
GLint infologlen;
glGetShaderiv(shaderid, GL_INFO_LOG_LENGTH, &infologlen);
GLchar *errorlog = new GLchar[infologlen + 1];
glGetShaderInfoLog(shaderid, infologlen, NULL, errorlog);
std::string tmp(errorlog);
delete[] errorlog;
glDeleteShader(shaderid);
throw love::Exception("Cannot compile %s shader code:\n%s", shadertypename, tmp.c_str());
}
return shaderid;
}
void Shader::createProgram(const std::vector<GLuint> &shaderids)
{
program = glCreateProgram();
if (program == 0) // should only fail when called between glBegin() and glEnd()
throw love::Exception("Cannot create shader program object.");
std::vector<GLuint>::const_iterator it;
for (it = shaderids.begin(); it != shaderids.end(); ++it)
glAttachShader(program, *it);
glLinkProgram(program);
for (it = shaderids.begin(); it != shaderids.end(); ++it)
glDeleteShader(*it); // flag shaders for auto-deletion when program object is deleted
GLint status;
glGetProgramiv(program, GL_LINK_STATUS, &status);
if (status == GL_FALSE)
{
const std::string warnings = getWarnings();
glDeleteProgram(program);
throw love::Exception("Cannot link shader program object:\n%s", warnings.c_str());
}
}
bool Shader::loadVolatile()
{
// zero out active texture list
activeTextureUnits.clear();
activeTextureUnits.insert(activeTextureUnits.begin(), maxTextureUnits, 0);
std::vector<GLuint> shaderids;
ShaderSources::const_iterator source;
for (source = shaderSources.begin(); source != shaderSources.end(); ++source)
{
GLuint shaderid = compileCode(source->first, source->second);
shaderids.push_back(shaderid);
}
if (shaderids.empty())
throw love::Exception("Cannot create shader: no valid source code!");
createProgram(shaderids);
if (current == this)
{
current = NULL; // make sure glUseProgram gets called
attach();
}
return true;
}
void Shader::unloadVolatile()
{
if (current == this)
glUseProgram(0);
if (program != 0)
glDeleteProgram(program);
program = 0;
// decrement global texture id counters for texture units which had textures bound from this shader
for (size_t i = 0; i < activeTextureUnits.size(); ++i)
{
if (activeTextureUnits[i] > 0)
textureCounters[i] = std::max(textureCounters[i] - 1, 0);
}
// active texture list is probably invalid, clear it
activeTextureUnits.clear();
activeTextureUnits.insert(activeTextureUnits.begin(), maxTextureUnits, 0);
// same with uniform location list
uniforms.clear();
}
std::string Shader::getWarnings() const
{
GLint strlen, nullpos;
glGetProgramiv(program, GL_INFO_LOG_LENGTH, &strlen);
char *tempstr = new char[strlen+1];
// be extra sure that the error string will be 0-terminated
memset(tempstr, '\0', strlen+1);
glGetProgramInfoLog(program, strlen, &nullpos, tempstr);
tempstr[nullpos] = '\0';
std::string warnings(tempstr);
delete[] tempstr;
return warnings;
}
void Shader::attach(bool temporary)
{
if (current != this)
glUseProgram(program);
current = this;
if (!temporary)
{
// make sure all sent textures are properly bound to their respective texture units
// note: list potentially contains texture ids of deleted/invalid textures!
for (size_t i = 0; i < activeTextureUnits.size(); ++i)
{
if (activeTextureUnits[i] > 0)
bindTextureToUnit(activeTextureUnits[i], i + 1, false);
}
setActiveTextureUnit(0);
}
}
void Shader::detach()
{
if (current != NULL)
glUseProgram(0);
current = NULL;
}
void Shader::sendFloat(const std::string &name, int size, const GLfloat *vec, int count)
{
TemporaryAttacher attacher(this);
GLint location = getUniformLocation(name);
if (size < 1 || size > 4)
throw love::Exception("Invalid variable size: %d (expected 1-4).", size);
switch (size)
{
case 4:
glUniform4fv(location, count, vec);
break;
case 3:
glUniform3fv(location, count, vec);
break;
case 2:
glUniform2fv(location, count, vec);
break;
case 1:
default:
glUniform1fv(location, count, vec);
break;
}
// throw error if needed
checkSetUniformError();
}
void Shader::sendMatrix(const std::string &name, int size, const GLfloat *m, int count)
{
TemporaryAttacher attacher(this);
GLint location = getUniformLocation(name);
if (size < 2 || size > 4)
{
throw love::Exception("Invalid matrix size: %dx%d "
"(can only set 2x2, 3x3 or 4x4 matrices).", size,size);
}
switch (size)
{
case 4:
glUniformMatrix4fv(location, count, GL_FALSE, m);
break;
case 3:
glUniformMatrix3fv(location, count, GL_FALSE, m);
break;
case 2:
default:
glUniformMatrix2fv(location, count, GL_FALSE, m);
break;
}
// throw error if needed
checkSetUniformError();
}
void Shader::sendTexture(const std::string &name, GLuint texture)
{
TemporaryAttacher attacher(this);
GLint location = getUniformLocation(name);
int textureunit = getTextureUnit(name);
// bind texture to assigned texture unit and send uniform to shader program
bindTextureToUnit(texture, textureunit, false);
glUniform1i(location, textureunit);
// reset texture unit
setActiveTextureUnit(0);
// throw error if needed
checkSetUniformError();
// increment global shader texture id counter for this texture unit, if we haven't already
if (activeTextureUnits[textureunit-1] == 0)
++textureCounters[textureunit-1];
// store texture id so it can be re-bound to the proper texture unit when necessary
activeTextureUnits[textureunit-1] = texture;
}
void Shader::sendImage(const std::string &name, const Image &image)
{
sendTexture(name, image.getTextureName());
}
void Shader::sendCanvas(const std::string &name, const Canvas &canvas)
{
sendTexture(name, canvas.getTextureName());
}
GLint Shader::getUniformLocation(const std::string &name)
{
std::map<std::string, GLint>::const_iterator it = uniforms.find(name);
if (it != uniforms.end())
return it->second;
GLint location = glGetUniformLocation(program, name.c_str());
if (location == -1)
{
throw love::Exception(
"Cannot get location of shader variable `%s'.\n"
"A common error is to define but not use the variable.", name.c_str());
}
uniforms[name] = location;
return location;
}
int Shader::getTextureUnit(const std::string &name)
{
std::map<std::string, GLint>::const_iterator it = textureUnitPool.find(name);
if (it != textureUnitPool.end())
return it->second;
int textureunit = 1;
// prefer texture units which are unused by all other shaders
std::vector<int>::iterator nextfreeunit = std::find(textureCounters.begin(), textureCounters.end(), 0);
if (nextfreeunit != textureCounters.end())
textureunit = std::distance(textureCounters.begin(), nextfreeunit) + 1; // we don't want to use unit 0
else
{
// no completely unused texture units exist, try to use next free slot in our own list
std::vector<GLuint>::iterator nexttexunit = std::find(activeTextureUnits.begin(), activeTextureUnits.end(), 0);
if (nexttexunit == activeTextureUnits.end())
throw love::Exception("No more texture units available for shader.");
textureunit = std::distance(activeTextureUnits.begin(), nexttexunit) + 1; // we don't want to use unit 0
}
textureUnitPool[name] = textureunit;
return textureunit;
}
void Shader::checkSetUniformError()
{
GLenum error_code = glGetError();
if (GL_INVALID_OPERATION == error_code)
{
throw love::Exception(
"Invalid operation:\n"
"- Trying to send the wrong value type to shader variable, or\n"
"- Trying to send array values with wrong dimension, or\n"
"- Invalid variable name.");
}
}
std::string Shader::getGLSLVersion()
{
// GL_SHADING_LANGUAGE_VERSION may not be available in OpenGL < 2.0.
const char *tmp = (const char *) glGetString(GL_SHADING_LANGUAGE_VERSION);
if (tmp == NULL)
return "0.0";
// the version string always begins with a version number of the format
// major_number.minor_number
// or
// major_number.minor_number.release_number
// we can keep release_number, since it does not affect the check below.
std::string versionstring(tmp);
size_t minorendpos = versionstring.find(' ');
return versionstring.substr(0, minorendpos);
}
bool Shader::isSupported()
{
return GLEE_VERSION_2_0 && getGLSLVersion() >= "1.2";
}
} // opengl
} // graphics
} // love
+159
View File
@@ -0,0 +1,159 @@
/**
* Copyright (c) 2006-2012 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
**/
#ifndef LOVE_GRAPHICS_SHADER_H
#define LOVE_GRAPHICS_SHADER_H
#include "common/Object.h"
#include <string>
#include <map>
#include <vector>
#include "OpenGL.h"
#include "Image.h"
#include "Canvas.h"
namespace love
{
namespace graphics
{
namespace opengl
{
// A GLSL shader
class Shader : public Object, public Volatile
{
public:
// Pointer to currently active Shader.
static Shader *current;
enum ShaderType
{
TYPE_VERTEX,
TYPE_FRAGMENT,
TYPE_MAX_ENUM
};
// Type for a list of shader source codes in the form of sources[shadertype] = code
typedef std::map<ShaderType, std::string> ShaderSources;
/**
* Creates a new Shader using a list of source codes.
* Sources must contain either vertex or fragment shader code, or both.
**/
Shader(const ShaderSources &sources);
virtual ~Shader();
// Implements Volatile
virtual bool loadVolatile();
virtual void unloadVolatile();
/**
* Binds this Shader's program to be used when rendering.
*
* @param temporary True if we just want to send values to the shader with no intention of rendering.
**/
void attach(bool temporary = false);
/**
* Detach the currently bound Shader.
* Causes the GPU rendering pipeline to use fixed functionality in place of shader programs.
**/
static void detach();
/**
* Returns any warnings this Shader may have generated.
**/
std::string getWarnings() const;
/**
* Send at least one float or vector value to this Shader as a uniform.
*
* @param name The name of the uniform variable in the source code.
* @param size Number of elements in each vector to send.
* A value of 1 indicates a single-component vector (a float).
* @param vec Pointer to the float or vector values.
* @param count Number of float or vector values.
**/
void sendFloat(const std::string &name, int size, const GLfloat *vec, int count);
/**
* Send at least one matrix to this Shader as a uniform.
*
* @param name The name of the uniform variable in the source code.
* @param size Number of rows/columns in the matrix.
* @param m Pointer to the first element of the first matrix.
* @param count Number of matrices to send.
**/
void sendMatrix(const std::string &name, int size, const GLfloat *m, int count);
/**
* Send an image to this Shader as a uniform.
*
* @param name The name of the uniform variable in the source code.
**/
void sendImage(const std::string &name, const Image &image);
/**
* Send a canvas to this Shader as a uniform.
*
* @param name The name of the uniform variable in the source code.
**/
void sendCanvas(const std::string &name, const Canvas &canvas);
static std::string getGLSLVersion();
static bool isSupported();
private:
GLint getUniformLocation(const std::string &name);
void checkSetUniformError();
GLuint compileCode(ShaderType type, const std::string &code);
void createProgram(const std::vector<GLuint> &shaderids);
int getTextureUnit(const std::string &name);
void sendTexture(const std::string &name, GLuint texture);
// List of all shader code attached to this Shader
ShaderSources shaderSources;
GLuint program; // volatile
// Uniform location buffer map
std::map<std::string, GLint> uniforms;
// Texture unit pool for setting images
std::map<std::string, GLint> textureUnitPool; // textureUnitPool[name] = textureunit
std::vector<GLuint> activeTextureUnits; // activeTextureUnits[textureunit-1] = textureid
// Max GPU texture units available for sent images
static GLint maxTextureUnits;
// Counts total number of textures bound to each texture unit in all shaders
static std::vector<int> textureCounters;
};
} // opengl
} // graphics
} // love
#endif // LOVE_GRAPHICS_SHADER_H
+6 -1
View File
@@ -23,6 +23,9 @@
// STD
#include <iostream>
// OpenGL
#include "OpenGL.h"
// LOVE
#include "Image.h"
#include "Quad.h"
@@ -222,7 +225,9 @@ void SpriteBatch::draw(float x, float y, float angle, float sx, float sy, float
glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
glDisableClientState(GL_COLOR_ARRAY);
if (color)
glDisableClientState(GL_COLOR_ARRAY);
glPopMatrix();
}
@@ -34,9 +34,6 @@
#include "graphics/Volatile.h"
#include "graphics/Color.h"
// OpenGL
#include "GLee.h"
namespace love
{
namespace graphics
+1 -1
View File
@@ -26,7 +26,7 @@
#include "graphics/Volatile.h"
// OpenGL
#include "GLee.h"
#include "OpenGL.h"
namespace love
{
+48 -27
View File
@@ -19,7 +19,7 @@
**/
#include "wrap_Graphics.h"
#include "GLee.h"
#include "OpenGL.h"
#include "graphics/DrawQable.h"
#include "image/ImageData.h"
#include "font/Rasterizer.h"
@@ -433,29 +433,50 @@ int w_newCanvas(lua_State *L)
return 1;
}
int w_newPixelEffect(lua_State *L)
int w_newShader(lua_State *L)
{
if (!PixelEffect::isSupported())
return luaL_error(L, "Sorry, your graphics card does not support pixel effects.");
if (!Shader::isSupported())
return luaL_error(L, "Sorry, your graphics card does not support shaders.");
try
{
luaL_checkstring(L, 1);
// clamp stack to 2 elements
lua_settop(L, 2);
luax_getfunction(L, "graphics", "_effectCodeToGLSL");
lua_pushvalue(L, 1);
lua_pcall(L, 1, 1, 0);
const char *code = lua_tostring(L, -1);
PixelEffect *effect = instance->newPixelEffect(code);
luax_newtype(L, "PixelEffect", GRAPHICS_PIXELEFFECT_T, (void *)effect);
// push vertcode and fragcode strings to the top of the stack so they become arguments for the function
lua_pushvalue(L, 1);
lua_pushvalue(L, 2);
// call effectCodeToGLSL, returned values will be at the top of the stack
lua_pcall(L, 2, 2, 0);
Shader::ShaderSources sources;
// vertex shader code
if (lua_isstring(L, -2))
{
std::string vertcode(luaL_checkstring(L, -2));
sources[Shader::TYPE_VERTEX] = vertcode;
}
// fragment shader code
if (lua_isstring(L, -1))
{
std::string fragcode(luaL_checkstring(L, -1));
sources[Shader::TYPE_FRAGMENT] = fragcode;
}
Shader *shader = instance->newShader(sources);
luax_newtype(L, "Shader", GRAPHICS_SHADER_T, (void *)shader);
}
catch(const love::Exception &e)
{
// memory is freed in Graphics::newPixelEffect
// memory is freed in Graphics::newShader
luax_getfunction(L, "graphics", "_transformGLSLErrorMessages");
lua_pushstring(L, e.what());
lua_pcall(L, 1,1, 0);
lua_pcall(L, 1, 1, 0);
const char *err = lua_tostring(L, -1);
return luaL_error(L, "%s", err);
}
@@ -798,26 +819,26 @@ int w_getCanvas(lua_State *L)
return 1;
}
int w_setPixelEffect(lua_State *L)
int w_setShader(lua_State *L)
{
if (lua_isnoneornil(L,1))
{
PixelEffect::detach();
Shader::detach();
return 0;
}
PixelEffect *effect = luax_checkpixeleffect(L, 1);
effect->attach();
Shader *shader = luax_checkshader(L, 1);
shader->attach();
return 0;
}
int w_getPixelEffect(lua_State *L)
int w_getShader(lua_State *L)
{
PixelEffect *effect = PixelEffect::current;
if (effect)
Shader *shader = Shader::current;
if (shader)
{
effect->retain();
luax_newtype(L, "PixelEffect", GRAPHICS_PIXELEFFECT_T, (void *) effect);
shader->retain();
luax_newtype(L, "Shader", GRAPHICS_SHADER_T, (void *) shader);
}
else
lua_pushnil(L);
@@ -845,8 +866,8 @@ int w_isSupported(lua_State *L)
if (!Canvas::isHdrSupported())
supported = false;
break;
case Graphics::SUPPORT_PIXELEFFECT:
if (!PixelEffect::isSupported())
case Graphics::SUPPORT_SHADER:
if (!Shader::isSupported())
supported = false;
break;
case Graphics::SUPPORT_NPOT:
@@ -1265,7 +1286,7 @@ static const luaL_Reg functions[] =
{ "newSpriteBatch", w_newSpriteBatch },
{ "newParticleSystem", w_newParticleSystem },
{ "newCanvas", w_newCanvas },
{ "newPixelEffect", w_newPixelEffect },
{ "newShader", w_newShader },
{ "setColor", w_setColor },
{ "getColor", w_getColor },
@@ -1296,8 +1317,8 @@ static const luaL_Reg functions[] =
{ "setCanvas", w_setCanvas },
{ "getCanvas", w_getCanvas },
{ "setPixelEffect", w_setPixelEffect },
{ "getPixelEffect", w_getPixelEffect },
{ "setShader", w_setShader },
{ "getShader", w_getShader },
{ "isSupported", w_isSupported },
@@ -1358,7 +1379,7 @@ static const lua_CFunction types[] =
luaopen_spritebatch,
luaopen_particlesystem,
luaopen_canvas,
luaopen_pixeleffect,
luaopen_shader,
0
};
+4 -3
View File
@@ -28,7 +28,7 @@
#include "wrap_SpriteBatch.h"
#include "wrap_ParticleSystem.h"
#include "wrap_Canvas.h"
#include "wrap_PixelEffect.h"
#include "wrap_Shader.h"
#include "Graphics.h"
namespace love
@@ -63,7 +63,7 @@ int w_newImageFont(lua_State *L);
int w_newSpriteBatch(lua_State *L);
int w_newParticleSystem(lua_State *L);
int w_newCanvas(lua_State *L); // comments in function
int w_newPixelEffect(lua_State *L);
int w_newShader(lua_State *L);
int w_setColor(lua_State *L);
int w_getColor(lua_State *L);
int w_setBackgroundColor(lua_State *L);
@@ -90,7 +90,8 @@ int w_getMaxPointSize(lua_State *L);
int w_newScreenshot(lua_State *L);
int w_setCanvas(lua_State *L);
int w_getCanvas(lua_State *L);
int w_setPixelEffect(lua_State *L);
int w_setShader(lua_State *L);
int w_getShader(lua_State *L);
int w_isSupported(lua_State *L);
int w_draw(lua_State *L);
int w_drawq(lua_State *L);
@@ -18,12 +18,11 @@
* 3. This notice may not be removed or altered from any source distribution.
**/
#include "wrap_PixelEffect.h"
#include "wrap_Shader.h"
#include "wrap_Image.h"
#include "wrap_Canvas.h"
#include <string>
#include <iostream>
using namespace std;
namespace love
{
@@ -32,46 +31,50 @@ namespace graphics
namespace opengl
{
PixelEffect *luax_checkpixeleffect(lua_State *L, int idx)
Shader *luax_checkshader(lua_State *L, int idx)
{
return luax_checktype<PixelEffect>(L, idx, "PixelEffect", GRAPHICS_PIXELEFFECT_T);
return luax_checktype<Shader>(L, idx, "Shader", GRAPHICS_SHADER_T);
}
int w_PixelEffect_getWarnings(lua_State *L)
int w_Shader_getWarnings(lua_State *L)
{
PixelEffect *effect = luax_checkpixeleffect(L, 1);
lua_pushstring(L, effect->getWarnings().c_str());
Shader *shader = luax_checkshader(L, 1);
lua_pushstring(L, shader->getWarnings().c_str());
return 1;
}
static int _sendScalars(lua_State *L, PixelEffect *effect, const char *name, int count)
static int _sendScalars(lua_State *L, Shader *shader, const char *name, int count)
{
float *values = new float[count];
for (int i = 0; i < count; ++i)
{
if (!lua_isnumber(L, 3 + i))
if (lua_isnumber(L, 3 + i))
values[i] = (float)lua_tonumber(L, 3 + i);
else if (lua_isboolean(L, 3 + i))
values[i] = (float)lua_toboolean(L, 3 + i);
else
{
delete[] values;
return luaL_typerror(L, 3 + i, "number");
return luaL_typerror(L, 3 + i, "number or boolean");
}
values[i] = (float)lua_tonumber(L, 3 + i);
}
try
{
effect->sendFloat(name, 1, values, count);
shader->sendFloat(name, 1, values, count);
}
catch(love::Exception &e)
{
delete[] values;
return luaL_error(L, e.what());
return luaL_error(L, "%s", e.what());
}
delete[] values;
return 0;
}
static int _sendVectors(lua_State *L, PixelEffect *effect, const char *name, int count)
static int _sendVectors(lua_State *L, Shader *shader, const char *name, int count)
{
size_t dimension = lua_objlen(L, 3);
float *values = new float[count * dimension];
@@ -93,46 +96,49 @@ static int _sendVectors(lua_State *L, PixelEffect *effect, const char *name, int
for (size_t k = 1; k <= dimension; ++k)
{
lua_rawgeti(L, 3 + i, k);
values[i * dimension + k - 1] = (float)lua_tonumber(L, -1);
if (lua_isboolean(L, -1))
values[i * dimension + k - 1] = (float)lua_toboolean(L, -1);
else
values[i * dimension + k - 1] = (float)lua_tonumber(L, -1);
}
lua_pop(L, int(dimension));
}
try
{
effect->sendFloat(name, dimension, values, count);
shader->sendFloat(name, dimension, values, count);
}
catch(love::Exception &e)
{
delete[] values;
return luaL_error(L, e.what());
return luaL_error(L, "%s", e.what());
}
delete[] values;
return 0;
}
int w_PixelEffect_sendFloat(lua_State *L)
int w_Shader_sendFloat(lua_State *L)
{
PixelEffect *effect = luax_checkpixeleffect(L, 1);
Shader *shader = luax_checkshader(L, 1);
const char *name = luaL_checkstring(L, 2);
int count = lua_gettop(L) - 2;
if (count < 1)
return luaL_error(L, "No variable to send.");
if (lua_isnumber(L, 3))
return _sendScalars(L, effect, name, count);
if (lua_isnumber(L, 3) || lua_isboolean(L, 3))
return _sendScalars(L, shader, name, count);
else if (lua_istable(L, 3))
return _sendVectors(L, effect, name, count);
return _sendVectors(L, shader, name, count);
return luaL_typerror(L, 3, "number or table");
return luaL_typerror(L, 3, "number, boolean, or table");
}
int w_PixelEffect_sendMatrix(lua_State *L)
int w_Shader_sendMatrix(lua_State *L)
{
int count = lua_gettop(L) - 2;
PixelEffect *effect = luax_checkpixeleffect(L, 1);
Shader *shader = luax_checkshader(L, 1);
const char *name = luaL_checkstring(L, 2);
if (!lua_istable(L, 3))
@@ -174,49 +180,49 @@ int w_PixelEffect_sendMatrix(lua_State *L)
try
{
effect->sendMatrix(name, dimension, values, count);
shader->sendMatrix(name, dimension, values, count);
}
catch(love::Exception &e)
{
delete[] values;
return luaL_error(L, e.what());
return luaL_error(L, "%s", e.what());
}
delete[] values;
return 0;
}
int w_PixelEffect_sendImage(lua_State *L)
int w_Shader_sendImage(lua_State *L)
{
PixelEffect *effect = luax_checkpixeleffect(L, 1);
Shader *shader = luax_checkshader(L, 1);
const char *name = luaL_checkstring(L, 2);
Image *img = luax_checkimage(L, 3);
try
{
effect->sendImage(name, *img);
shader->sendImage(name, *img);
}
catch(love::Exception &e)
{
luaL_error(L, e.what());
luaL_error(L, "%s", e.what());
}
return 0;
}
int w_PixelEffect_sendCanvas(lua_State *L)
int w_Shader_sendCanvas(lua_State *L)
{
PixelEffect *effect = luax_checkpixeleffect(L, 1);
Shader *shader = luax_checkshader(L, 1);
const char *name = luaL_checkstring(L, 2);
Canvas *canvas = luax_checkcanvas(L, 3);
try
{
effect->sendCanvas(name, *canvas);
shader->sendCanvas(name, *canvas);
}
catch(love::Exception &e)
{
luaL_error(L, e.what());
luaL_error(L, "%s", e.what());
}
return 0;
@@ -225,17 +231,17 @@ int w_PixelEffect_sendCanvas(lua_State *L)
static const luaL_Reg functions[] =
{
{ "getWarnings", w_PixelEffect_getWarnings },
{ "sendFloat", w_PixelEffect_sendFloat },
{ "sendMatrix", w_PixelEffect_sendMatrix },
{ "sendImage", w_PixelEffect_sendImage },
{ "sendCanvas", w_PixelEffect_sendCanvas },
{ "getWarnings", w_Shader_getWarnings },
{ "sendFloat", w_Shader_sendFloat },
{ "sendMatrix", w_Shader_sendMatrix },
{ "sendImage", w_Shader_sendImage },
{ "sendCanvas", w_Shader_sendCanvas },
{ 0, 0 }
};
extern "C" int luaopen_pixeleffect(lua_State *L)
extern "C" int luaopen_shader(lua_State *L)
{
return luax_register_type(L, "PixelEffect", functions);
return luax_register_type(L, "Shader", functions);
}
} // opengl
@@ -22,7 +22,7 @@
#define LOVE_GRAPHICS_OPENGL_WRAP_PROGRAM_H
#include "common/runtime.h"
#include "PixelEffect.h"
#include "Shader.h"
namespace love
{
@@ -31,12 +31,12 @@ namespace graphics
namespace opengl
{
PixelEffect *luax_checkpixeleffect(lua_State *L, int idx);
int w_PixelEffect_getWarnings(lua_State *L);
int w_PixelEffect_sendFloat(lua_State *L);
int w_PixelEffect_sendMatrix(lua_State *L);
int w_PixelEffect_sendImage(lua_State *L);
extern "C" int luaopen_pixeleffect(lua_State *L);
Shader *luax_checkshader(lua_State *L, int idx);
int w_Shader_getWarnings(lua_State *L);
int w_Shader_sendFloat(lua_State *L);
int w_Shader_sendMatrix(lua_State *L);
int w_Shader_sendImage(lua_State *L);
extern "C" int luaopen_shader(lua_State *L);
} // opengl
} // graphics
+3
View File
@@ -63,6 +63,8 @@ Window::_currentMode::_currentMode()
bool Window::setWindow(int width, int height, bool fullscreen, bool vsync, int fsaa)
{
bool mouseVisible = getMouseVisible();
int keyrepeatDelay, keyrepeatInterval;
SDL_GetKeyRepeat(&keyrepeatDelay, &keyrepeatInterval);
// We need to restart the subsystem for two reasons:
// 1) Special case for fullscreen -> windowed. Windows XP did not
@@ -87,6 +89,7 @@ bool Window::setWindow(int width, int height, bool fullscreen, bool vsync, int f
// Set caption.
setWindowTitle(windowTitle);
setMouseVisible(mouseVisible);
SDL_EnableKeyRepeat(keyrepeatDelay, keyrepeatInterval);
// Set GL attributes
SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);
+1 -1
View File
@@ -760,7 +760,7 @@ function love.releaseerrhand(msg)
end
love.graphics.setCanvas()
love.graphics.setPixelEffect()
love.graphics.setShader()
-- Load.
if love.audio then love.audio.stop() end
+1 -1
View File
@@ -1783,7 +1783,7 @@ const unsigned char boot_lua[] =
0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x73, 0x65, 0x74,
0x43, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x28, 0x29, 0x0a,
0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x73, 0x65, 0x74,
0x50, 0x69, 0x78, 0x65, 0x6c, 0x45, 0x66, 0x66, 0x65, 0x63, 0x74, 0x28, 0x29, 0x0a,
0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x28, 0x29, 0x0a,
0x09, 0x2d, 0x2d, 0x20, 0x4c, 0x6f, 0x61, 0x64, 0x2e, 0x0a,
0x09, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x20, 0x74, 0x68, 0x65,
0x6e, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2e, 0x73, 0x74, 0x6f, 0x70, 0x28,
+157 -40
View File
@@ -1243,6 +1243,9 @@ do
FhERERESFxcLCwsbGxsWEggSDxQPFA8SCgkSDg4ODg4OCw4OAAAAAAACAAgAAv//AAMAAQAA
AAIAAAxQCuxfDzz1AB8IAAAAAAC6ufC4AAAAALrCZ5H+if4dCkwHbQAAAAgAAQAAAAAAAA==
]], "Vera.ttf", "base64")
local table_concat = table.concat
local type = type
local _newFont = love.graphics.newFont
love.graphics.newFont = function(font, size)
@@ -1283,26 +1286,116 @@ do
love.graphics.printf(...)
end
-- PIXEL EFFECTS
local GLSL_HEADER_LINE_COUNT = 6
local GLSL_HEADER = [[#version 120
#define number float
#define Image sampler2D
#define extern uniform
#define Texel texture2D
uniform sampler2D _tex0_;]]
local GLSL_FOOTER = [[void main() {
// fix weird crashing issue in OSX when _tex0_ is unused within effect()
float dummy = texture2D(_tex0_, vec2(.5)).r;
gl_FragColor = effect(gl_Color, _tex0_, gl_TexCoord[0].xy, gl_FragCoord.xy);
}]]
function love.graphics._effectCodeToGLSL(code)
return table.concat{GLSL_HEADER, "\n", code, GLSL_FOOTER}
-- SHADERS
local GLSL_VERSION = "#version 120"
local GLSL_SYNTAX = [[
#define number float
#define Image sampler2D
#define extern uniform
#define Texel texture2D]]
local GLSL_UNIFORMS = [[
#define ModelViewMatrix gl_ModelViewMatrix
#define ProjectionMatrix gl_ProjectionMatrix
#define ModelViewProjectionMatrix gl_ModelViewProjectionMatrix
#define NormalMatrix gl_NormalMatrix
uniform sampler2D _tex0_;]]
local GLSL_VERT = {
HEADER = [[
#define VERTEX
#define VertexPosition gl_Vertex
#define VertexTexCoord gl_MultiTexCoord0
#define VertexColor gl_Color
#define VaryingTexCoord gl_TexCoord[0]
#define VaryingColor gl_FrontColor]],
FOOTER = [[
void main() {
VaryingTexCoord = VertexTexCoord;
VaryingColor = VertexColor;
gl_Position = position(ModelViewProjectionMatrix, VertexPosition);
}]],
}
local GLSL_FRAG = {
HEADER = [[
#define PIXEL
#define VaryingTexCoord gl_TexCoord[0]
#define VaryingColor gl_Color]],
FOOTER = [[
void main() {
// fix weird crashing issue in OSX when _tex0_ is unused within effect()
float dummy = texture2D(_tex0_, vec2(.5)).r;
gl_FragColor = effect(VaryingColor, _tex0_, VaryingTexCoord.st, gl_FragCoord.xy);
}]],
}
local function createVertCode(vertcode)
local vertcodes = {
GLSL_VERSION,
GLSL_SYNTAX, GLSL_VERT.HEADER, GLSL_UNIFORMS,
"#line 0",
vertcode,
GLSL_VERT.FOOTER,
}
return table_concat(vertcodes, "\n")
end
local function createFragCode(fragcode)
local fragcodes = {
GLSL_VERSION,
GLSL_SYNTAX, GLSL_FRAG.HEADER, GLSL_UNIFORMS,
"#line 0",
fragcode,
GLSL_FRAG.FOOTER
}
return table_concat(fragcodes, "\n")
end
function love.graphics._shaderCodeToGLSL(vertcode, fragcode)
if vertcode then
local s = vertcode:gsub("\r\n\t", " ")
s = s:gsub("%w+(%s+)%(", "")
if s:match("vec4%s*effect%(") then
fragcode = vertcode -- first argument contains frag shader code
end
if not s:match("vec4%s*position%(") then
vertcode = nil -- first argument doesn't contain vert shader code
end
end
if fragcode then
local s = fragcode:gsub("\r\n\t", " ")
s = s:gsub("%w+(%s+)%(", "")
if s:match("vec4%s*position%(") then
vertcode = fragcode -- second argument contains vert shader code
end
if not s:match("vec4%s*effect%(") then
fragcode = nil -- second argument doesn't contain frag shader code
end
end
if vertcode then
vertcode = createVertCode(vertcode)
end
if fragcode then
fragcode = createFragCode(fragcode)
end
return vertcode, fragcode
end
function love.graphics._transformGLSLErrorMessages(message)
if not message:match("Cannot compile shader") then return message end
local lines = {"Cannot compile shader:"}
local shadertype = message:match("Cannot compile (%a+) shader code")
if not shadertype then return message end
local lines = {"Cannot compile "..shadertype.." shader code:"}
for l in message:gmatch("[^\n]+") do
-- nvidia compiler message:
-- 0(<linenumber>) : error/warning [NUMBER]: <error message>
@@ -1311,15 +1404,19 @@ do
-- ati compiler message:
-- ERROR 0:<linenumber>: error/warning(#[NUMBER]) [ERRORNAME]: <errormessage>
linenumber, what, message = l:match("^%w+: 0:(%d+):%s*(%w+)%([^%)]+%)%s*(.+)$")
if not linenumber then
-- OSX compiler message (?):
-- ERROR: 0:<linenumber>: <errormessage>
what, linenumber, message = l:match("^(%w+): %d+:(%d+): (.+)$")
end
end
if linenumber and what and message then
linenumber = linenumber - GLSL_HEADER_LINE_COUNT
lines[#lines+1] = ("Line %d: %s: %s"):format(linenumber, what, message)
end
end
-- did not match any known error messages
if #lines == 1 then return message end
return table.concat(lines, "\n")
return table_concat(lines, "\n")
end
-- helper to transform a matrix from {{a,b,c}, {d,e,f}, ...} to
@@ -1327,6 +1424,8 @@ do
local function flattenMatrices(mat, ...)
if not mat then return end
local tonumber = tonumber
local ret,l = {}, 1
ret.dimension = #mat
@@ -1340,41 +1439,59 @@ do
end
-- automagic uniform setter
local function pixeleffect_dispatch_send(self, name, value, ...)
if type(value) == "number" then -- scalar
local function shader_dispatch_send(self, name, value, ...)
local valuetype = type(value)
if valuetype == "number" or valuetype == "boolean" then -- scalar
self:sendFloat(name, value, ...)
elseif type(value) == "userdata" and value:typeOf("Image") then
elseif valuetype == "userdata" and value:typeOf("Image") then
self:sendImage(name, value)
elseif type(value) == "userdata" and value:typeOf("Canvas") then
elseif valuetype == "userdata" and value:typeOf("Canvas") then
self:sendCanvas(name, value)
elseif type(value) == "table" then -- vector or matrix
if type(value[1]) == "number" then
elseif valuetype == "table" then -- vector or matrix
valuetype = type(value[1])
if valuetype == "number" or valuetype == "boolean" then
self:sendFloat(name, value, ...)
elseif type(value[1]) == "table" then
elseif valuetype == "table" then
self:sendMatrix(name, flattenMatrices(value, ...))
else
error("Cannot send value (unsupported type: {"..type(value[1]).."}).")
error("Cannot send value (unsupported type: {"..valuetype.."}).")
end
else
local t = type(value)
if t == "userdata" and value.type then t = value.type end
error("Cannot send value (unsupported type: "..t..").")
if valuetype == "userdata" and value.type then valuetype = value.type end
error("Cannot send value (unsupported type: "..valuetype..").")
end
end
local newPixelEffect = love.graphics.newPixelEffect
function love.graphics.newPixelEffect(code)
love.graphics.newPixelEffect = function(code)
if love.filesystem and love.filesystem.exists(code) then
code = love.filesystem.read(code)
local newShader = love.graphics.newShader
function love.graphics.newShader(vertcode, fragcode)
love.graphics.newShader = function(vertcode, fragcode)
if love.filesystem then
if vertcode and love.filesystem.exists(vertcode) then
vertcode = love.filesystem.read(vertcode)
end
if fragcode and love.filesystem.exists(fragcode) then
fragcode = love.filesystem.read(fragcode)
end
end
return newPixelEffect(code)
return newShader(vertcode, fragcode)
end
local effect = love.graphics.newPixelEffect(code)
local meta = getmetatable(effect)
meta.send = pixeleffect_dispatch_send
return effect
local shader = love.graphics.newShader(vertcode, fragcode)
local meta = getmetatable(shader)
meta.send = shader_dispatch_send
meta.sendBoolean = meta.sendFloat
return shader
end
-- PixelEffect compatibility functions
function love.graphics.newPixelEffect(fragcode)
return love.graphics.newShader(nil, fragcode)
end
love.graphics.setPixelEffect = love.graphics.setShader
love.graphics.getPixelEffect = love.graphics.getShader
love.graphics._effectCodeToGLSL = love.graphics._shaderCodeToGLSL
end
+315 -110
View File
@@ -6190,6 +6190,10 @@ const unsigned char graphics_lua[] =
0x3d, 0x0a,
0x09, 0x5d, 0x5d, 0x2c, 0x20, 0x22, 0x56, 0x65, 0x72, 0x61, 0x2e, 0x74, 0x74, 0x66, 0x22, 0x2c, 0x20, 0x22,
0x62, 0x61, 0x73, 0x65, 0x36, 0x34, 0x22, 0x29, 0x0a,
0x09, 0x0a,
0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x61,
0x74, 0x20, 0x3d, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x63, 0x61, 0x74, 0x0a,
0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x20, 0x74, 0x79, 0x70, 0x65, 0x0a,
0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x5f, 0x6e, 0x65, 0x77, 0x46, 0x6f, 0x6e, 0x74, 0x20, 0x3d, 0x20,
0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x6e, 0x65, 0x77, 0x46,
0x6f, 0x6e, 0x74, 0x0a,
@@ -6259,56 +6263,205 @@ const unsigned char graphics_lua[] =
0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72,
0x69, 0x6e, 0x74, 0x66, 0x28, 0x2e, 0x2e, 0x2e, 0x29, 0x0a,
0x09, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x2d, 0x2d, 0x20, 0x50, 0x49, 0x58, 0x45, 0x4c, 0x20, 0x45, 0x46, 0x46, 0x45, 0x43, 0x54, 0x53, 0x0a,
0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x47, 0x4c, 0x53, 0x4c, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52,
0x5f, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x20, 0x3d, 0x20, 0x36, 0x0a,
0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x47, 0x4c, 0x53, 0x4c, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52,
0x20, 0x3d, 0x20, 0x5b, 0x5b, 0x23, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x31, 0x32, 0x30, 0x0a,
0x09, 0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x66, 0x6c,
0x6f, 0x61, 0x74, 0x0a,
0x09, 0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x20, 0x73, 0x61, 0x6d,
0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x0a,
0x09, 0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x20, 0x75, 0x6e,
0x69, 0x66, 0x6f, 0x72, 0x6d, 0x0a,
0x09, 0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x20, 0x74, 0x65, 0x78,
0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x0a,
0x09, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44,
0x20, 0x5f, 0x74, 0x65, 0x78, 0x30, 0x5f, 0x3b, 0x5d, 0x5d, 0x0a,
0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x47, 0x4c, 0x53, 0x4c, 0x5f, 0x46, 0x4f, 0x4f, 0x54, 0x45, 0x52,
0x20, 0x3d, 0x20, 0x5b, 0x5b, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x29, 0x20, 0x7b, 0x0a,
0x09, 0x09, 0x2f, 0x2f, 0x20, 0x66, 0x69, 0x78, 0x20, 0x77, 0x65, 0x69, 0x72, 0x64, 0x20, 0x63, 0x72, 0x61,
0x73, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x73, 0x73, 0x75, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x4f, 0x53, 0x58,
0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x5f, 0x74, 0x65, 0x78, 0x30, 0x5f, 0x20, 0x69, 0x73, 0x20, 0x75, 0x6e,
0x75, 0x73, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x20, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74,
0x28, 0x29, 0x0a,
0x09, 0x09, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x64, 0x75, 0x6d, 0x6d, 0x79, 0x20, 0x3d, 0x20, 0x74, 0x65,
0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x28, 0x5f, 0x74, 0x65, 0x78, 0x30, 0x5f, 0x2c, 0x20, 0x76, 0x65,
0x63, 0x32, 0x28, 0x2e, 0x35, 0x29, 0x29, 0x2e, 0x72, 0x3b, 0x0a,
0x09, 0x09, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x65,
0x66, 0x66, 0x65, 0x63, 0x74, 0x28, 0x67, 0x6c, 0x5f, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x5f, 0x74,
0x65, 0x78, 0x30, 0x5f, 0x2c, 0x20, 0x67, 0x6c, 0x5f, 0x54, 0x65, 0x78, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x5b,
0x30, 0x5d, 0x2e, 0x78, 0x79, 0x2c, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6f, 0x72,
0x64, 0x2e, 0x78, 0x79, 0x29, 0x3b, 0x0a,
0x09, 0x7d, 0x5d, 0x5d, 0x0a,
0x09, 0x2d, 0x2d, 0x20, 0x53, 0x48, 0x41, 0x44, 0x45, 0x52, 0x53, 0x0a,
0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x47, 0x4c, 0x53, 0x4c, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f,
0x4e, 0x20, 0x3d, 0x20, 0x22, 0x23, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x31, 0x32, 0x30, 0x22, 0x0a,
0x09, 0x0a,
0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x47, 0x4c, 0x53, 0x4c, 0x5f, 0x53, 0x59, 0x4e, 0x54, 0x41, 0x58,
0x20, 0x3d, 0x20, 0x5b, 0x5b, 0x0a,
0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x66, 0x6c, 0x6f,
0x61, 0x74, 0x0a,
0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x70,
0x6c, 0x65, 0x72, 0x32, 0x44, 0x0a,
0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x20, 0x75, 0x6e, 0x69,
0x66, 0x6f, 0x72, 0x6d, 0x0a,
0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x20, 0x74, 0x65, 0x78, 0x74,
0x75, 0x72, 0x65, 0x32, 0x44, 0x5d, 0x5d, 0x0a,
0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x47, 0x4c, 0x53, 0x4c, 0x5f, 0x55, 0x4e, 0x49, 0x46, 0x4f, 0x52,
0x4d, 0x53, 0x20, 0x3d, 0x20, 0x5b, 0x5b, 0x0a,
0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x4d,
0x61, 0x74, 0x72, 0x69, 0x78, 0x20, 0x67, 0x6c, 0x5f, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77,
0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x0a,
0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x0a,
0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50,
0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x20, 0x67, 0x6c,
0x5f, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x0a,
0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x4d, 0x61, 0x74, 0x72,
0x69, 0x78, 0x20, 0x67, 0x6c, 0x5f, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x0a,
0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x20,
0x5f, 0x74, 0x65, 0x78, 0x30, 0x5f, 0x3b, 0x5d, 0x5d, 0x0a,
0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x47, 0x4c, 0x53, 0x4c, 0x5f, 0x56, 0x45, 0x52, 0x54, 0x20, 0x3d,
0x20, 0x7b, 0x0a,
0x09, 0x09, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x20, 0x3d, 0x20, 0x5b, 0x5b, 0x0a,
0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x56, 0x45, 0x52, 0x54, 0x45, 0x58, 0x0a,
0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x50, 0x6f, 0x73, 0x69,
0x74, 0x69, 0x6f, 0x6e, 0x20, 0x67, 0x6c, 0x5f, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x0a,
0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x54, 0x65, 0x78, 0x43,
0x6f, 0x6f, 0x72, 0x64, 0x20, 0x67, 0x6c, 0x5f, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x54, 0x65, 0x78, 0x43, 0x6f,
0x6f, 0x72, 0x64, 0x30, 0x0a,
0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f,
0x72, 0x20, 0x67, 0x6c, 0x5f, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x0a,
0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x56, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x54, 0x65, 0x78,
0x43, 0x6f, 0x6f, 0x72, 0x64, 0x20, 0x67, 0x6c, 0x5f, 0x54, 0x65, 0x78, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x5b,
0x30, 0x5d, 0x0a,
0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x56, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6c,
0x6f, 0x72, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x6f, 0x6e, 0x74, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x5d, 0x5d,
0x2c, 0x0a,
0x09, 0x09, 0x46, 0x4f, 0x4f, 0x54, 0x45, 0x52, 0x20, 0x3d, 0x20, 0x5b, 0x5b, 0x0a,
0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x29, 0x20, 0x7b, 0x0a,
0x09, 0x56, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x54, 0x65, 0x78, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x20, 0x3d,
0x20, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x54, 0x65, 0x78, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x3b, 0x0a,
0x09, 0x56, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x56, 0x65,
0x72, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a,
0x09, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x70, 0x6f, 0x73,
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f,
0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x2c, 0x20, 0x56, 0x65, 0x72,
0x74, 0x65, 0x78, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x3b, 0x0a,
0x7d, 0x5d, 0x5d, 0x2c, 0x0a,
0x09, 0x7d, 0x0a,
0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x47, 0x4c, 0x53, 0x4c, 0x5f, 0x46, 0x52, 0x41, 0x47, 0x20, 0x3d,
0x20, 0x7b, 0x0a,
0x09, 0x09, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x20, 0x3d, 0x20, 0x5b, 0x5b, 0x0a,
0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x50, 0x49, 0x58, 0x45, 0x4c, 0x0a,
0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x56, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x54, 0x65, 0x78,
0x43, 0x6f, 0x6f, 0x72, 0x64, 0x20, 0x67, 0x6c, 0x5f, 0x54, 0x65, 0x78, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x5b,
0x30, 0x5d, 0x0a,
0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x56, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6c,
0x6f, 0x72, 0x20, 0x67, 0x6c, 0x5f, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x5d, 0x5d, 0x2c, 0x0a,
0x09, 0x09, 0x46, 0x4f, 0x4f, 0x54, 0x45, 0x52, 0x20, 0x3d, 0x20, 0x5b, 0x5b, 0x0a,
0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x29, 0x20, 0x7b, 0x0a,
0x09, 0x2f, 0x2f, 0x20, 0x66, 0x69, 0x78, 0x20, 0x77, 0x65, 0x69, 0x72, 0x64, 0x20, 0x63, 0x72, 0x61, 0x73,
0x68, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x73, 0x73, 0x75, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x4f, 0x53, 0x58, 0x20,
0x77, 0x68, 0x65, 0x6e, 0x20, 0x5f, 0x74, 0x65, 0x78, 0x30, 0x5f, 0x20, 0x69, 0x73, 0x20, 0x75, 0x6e, 0x75,
0x73, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x20, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x28,
0x29, 0x0a,
0x09, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x64, 0x75, 0x6d, 0x6d, 0x79, 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78,
0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x28, 0x5f, 0x74, 0x65, 0x78, 0x30, 0x5f, 0x2c, 0x20, 0x76, 0x65, 0x63,
0x32, 0x28, 0x2e, 0x35, 0x29, 0x29, 0x2e, 0x72, 0x3b, 0x0a,
0x09, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x65, 0x66,
0x66, 0x65, 0x63, 0x74, 0x28, 0x56, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c,
0x20, 0x5f, 0x74, 0x65, 0x78, 0x30, 0x5f, 0x2c, 0x20, 0x56, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x54, 0x65,
0x78, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x2e, 0x73, 0x74, 0x2c, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67,
0x43, 0x6f, 0x6f, 0x72, 0x64, 0x2e, 0x78, 0x79, 0x29, 0x3b, 0x0a,
0x7d, 0x5d, 0x5d, 0x2c, 0x0a,
0x09, 0x7d, 0x0a,
0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x72,
0x65, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x28, 0x76, 0x65, 0x72, 0x74, 0x63,
0x6f, 0x64, 0x65, 0x29, 0x0a,
0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x76, 0x65, 0x72, 0x74, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x20,
0x3d, 0x20, 0x7b, 0x0a,
0x09, 0x09, 0x09, 0x47, 0x4c, 0x53, 0x4c, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x2c, 0x0a,
0x09, 0x09, 0x09, 0x47, 0x4c, 0x53, 0x4c, 0x5f, 0x53, 0x59, 0x4e, 0x54, 0x41, 0x58, 0x2c, 0x20, 0x47, 0x4c,
0x53, 0x4c, 0x5f, 0x56, 0x45, 0x52, 0x54, 0x2e, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x2c, 0x20, 0x47, 0x4c,
0x53, 0x4c, 0x5f, 0x55, 0x4e, 0x49, 0x46, 0x4f, 0x52, 0x4d, 0x53, 0x2c, 0x0a,
0x09, 0x09, 0x09, 0x22, 0x23, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x30, 0x22, 0x2c, 0x0a,
0x09, 0x09, 0x09, 0x76, 0x65, 0x72, 0x74, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x0a,
0x09, 0x09, 0x09, 0x47, 0x4c, 0x53, 0x4c, 0x5f, 0x56, 0x45, 0x52, 0x54, 0x2e, 0x46, 0x4f, 0x4f, 0x54, 0x45,
0x52, 0x2c, 0x0a,
0x09, 0x09, 0x7d, 0x0a,
0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e,
0x63, 0x61, 0x74, 0x28, 0x76, 0x65, 0x72, 0x74, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x2c, 0x20, 0x22, 0x5c, 0x6e,
0x22, 0x29, 0x0a,
0x09, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x72,
0x65, 0x61, 0x74, 0x65, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x28, 0x66, 0x72, 0x61, 0x67, 0x63,
0x6f, 0x64, 0x65, 0x29, 0x0a,
0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x72, 0x61, 0x67, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x20,
0x3d, 0x20, 0x7b, 0x0a,
0x09, 0x09, 0x09, 0x47, 0x4c, 0x53, 0x4c, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x2c, 0x0a,
0x09, 0x09, 0x09, 0x47, 0x4c, 0x53, 0x4c, 0x5f, 0x53, 0x59, 0x4e, 0x54, 0x41, 0x58, 0x2c, 0x20, 0x47, 0x4c,
0x53, 0x4c, 0x5f, 0x46, 0x52, 0x41, 0x47, 0x2e, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x2c, 0x20, 0x47, 0x4c,
0x53, 0x4c, 0x5f, 0x55, 0x4e, 0x49, 0x46, 0x4f, 0x52, 0x4d, 0x53, 0x2c, 0x0a,
0x09, 0x09, 0x09, 0x22, 0x23, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x30, 0x22, 0x2c, 0x0a,
0x09, 0x09, 0x09, 0x66, 0x72, 0x61, 0x67, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x0a,
0x09, 0x09, 0x09, 0x47, 0x4c, 0x53, 0x4c, 0x5f, 0x46, 0x52, 0x41, 0x47, 0x2e, 0x46, 0x4f, 0x4f, 0x54, 0x45,
0x52, 0x0a,
0x09, 0x09, 0x7d, 0x0a,
0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e,
0x63, 0x61, 0x74, 0x28, 0x66, 0x72, 0x61, 0x67, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x2c, 0x20, 0x22, 0x5c, 0x6e,
0x22, 0x29, 0x0a,
0x09, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61,
0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x5f, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x54,
0x6f, 0x47, 0x4c, 0x53, 0x4c, 0x28, 0x63, 0x6f, 0x64, 0x65, 0x29, 0x0a,
0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6e,
0x63, 0x61, 0x74, 0x7b, 0x47, 0x4c, 0x53, 0x4c, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x2c, 0x20, 0x22,
0x5c, 0x6e, 0x22, 0x2c, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x47, 0x4c, 0x53, 0x4c, 0x5f, 0x46, 0x4f,
0x4f, 0x54, 0x45, 0x52, 0x7d, 0x0a,
0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x5f, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x54,
0x6f, 0x47, 0x4c, 0x53, 0x4c, 0x28, 0x76, 0x65, 0x72, 0x74, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x66, 0x72,
0x61, 0x67, 0x63, 0x6f, 0x64, 0x65, 0x29, 0x0a,
0x09, 0x09, 0x69, 0x66, 0x20, 0x76, 0x65, 0x72, 0x74, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
0x09, 0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x72, 0x74, 0x63,
0x6f, 0x64, 0x65, 0x3a, 0x67, 0x73, 0x75, 0x62, 0x28, 0x22, 0x5c, 0x72, 0x5c, 0x6e, 0x5c, 0x74, 0x22, 0x2c,
0x20, 0x22, 0x20, 0x22, 0x29, 0x0a,
0x09, 0x09, 0x09, 0x73, 0x20, 0x3d, 0x20, 0x73, 0x3a, 0x67, 0x73, 0x75, 0x62, 0x28, 0x22, 0x25, 0x77, 0x2b,
0x28, 0x25, 0x73, 0x2b, 0x29, 0x25, 0x28, 0x22, 0x2c, 0x20, 0x22, 0x22, 0x29, 0x0a,
0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x73, 0x3a, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x28, 0x22, 0x76, 0x65, 0x63,
0x34, 0x25, 0x73, 0x2a, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x25, 0x28, 0x22, 0x29, 0x20, 0x74, 0x68, 0x65,
0x6e, 0x0a,
0x09, 0x09, 0x09, 0x09, 0x66, 0x72, 0x61, 0x67, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x72,
0x74, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x2d, 0x2d, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x61, 0x72, 0x67,
0x75, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x66, 0x72, 0x61,
0x67, 0x20, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x0a,
0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x73, 0x3a, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x28,
0x22, 0x76, 0x65, 0x63, 0x34, 0x25, 0x73, 0x2a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x25, 0x28,
0x22, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
0x09, 0x09, 0x09, 0x09, 0x76, 0x65, 0x72, 0x74, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c,
0x20, 0x2d, 0x2d, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74,
0x20, 0x64, 0x6f, 0x65, 0x73, 0x6e, 0x27, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x76,
0x65, 0x72, 0x74, 0x20, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x0a,
0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x09, 0x69, 0x66, 0x20, 0x66, 0x72, 0x61, 0x67, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
0x09, 0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x67, 0x63,
0x6f, 0x64, 0x65, 0x3a, 0x67, 0x73, 0x75, 0x62, 0x28, 0x22, 0x5c, 0x72, 0x5c, 0x6e, 0x5c, 0x74, 0x22, 0x2c,
0x20, 0x22, 0x20, 0x22, 0x29, 0x0a,
0x09, 0x09, 0x09, 0x73, 0x20, 0x3d, 0x20, 0x73, 0x3a, 0x67, 0x73, 0x75, 0x62, 0x28, 0x22, 0x25, 0x77, 0x2b,
0x28, 0x25, 0x73, 0x2b, 0x29, 0x25, 0x28, 0x22, 0x2c, 0x20, 0x22, 0x22, 0x29, 0x0a,
0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x73, 0x3a, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x28, 0x22, 0x76, 0x65, 0x63,
0x34, 0x25, 0x73, 0x2a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x25, 0x28, 0x22, 0x29, 0x20, 0x74,
0x68, 0x65, 0x6e, 0x0a,
0x09, 0x09, 0x09, 0x09, 0x76, 0x65, 0x72, 0x74, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61,
0x67, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x2d, 0x2d, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x20, 0x61, 0x72,
0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x76, 0x65,
0x72, 0x74, 0x20, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x0a,
0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x73, 0x3a, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x28,
0x22, 0x76, 0x65, 0x63, 0x34, 0x25, 0x73, 0x2a, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x25, 0x28, 0x22, 0x29,
0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
0x09, 0x09, 0x09, 0x09, 0x66, 0x72, 0x61, 0x67, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c,
0x20, 0x2d, 0x2d, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e,
0x74, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x6e, 0x27, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x20,
0x66, 0x72, 0x61, 0x67, 0x20, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x0a,
0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x09, 0x69, 0x66, 0x20, 0x76, 0x65, 0x72, 0x74, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
0x09, 0x09, 0x09, 0x76, 0x65, 0x72, 0x74, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x63, 0x72, 0x65, 0x61,
0x74, 0x65, 0x56, 0x65, 0x72, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x28, 0x76, 0x65, 0x72, 0x74, 0x63, 0x6f, 0x64,
0x65, 0x29, 0x0a,
0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x09, 0x69, 0x66, 0x20, 0x66, 0x72, 0x61, 0x67, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
0x09, 0x09, 0x09, 0x66, 0x72, 0x61, 0x67, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x63, 0x72, 0x65, 0x61,
0x74, 0x65, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x28, 0x66, 0x72, 0x61, 0x67, 0x63, 0x6f, 0x64,
0x65, 0x29, 0x0a,
0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x76, 0x65, 0x72, 0x74, 0x63, 0x6f, 0x64, 0x65, 0x2c,
0x20, 0x66, 0x72, 0x61, 0x67, 0x63, 0x6f, 0x64, 0x65, 0x0a,
0x09, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61,
0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x47, 0x4c,
0x53, 0x4c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x28, 0x6d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x29, 0x0a,
0x09, 0x09, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x6d,
0x61, 0x74, 0x63, 0x68, 0x28, 0x22, 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x69,
0x6c, 0x65, 0x20, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x22, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72,
0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x74, 0x79, 0x70, 0x65,
0x20, 0x3d, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x28, 0x22,
0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x20, 0x28, 0x25, 0x61,
0x2b, 0x29, 0x20, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x29, 0x0a,
0x09, 0x09, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x74, 0x79, 0x70,
0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x20, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x7b, 0x22,
0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x20, 0x73, 0x68, 0x61,
0x64, 0x65, 0x72, 0x3a, 0x22, 0x7d, 0x0a,
0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x20, 0x22, 0x2e, 0x2e,
0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x2e, 0x22, 0x20, 0x73, 0x68, 0x61, 0x64,
0x65, 0x72, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x3a, 0x22, 0x7d, 0x0a,
0x09, 0x09, 0x66, 0x6f, 0x72, 0x20, 0x6c, 0x20, 0x69, 0x6e, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x3a, 0x67, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x28, 0x22, 0x5b, 0x5e, 0x5c, 0x6e, 0x5d, 0x2b, 0x22, 0x29, 0x20,
0x64, 0x6f, 0x0a,
@@ -6337,13 +6490,22 @@ const unsigned char graphics_lua[] =
0x74, 0x63, 0x68, 0x28, 0x22, 0x5e, 0x25, 0x77, 0x2b, 0x3a, 0x20, 0x30, 0x3a, 0x28, 0x25, 0x64, 0x2b, 0x29,
0x3a, 0x25, 0x73, 0x2a, 0x28, 0x25, 0x77, 0x2b, 0x29, 0x25, 0x28, 0x5b, 0x5e, 0x25, 0x29, 0x5d, 0x2b, 0x25,
0x29, 0x25, 0x73, 0x2a, 0x28, 0x2e, 0x2b, 0x29, 0x24, 0x22, 0x29, 0x0a,
0x09, 0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x6e, 0x75, 0x6d,
0x62, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
0x09, 0x09, 0x09, 0x09, 0x09, 0x2d, 0x2d, 0x20, 0x4f, 0x53, 0x58, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c,
0x65, 0x72, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x28, 0x3f, 0x29, 0x3a, 0x0a,
0x09, 0x09, 0x09, 0x09, 0x09, 0x2d, 0x2d, 0x20, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x3a, 0x20, 0x30, 0x3a, 0x3c,
0x6c, 0x69, 0x6e, 0x65, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x3e, 0x3a, 0x20, 0x3c, 0x65, 0x72, 0x72, 0x6f,
0x72, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3e, 0x0a,
0x09, 0x09, 0x09, 0x09, 0x09, 0x77, 0x68, 0x61, 0x74, 0x2c, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x6e, 0x75, 0x6d,
0x62, 0x65, 0x72, 0x2c, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x6c, 0x3a, 0x6d,
0x61, 0x74, 0x63, 0x68, 0x28, 0x22, 0x5e, 0x28, 0x25, 0x77, 0x2b, 0x29, 0x3a, 0x20, 0x25, 0x64, 0x2b, 0x3a,
0x28, 0x25, 0x64, 0x2b, 0x29, 0x3a, 0x20, 0x28, 0x2e, 0x2b, 0x29, 0x24, 0x22, 0x29, 0x0a,
0x09, 0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x61,
0x6e, 0x64, 0x20, 0x77, 0x68, 0x61, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
0x09, 0x09, 0x09, 0x09, 0x6c, 0x69, 0x6e, 0x65, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x6c,
0x69, 0x6e, 0x65, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x2d, 0x20, 0x47, 0x4c, 0x53, 0x4c, 0x5f, 0x48,
0x45, 0x41, 0x44, 0x45, 0x52, 0x5f, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x0a,
0x09, 0x09, 0x09, 0x09, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x5b, 0x23, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2b, 0x31,
0x5d, 0x20, 0x3d, 0x20, 0x28, 0x22, 0x4c, 0x69, 0x6e, 0x65, 0x20, 0x25, 0x64, 0x3a, 0x20, 0x25, 0x73, 0x3a,
0x20, 0x25, 0x73, 0x22, 0x29, 0x3a, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x6c, 0x69, 0x6e, 0x65, 0x6e,
@@ -6357,7 +6519,7 @@ const unsigned char graphics_lua[] =
0x09, 0x09, 0x69, 0x66, 0x20, 0x23, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x20, 0x3d, 0x3d, 0x20, 0x31, 0x20, 0x74,
0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x20, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6e,
0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e,
0x63, 0x61, 0x74, 0x28, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2c, 0x20, 0x22, 0x5c, 0x6e, 0x22, 0x29, 0x0a,
0x09, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x2d, 0x2d, 0x20, 0x68, 0x65, 0x6c, 0x70, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x72, 0x61, 0x6e,
@@ -6371,6 +6533,8 @@ const unsigned char graphics_lua[] =
0x20, 0x2e, 0x2e, 0x2e, 0x29, 0x0a,
0x09, 0x09, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6d, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20,
0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x3d,
0x20, 0x74, 0x6f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x0a,
0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x72, 0x65, 0x74, 0x2c, 0x6c, 0x20, 0x3d, 0x20, 0x7b, 0x7d,
0x2c, 0x20, 0x31, 0x0a,
0x09, 0x09, 0x72, 0x65, 0x74, 0x2e, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20,
@@ -6389,92 +6553,133 @@ const unsigned char graphics_lua[] =
0x09, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x2d, 0x2d, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x67, 0x69, 0x63, 0x20, 0x75, 0x6e, 0x69, 0x66,
0x6f, 0x72, 0x6d, 0x20, 0x73, 0x65, 0x74, 0x74, 0x65, 0x72, 0x0a,
0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x70, 0x69,
0x78, 0x65, 0x6c, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68,
0x5f, 0x73, 0x65, 0x6e, 0x64, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x2c, 0x20, 0x2e, 0x2e, 0x2e, 0x29, 0x0a,
0x09, 0x09, 0x69, 0x66, 0x20, 0x74, 0x79, 0x70, 0x65, 0x28, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x29, 0x20, 0x3d,
0x3d, 0x20, 0x22, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x0a,
0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x68,
0x61, 0x64, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x6e, 0x64,
0x28, 0x73, 0x65, 0x6c, 0x66, 0x2c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x2c, 0x20, 0x2e, 0x2e, 0x2e, 0x29, 0x0a,
0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x74, 0x79, 0x70, 0x65, 0x20,
0x3d, 0x20, 0x74, 0x79, 0x70, 0x65, 0x28, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x29, 0x0a,
0x09, 0x09, 0x69, 0x66, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x3d, 0x20,
0x22, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x20, 0x6f, 0x72, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x74,
0x79, 0x70, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x22, 0x20, 0x74,
0x68, 0x65, 0x6e, 0x20, 0x2d, 0x2d, 0x20, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x0a,
0x09, 0x09, 0x09, 0x73, 0x65, 0x6c, 0x66, 0x3a, 0x73, 0x65, 0x6e, 0x64, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x28,
0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2c, 0x20, 0x2e, 0x2e, 0x2e, 0x29, 0x0a,
0x09, 0x09, 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x74, 0x79, 0x70, 0x65, 0x28, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x75, 0x73, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x22, 0x20, 0x61,
0x6e, 0x64, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x74, 0x79, 0x70, 0x65, 0x4f, 0x66, 0x28, 0x22, 0x49,
0x6d, 0x61, 0x67, 0x65, 0x22, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
0x09, 0x09, 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x74, 0x79, 0x70, 0x65,
0x20, 0x3d, 0x3d, 0x20, 0x22, 0x75, 0x73, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x22, 0x20, 0x61, 0x6e, 0x64,
0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x74, 0x79, 0x70, 0x65, 0x4f, 0x66, 0x28, 0x22, 0x49, 0x6d, 0x61,
0x67, 0x65, 0x22, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
0x09, 0x09, 0x09, 0x73, 0x65, 0x6c, 0x66, 0x3a, 0x73, 0x65, 0x6e, 0x64, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x28,
0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x29, 0x0a,
0x09, 0x09, 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x74, 0x79, 0x70, 0x65, 0x28, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x75, 0x73, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x22, 0x20, 0x61,
0x6e, 0x64, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x74, 0x79, 0x70, 0x65, 0x4f, 0x66, 0x28, 0x22, 0x43,
0x61, 0x6e, 0x76, 0x61, 0x73, 0x22, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
0x09, 0x09, 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x74, 0x79, 0x70, 0x65,
0x20, 0x3d, 0x3d, 0x20, 0x22, 0x75, 0x73, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x22, 0x20, 0x61, 0x6e, 0x64,
0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x74, 0x79, 0x70, 0x65, 0x4f, 0x66, 0x28, 0x22, 0x43, 0x61, 0x6e,
0x76, 0x61, 0x73, 0x22, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
0x09, 0x09, 0x09, 0x73, 0x65, 0x6c, 0x66, 0x3a, 0x73, 0x65, 0x6e, 0x64, 0x43, 0x61, 0x6e, 0x76, 0x61, 0x73,
0x28, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x29, 0x0a,
0x09, 0x09, 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x74, 0x79, 0x70, 0x65, 0x28, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x20, 0x6f, 0x72,
0x20, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x0a,
0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x74, 0x79, 0x70, 0x65, 0x28, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5b, 0x31,
0x5d, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x20, 0x74, 0x68, 0x65,
0x6e, 0x0a,
0x09, 0x09, 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x74, 0x79, 0x70, 0x65,
0x20, 0x3d, 0x3d, 0x20, 0x22, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x20, 0x6f, 0x72, 0x20, 0x6d,
0x61, 0x74, 0x72, 0x69, 0x78, 0x0a,
0x09, 0x09, 0x09, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x20, 0x74, 0x79, 0x70,
0x65, 0x28, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5b, 0x31, 0x5d, 0x29, 0x0a,
0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x3d,
0x20, 0x22, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x20, 0x6f, 0x72, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x22, 0x20,
0x74, 0x68, 0x65, 0x6e, 0x0a,
0x09, 0x09, 0x09, 0x09, 0x73, 0x65, 0x6c, 0x66, 0x3a, 0x73, 0x65, 0x6e, 0x64, 0x46, 0x6c, 0x6f, 0x61, 0x74,
0x28, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2c, 0x20, 0x2e, 0x2e, 0x2e, 0x29, 0x0a,
0x09, 0x09, 0x09, 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x74, 0x79, 0x70, 0x65, 0x28, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x5b, 0x31, 0x5d, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x20,
0x74, 0x68, 0x65, 0x6e, 0x0a,
0x09, 0x09, 0x09, 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x74, 0x79, 0x70,
0x65, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
0x09, 0x09, 0x09, 0x09, 0x73, 0x65, 0x6c, 0x66, 0x3a, 0x73, 0x65, 0x6e, 0x64, 0x4d, 0x61, 0x74, 0x72, 0x69,
0x78, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x4d, 0x61, 0x74,
0x72, 0x69, 0x63, 0x65, 0x73, 0x28, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2c, 0x20, 0x2e, 0x2e, 0x2e, 0x29, 0x29, 0x0a,
0x09, 0x09, 0x09, 0x65, 0x6c, 0x73, 0x65, 0x0a,
0x09, 0x09, 0x09, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x22, 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x20,
0x73, 0x65, 0x6e, 0x64, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x28, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70,
0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x7b, 0x22, 0x2e, 0x2e, 0x74, 0x79,
0x70, 0x65, 0x28, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5b, 0x31, 0x5d, 0x29, 0x2e, 0x2e, 0x22, 0x7d, 0x29, 0x2e,
0x22, 0x29, 0x0a,
0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x7b, 0x22, 0x2e, 0x2e, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x2e, 0x22, 0x7d, 0x29, 0x2e, 0x22, 0x29, 0x0a,
0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x09, 0x65, 0x6c, 0x73, 0x65, 0x0a,
0x09, 0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x74, 0x20, 0x3d, 0x20, 0x74, 0x79, 0x70, 0x65, 0x28,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x29, 0x0a,
0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x74, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x75, 0x73, 0x65, 0x72, 0x64, 0x61,
0x74, 0x61, 0x22, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65,
0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x20, 0x3d, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x74, 0x79,
0x70, 0x65, 0x20, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x3d,
0x20, 0x22, 0x75, 0x73, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x22, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65,
0x20, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x09, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x22, 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x20, 0x73,
0x65, 0x6e, 0x64, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x28, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f,
0x72, 0x74, 0x65, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x22, 0x2e, 0x2e, 0x74, 0x2e, 0x2e, 0x22,
0x29, 0x2e, 0x22, 0x29, 0x0a,
0x72, 0x74, 0x65, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x22, 0x2e, 0x2e, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x2e, 0x22, 0x29, 0x2e, 0x22, 0x29, 0x0a,
0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6e, 0x65, 0x77, 0x50, 0x69, 0x78, 0x65, 0x6c, 0x45, 0x66, 0x66,
0x65, 0x63, 0x74, 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63,
0x73, 0x2e, 0x6e, 0x65, 0x77, 0x50, 0x69, 0x78, 0x65, 0x6c, 0x45, 0x66, 0x66, 0x65, 0x63, 0x74, 0x0a,
0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6e, 0x65, 0x77, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x3d,
0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x6e, 0x65, 0x77,
0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x0a,
0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61,
0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x6e, 0x65, 0x77, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x28, 0x76, 0x65,
0x72, 0x74, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x67, 0x63, 0x6f, 0x64, 0x65, 0x29, 0x0a,
0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x6e, 0x65,
0x77, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x28, 0x76, 0x65, 0x72, 0x74, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x67, 0x63, 0x6f, 0x64,
0x65, 0x29, 0x0a,
0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73,
0x74, 0x65, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
0x09, 0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x76, 0x65, 0x72, 0x74, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x61, 0x6e,
0x64, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e,
0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x28, 0x76, 0x65, 0x72, 0x74, 0x63, 0x6f, 0x64, 0x65, 0x29, 0x20, 0x74,
0x68, 0x65, 0x6e, 0x0a,
0x09, 0x09, 0x09, 0x09, 0x09, 0x76, 0x65, 0x72, 0x74, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x6c, 0x6f,
0x76, 0x65, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x72, 0x65, 0x61, 0x64,
0x28, 0x76, 0x65, 0x72, 0x74, 0x63, 0x6f, 0x64, 0x65, 0x29, 0x0a,
0x09, 0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x66, 0x72, 0x61, 0x67, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x61, 0x6e,
0x64, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e,
0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x28, 0x66, 0x72, 0x61, 0x67, 0x63, 0x6f, 0x64, 0x65, 0x29, 0x20, 0x74,
0x68, 0x65, 0x6e, 0x0a,
0x09, 0x09, 0x09, 0x09, 0x09, 0x66, 0x72, 0x61, 0x67, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x6c, 0x6f,
0x76, 0x65, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x72, 0x65, 0x61, 0x64,
0x28, 0x66, 0x72, 0x61, 0x67, 0x63, 0x6f, 0x64, 0x65, 0x29, 0x0a,
0x09, 0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x65, 0x77, 0x53, 0x68, 0x61, 0x64, 0x65,
0x72, 0x28, 0x76, 0x65, 0x72, 0x74, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x67, 0x63, 0x6f,
0x64, 0x65, 0x29, 0x0a,
0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x6c,
0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x6e, 0x65, 0x77, 0x53, 0x68,
0x61, 0x64, 0x65, 0x72, 0x28, 0x76, 0x65, 0x72, 0x74, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x66, 0x72, 0x61,
0x67, 0x63, 0x6f, 0x64, 0x65, 0x29, 0x0a,
0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x20, 0x3d, 0x20, 0x67, 0x65, 0x74,
0x6d, 0x65, 0x74, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x28, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x29, 0x0a,
0x09, 0x09, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6e, 0x64, 0x20, 0x3d, 0x20, 0x73, 0x68, 0x61, 0x64,
0x65, 0x72, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x09, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6e, 0x64, 0x42, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e,
0x20, 0x3d, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6e, 0x64, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x0a,
0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x0a,
0x09, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x2d, 0x2d, 0x20, 0x50, 0x69, 0x78, 0x65, 0x6c, 0x45, 0x66, 0x66, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6f,
0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x0a,
0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61,
0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x6e, 0x65, 0x77, 0x50, 0x69, 0x78, 0x65, 0x6c, 0x45, 0x66, 0x66, 0x65,
0x63, 0x74, 0x28, 0x63, 0x6f, 0x64, 0x65, 0x29, 0x0a,
0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x6e, 0x65,
0x77, 0x50, 0x69, 0x78, 0x65, 0x6c, 0x45, 0x66, 0x66, 0x65, 0x63, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x63, 0x6f, 0x64, 0x65, 0x29, 0x0a,
0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73,
0x74, 0x65, 0x6d, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73,
0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x28, 0x63, 0x6f, 0x64, 0x65, 0x29,
0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
0x09, 0x09, 0x09, 0x09, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x66, 0x69,
0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x28, 0x63, 0x6f, 0x64, 0x65,
0x29, 0x0a,
0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x65, 0x77, 0x50, 0x69, 0x78, 0x65, 0x6c,
0x45, 0x66, 0x66, 0x65, 0x63, 0x74, 0x28, 0x63, 0x6f, 0x64, 0x65, 0x29, 0x0a,
0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x20, 0x3d, 0x20, 0x6c,
0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x6e, 0x65, 0x77, 0x50, 0x69,
0x78, 0x65, 0x6c, 0x45, 0x66, 0x66, 0x65, 0x63, 0x74, 0x28, 0x63, 0x6f, 0x64, 0x65, 0x29, 0x0a,
0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x20, 0x3d, 0x20, 0x67, 0x65, 0x74,
0x6d, 0x65, 0x74, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x28, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x29, 0x0a,
0x09, 0x09, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6e, 0x64, 0x20, 0x3d, 0x20, 0x70, 0x69, 0x78, 0x65,
0x6c, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73,
0x65, 0x6e, 0x64, 0x0a,
0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x0a,
0x63, 0x74, 0x28, 0x66, 0x72, 0x61, 0x67, 0x63, 0x6f, 0x64, 0x65, 0x29, 0x0a,
0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70,
0x68, 0x69, 0x63, 0x73, 0x2e, 0x6e, 0x65, 0x77, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x28, 0x6e, 0x69, 0x6c,
0x2c, 0x20, 0x66, 0x72, 0x61, 0x67, 0x63, 0x6f, 0x64, 0x65, 0x29, 0x0a,
0x09, 0x65, 0x6e, 0x64, 0x0a,
0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x73, 0x65, 0x74,
0x50, 0x69, 0x78, 0x65, 0x6c, 0x45, 0x66, 0x66, 0x65, 0x63, 0x74, 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x76, 0x65,
0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x53, 0x68, 0x61, 0x64, 0x65,
0x72, 0x0a,
0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x67, 0x65, 0x74,
0x50, 0x69, 0x78, 0x65, 0x6c, 0x45, 0x66, 0x66, 0x65, 0x63, 0x74, 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x76, 0x65,
0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x67, 0x65, 0x74, 0x53, 0x68, 0x61, 0x64, 0x65,
0x72, 0x0a,
0x09, 0x0a,
0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x5f, 0x65, 0x66,
0x66, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x54, 0x6f, 0x47, 0x4c, 0x53, 0x4c, 0x20, 0x3d, 0x20, 0x6c,
0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x5f, 0x73, 0x68, 0x61, 0x64,
0x65, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x54, 0x6f, 0x47, 0x4c, 0x53, 0x4c, 0x0a,
0x65, 0x6e, 0x64, 0x0a,
}; // [graphics.lua]
} // love