From 6b7b68ebd0dcad0b1e657131a8b543b70646c21d Mon Sep 17 00:00:00 2001 From: vrld Date: Wed, 12 Oct 2011 12:37:09 +0200 Subject: [PATCH] Fix issue #314: Can't use #define in shader code. --- src/scripts/graphics.lua | 2 +- src/scripts/graphics.lua.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scripts/graphics.lua b/src/scripts/graphics.lua index bfb051873..6354de039 100644 --- a/src/scripts/graphics.lua +++ b/src/scripts/graphics.lua @@ -1294,7 +1294,7 @@ do code = code:gsub("#include (%b'')", include) code = code:gsub('#include (%b"")', include) - return table.concat{header, code, footer} + return table.concat{header, "\n", code, footer} end function love.graphics._transformGLSLErrorMessages(message) diff --git a/src/scripts/graphics.lua.h b/src/scripts/graphics.lua.h index 37087fdb9..ee24c94b0 100644 --- a/src/scripts/graphics.lua.h +++ b/src/scripts/graphics.lua.h @@ -6297,8 +6297,8 @@ const unsigned char graphics_lua[] = 0x28, 0x27, 0x23, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x28, 0x25, 0x62, 0x22, 0x22, 0x29, 0x27, 0x2c, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x29, 0x0a,0x0a, 0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6e, - 0x63, 0x61, 0x74, 0x7b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2c, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, - 0x66, 0x6f, 0x6f, 0x74, 0x65, 0x72, 0x7d, 0x0a, + 0x63, 0x61, 0x74, 0x7b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2c, 0x20, 0x22, 0x5c, 0x6e, 0x22, 0x2c, 0x20, + 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x66, 0x6f, 0x6f, 0x74, 0x65, 0x72, 0x7d, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x0a,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,