~ubuntu-branches/ubuntu/natty/spring/natty

« back to all changes in this revision

Viewing changes to rts/Game/StartScripts/LoadScript.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Scott Ritchie
  • Date: 2010-09-23 18:56:03 UTC
  • mfrom: (3.1.9 experimental)
  • Revision ID: james.westby@ubuntu.com-20100923185603-st97s5chplo42y7w
Tags: 0.82.5.1+dfsg1-1ubuntu1
* Latest upstream version for online play
* debian/control: Replace (rather than conflict) spring-engine
  - spring-engine will be a dummy package (LP: #612905)
  - also set maintainer to MOTU

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include "StdAfx.h"
2
 
#include <iostream>
3
 
#include <vector>
4
 
 
5
 
#include "mmgr.h"
6
 
 
7
 
#include "LoadScript.h"
8
 
#include "Game/GameSetup.h"
9
 
#include "Sim/Misc/Team.h"
10
 
#include "Sim/Units/UnitDefHandler.h"
11
 
#include "LoadSaveHandler.h"
12
 
#include "FileSystem/FileHandler.h"
13
 
#include "FileSystem/FileSystem.h"
14
 
 
15
 
 
16
 
CLoadScript::CLoadScript(const std::string& file):
17
 
        CScript(std::string("Load ") + filesystem.GetFilename(file)),
18
 
        file(file)
19
 
{
20
 
}
21
 
 
22
 
CLoadScript::~CLoadScript()
23
 
{
24
 
}
25
 
 
26
 
void CLoadScript::Update()
27
 
{
28
 
        if (!started) {
29
 
                loader.LoadGame();
30
 
                started = true;
31
 
        }
32
 
}
33
 
 
34
 
void CLoadScript::ScriptSelected()
35
 
{
36
 
        // this is the first time we get called after getting choosen
37
 
        loader.LoadGameStartInfo(file);
38
 
        started = false;
39
 
        loadGame = true;
40
 
}