src/menucode.cpp
// luaUpdateHighScoresList *******
// a function that updates or constructs a high scores list in the
// lua side

luaUpdateHighScoresList
a function that updates or constructs a high scores list in the
lua side
luaUpdateHighScoresList a function that updates or constructs a high scores list in the lua side
int luaUpdateHighScoresList(lua_State* lstate)
{
	int paramNum=lua_gettop(lstate);
	int i;
	lua_newtable(lstate);
	for (i=1; i<10; i++)
	{
		lua_pushnumber(lstate, i);
		lua_newtable(lstate);
		lua_pushstring(lstate, "name");
		lua_pushstring(lstate, "Anonymous");
		lua_rawset(lstate, -3);
		lua_pushstring(lstate, "score");
		lua_pushnumber(lstate, (10-i)*30);
		lua_rawset(lstate, -3);
		lua_rawset(lstate, -3);
	}// for
	lua_setglobal(lstate, "highScoresList");
	return 0;
}
int luaUpdateHighScoresList ( lua_State * lstate ) { int paramNum = lua_gettop ( lstate ) ; int i ; lua_newtable ( lstate ) ; for ( i = 1 ; i < 10 ; i ++ ) { lua_pushnumber ( lstate , i ) ; lua_newtable ( lstate ) ; lua_pushstring ( lstate , " " ) ; lua_pushstring ( lstate , " " ) ; lua_rawset ( lstate , -3 ) ; lua_pushstring ( lstate , " " ) ; lua_pushnumber ( lstate , ( 10 - i ) * 30 ) ; lua_rawset ( lstate , -3 ) ; lua_rawset ( lstate , -3 ) ; } lua_setglobal ( lstate , " " ) ; return 0 ; }
luaUpdateHighScoresList 
a function that updates or constructs a high scores list in the
lua side
luaUpdateHighScoresList a function that updates or constructs a high scores list in the lua side
// let's start pushing an emtpy table to the stack
 // we call it gt
 // we traverse the high scores list
 // 2010 TODO
 // i
 // gt[i].name=name, gt[i].score=score
 // (this will be gt[i])
 // save it in the gt object too
 // for// 2010 TODO
 // finally, we do highScoresList=gt
 // there are no return values
