Skip to content
Snippets Groups Projects
Commit 3eb8d948 authored by dg's avatar dg
Browse files

Changed ghouls and skeletons intro text

git-svn-id: http://svn.net-core.org/repos/t-engine4@1625 51575b47-30f0-44d4-a5cc-537603b46e54
parent 9e9ee8ef
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@ short_name = "example"
author = { "DarkGod", "darkgod@te4.org" }
homepage = "http://te4.org/modules:example"
version = {1,0,0}
engine = {0,9,13,"te4",5}
engine = {0,9,13,"te4"}
description = [[
This is *NOT* a game, just an example/template to make your own using the T-Engine4.
]]
......
......@@ -23,7 +23,7 @@ short_name = "example_realtime"
author = { "DarkGod", "darkgod@te4.org" }
homepage = "http://te4.org/modules:example"
version = {1,0,0}
engine = {0,9,13,"te4",5}
engine = {0,9,13,"te4"}
description = [[
This is *NOT* a game, just an example/template to make your own using the T-Engine4.
]]
......
......@@ -20,11 +20,10 @@
return [[Welcome #LIGHT_GREEN#@name@#WHITE#.
You have died ages ago, but that did not stop you, you were raised as an undead ghoul.
After wandering aimlessly for eons you found a goal: to become a force to be reckoned with in this world.
You have decided to venture into the old and wild places of the world, looking for ancient treasures and enough power to carve your way in blood through the world!
Your necromancer master has plans for you, but something is wrong, you seem to have kept your free will.
Get rid of this evil mage and try to find a place in the world.
You have come to a land called Rhudaur, on the western steppes of the Misty Mountains, far away from your home, in search of the Trollshaws. It is an old forest infested with trolls and all kinds of wild animals.
To the east lies another dangerous place: the ruined tower of Amon Sûl. You heard the caves below were infested by vermin and undead.
You has been raised in a place caleld the Paths of the Dead, on the south the Misty Mountains. Leave this forsaken place and try your luck in old forgotten places.
After days of travel, you have found the forest and entered it, what will you find there?...
]]
......@@ -20,11 +20,10 @@
return [[Welcome #LIGHT_GREEN#@name@#WHITE#.
You have died ages ago, but that did not stop you, you were raised as an undead skeleton.
After wandering aimlessly for eons you found a goal: to become a force to be reckoned with in this world.
You have decided to venture into the old and wild places of the world, looking for ancient treasures and enough power to carve your way in blood through the world!
Your necromancer master has plans for you, but something is wrong, you seem to have kept your free will.
Get rid of this evil mage and try to find a place in the world.
You have come to a land called Rhudaur, on the western steppes of the Misty Mountains, far away from your home, in search of the Trollshaws. It is an old forest infested with trolls and all kinds of wild animals.
To the east lies another dangerous place: the ruined tower of Amon Sûl. You heard the caves below were infested by vermin and undead.
You has been raised in a place caleld the Paths of the Dead, on the south the Misty Mountains. Leave this forsaken place and try your luck in old forgotten places.
After days of travel, you have found the forest and entered it, what will you find there?...
]]
......@@ -2022,6 +2022,33 @@ static int lua_file_read(lua_State *L)
return 1;
}
// This will return empty lines if you've got DOS-style "\r\n" endlines!
// extra credit for handling buffer overflows and EOF more gracefully.
static int lua_file_readline(lua_State *L)
{
PHYSFS_file **f = (PHYSFS_file**)auxiliar_checkclass(L, "physfs{file}", 1);
char buf[1024];
char *ptr = buf;
int bufsize = 1024;
int total = 0;
if (PHYSFS_eof(*f)) return 0;
bufsize--; /* allow for null terminating char */
while ((total < bufsize) && (PHYSFS_read(*f, ptr, 1, 1) == 1))
{
if ((*ptr == '\r') || (*ptr == '\n'))
break;
ptr++;
total++;
}
*ptr = '\0'; // null terminate it.
lua_pushstring(L, buf);
return 1;
}
static int lua_file_write(lua_State *L)
{
PHYSFS_file **f = (PHYSFS_file**)auxiliar_checkclass(L, "physfs{file}", 1);
......@@ -2234,6 +2261,7 @@ static const struct luaL_reg fsfile_reg[] =
{"__gc", lua_close_file},
{"close", lua_close_file},
{"read", lua_file_read},
{"readLine", lua_file_readline},
{"write", lua_file_write},
{NULL, NULL},
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment