~flosoft/s25rttr/trunk

« back to all changes in this revision

Viewing changes to src/nofPassiveWorker.cpp

  • Committer: FloSoft
  • Date: 2014-04-25 15:35:50 UTC
  • Revision ID: flosoft@siedler25.org-20140425153550-9muu4vodhlqu58m0
committing subversion revision 9357 by FloSoft
astyle

modified:
s25client/trunk/
s25client/trunk/contrib/lua/lin32/include/
s25client/trunk/contrib/lua/lin64/include/
s25client/trunk/contrib/lua/mac/include/
s25client/trunk/contrib/lua/win32/include/
s25client/trunk/contrib/lua/win64/include/
s25client/trunk/driver/audio/SDL/src/
s25client/trunk/driver/src/
s25client/trunk/driver/video/GLFW/src/
s25client/trunk/driver/video/SDL/src/
s25client/trunk/driver/video/WinAPI/src/
s25client/trunk/src/
s25client/trunk/win32/
s25client/trunk/win32/prebuild-mutex/src/

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// $Id: nofPassiveWorker.cpp 7521 2011-09-08 20:45:55Z FloSoft $
 
1
// $Id: nofPassiveWorker.cpp 9357 2014-04-25 15:35:25Z FloSoft $
2
2
//
3
3
// Copyright (c) 2005 - 2011 Settlers Freaks (sf-team at siedler25.org)
4
4
//
27
27
///////////////////////////////////////////////////////////////////////////////
28
28
// Makros / Defines
29
29
#if defined _WIN32 && defined _DEBUG && defined _MSC_VER
30
 
        #define new new(_NORMAL_BLOCK, THIS_FILE, __LINE__)
31
 
        #undef THIS_FILE
32
 
        static char THIS_FILE[] = __FILE__;
 
30
#define new new(_NORMAL_BLOCK, THIS_FILE, __LINE__)
 
31
#undef THIS_FILE
 
32
static char THIS_FILE[] = __FILE__;
33
33
#endif
34
34
 
35
 
nofPassiveWorker::nofPassiveWorker(const Job job,const unsigned short x, const unsigned short y,const unsigned char player,noRoadNode * goal)
36
 
: noFigure(job,x,y,player,goal)
 
35
nofPassiveWorker::nofPassiveWorker(const Job job, const unsigned short x, const unsigned short y, const unsigned char player, noRoadNode* goal)
 
36
    : noFigure(job, x, y, player, goal)
37
37
{
38
38
}
39
39
 
40
 
nofPassiveWorker::nofPassiveWorker(SerializedGameData * sgd, const unsigned obj_id) 
41
 
: noFigure(sgd,obj_id)
 
40
nofPassiveWorker::nofPassiveWorker(SerializedGameData* sgd, const unsigned obj_id)
 
41
    : noFigure(sgd, obj_id)
42
42
{
43
43
}
44
44
 
51
51
// wenn das Ziel erreicht wurde
52
52
void nofPassiveWorker::GoalReached()
53
53
{
54
 
        // Mich hier einquartieren
55
 
        gwg->RemoveFigure(this,x,y);
56
 
        nobBaseWarehouse * wh = gwg->GetSpecObj<nobBaseWarehouse>(x,y);
57
 
        assert(wh);
58
 
        wh->AddFigure(this);
59
 
        
 
54
    // Mich hier einquartieren
 
55
    gwg->RemoveFigure(this, x, y);
 
56
    nobBaseWarehouse* wh = gwg->GetSpecObj<nobBaseWarehouse>(x, y);
 
57
    assert(wh);
 
58
    wh->AddFigure(this);
 
59
 
60
60
}
61
61
 
62
62
void nofPassiveWorker::AbrogateWorkplace()
67
67
/// Zeichnen
68
68
void nofPassiveWorker::Draw(int x, int y)
69
69
{
70
 
        DrawWalking(x,y);
 
70
    DrawWalking(x, y);
71
71
}
72
72
 
73
73
/// Für alle restlichen Events, die nicht von noFigure behandelt werden
74
74
void nofPassiveWorker::HandleDerivedEvent(const unsigned int id)
75
75
{
76
 
        
 
76
 
77
77
}