love 0.5.0 Patch to support game.conf comment lines
Posted: Thu Sep 25, 2008 7:14 pm
Hello
I'm recently discover love2d, I like it.
I'm trying to make my own main.lua/game.conf
I fill my game.conf with all existing parameters.
Some of them must not be use.
I propose to support the lua comment (line prefixed by "--").
See the patch :
I'm recently discover love2d, I like it.
I'm trying to make my own main.lua/game.conf
I fill my game.conf with all existing parameters.
Some of them must not be use.
Code: Select all
love_version = "0.5.0"
title = "my client"
author = "TsT"
-- width Display resolution width.
-- height Display resolution height.
-- fullscreen True if fullscreen, false otherwise.
-- vsync True if attemt to enable, false otherwise.
-- fsaa Number of FSAA-buffers.
-- display_auto Set this to false if you want to configure the display in Lua manually.
-- love_version The LOVE-version this game was made for.
I propose to support the lua comment (line prefixed by "--").
See the patch :
Code: Select all
--- love-0.5-0/src/liblove/Configuration.cpp 2008-09-20 16:40:17.000000000 +0200
+++ love-0.5-0-tst1/src/liblove/Configuration.cpp 2008-09-25 20:55:55.000000000 +0200
@@ -62,6 +62,8 @@
{
line++;
index = (int)temp.find_first_of('=', 0);
+ if(temp.substr(0, 2) == "--")
+ continue;
if(index == (int)string::npos)
printf("Configuration (Line %d): Unrecognized command: \"%s\"\n", line, temp.c_str());
if(index != (int)string::npos && temp.find_first_of('#', 0) != 0 && trim(temp).size() != 0)