1. Robin Wellner
  2. selove

Commits

vrld  committed 881c2bc

Fix issue #314: Can't use #define in shader code.

  • Participants
  • Parent commits 8513648
  • Branches default

Comments (0)

Files changed (2)

File src/scripts/graphics.lua

View file
 		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)

File src/scripts/graphics.lua.h

View file
 	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,