The code that displays the sprite is at the top...
//Initialize Lua...
LuaInterfaceManager LuaMgr;
//Registers all appropriate classes to Lua.
LuaInterfaceManager::RegisterClasses();
//Makes the SceneManager object available to all Lua scripts.
luabind::globals(LuaInterfaceManager::LuaManager)["SceneMgr"] = SceneMgr;
SceneMgr.LoadInitialScreen("gamedata\\luascripts\\personselection.lua");
hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_TSOCLIENT));
std::vector<UIScene> *ScenePtr = SceneMgr.Scenes();
// Main message loop:
while (GetMessage(&msg, NULL, 0, 0))
{
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
// Clear the screen (fill it with black color)
App.Clear();
for(int i = 0; i < ScenePtr->size(); i++)
{
for(int j = 0; j < (*ScenePtr)[i].Backgrounds()->size(); j++)
{
std::vector<UIBackground> *BackgroundsPtr = (*ScenePtr)[i].Backgrounds();
App.Draw((*BackgroundsPtr)[j].GetSprite());
delete BackgroundsPtr;
}
}
// Display window contents on screen
App.Display();
}