Load

This function loads a Leadwerks map (*.map) file.

Syntax

Parameters

Returns

Returns true if the scene was successfully loaded, otherwise false is returned.

Example

#include "App.h"

using namespace Leadwerks;

App::App() : window(NULL), context(NULL), world(NULL), camera(NULL) {}

App::~App() { delete world; delete window; }

bool App::Start()
{
window = Window::Create();
context = Context::Create(window);
world = World::Create();

//Load a map
return Map::Load("Maps/start.map");
}

bool App::Loop()
{
if (window->Closed() || window->KeyDown(Key::Escape)) return false;

Leadwerks::Time::Update();
world->Update();
world->Render();
context->Sync();

return true;
}