~ubuntu-branches/ubuntu/raring/simutrans/raring-proposed

« back to all changes in this revision

Viewing changes to .pc/0002-FIX-loading-of-savegames-with-line-with-id-0.patch/simlinemgmt.h

  • Committer: Package Import Robot
  • Author(s): Ansgar Burchardt
  • Date: 2011-11-03 19:59:02 UTC
  • mfrom: (1.2.7)
  • Revision ID: package-import@ubuntu.com-20111103195902-uopgwf488mfctb75
Tags: 111.0-1
* New upstream release.
* debian/rules: Update get-orig-source target for new upstream release.
* Use xz compression for source and binary packages.
* Use override_* targets to simplify debian/rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * part of the Simutrans project
3
 
 * @author hsiegeln
4
 
 * 01/12/2003
5
 
 */
6
 
 
7
 
#ifndef simlinemgmt_h
8
 
#define simlinemgmt_h
9
 
 
10
 
#include "linehandle_t.h"
11
 
#include "simtypes.h"
12
 
#include "tpl/vector_tpl.h"
13
 
 
14
 
class loadsave_t;
15
 
class schedule_t;
16
 
class spieler_t;
17
 
class schedule_list_gui_t;
18
 
class karte_t;
19
 
 
20
 
class simlinemgmt_t
21
 
{
22
 
public:
23
 
        simlinemgmt_t(karte_t* welt);
24
 
        ~simlinemgmt_t();
25
 
 
26
 
        void line_management_window(spieler_t *);
27
 
 
28
 
        /*
29
 
         * add a line
30
 
         * @author hsiegeln
31
 
         */
32
 
        void add_line(linehandle_t new_line);
33
 
 
34
 
        /*
35
 
         * delete a line
36
 
         * @author hsiegeln
37
 
         */
38
 
        void delete_line(linehandle_t line);
39
 
 
40
 
        /*
41
 
         * update a line -> apply updated fahrplan to all convoys
42
 
         * @author hsiegeln
43
 
         */
44
 
        void update_line(linehandle_t line);
45
 
 
46
 
        /*
47
 
         * load or save the linemanagement
48
 
         */
49
 
        void rdwr(karte_t * welt, loadsave_t * file, spieler_t * sp);
50
 
 
51
 
        /*
52
 
         * sort the lines by name
53
 
         */
54
 
        void sort_lines();
55
 
 
56
 
        /*
57
 
         * will register all stops for all lines
58
 
         */
59
 
        void register_all_stops();
60
 
 
61
 
        /*
62
 
         * called after game is fully loaded;
63
 
         */
64
 
        void laden_abschliessen();
65
 
 
66
 
        void rotate90( sint16 y_size );
67
 
 
68
 
        void new_month();
69
 
 
70
 
        /**
71
 
         * creates a line with an empty schedule
72
 
         * @author hsiegeln
73
 
         */
74
 
        linehandle_t create_line(int ltype, spieler_t * sp);
75
 
 
76
 
        /**
77
 
         * Creates a line and sets its schedule
78
 
         * @author prissi
79
 
         */
80
 
        linehandle_t create_line(int ltype, spieler_t * sp, schedule_t * fpl);
81
 
 
82
 
        /*
83
 
         * fill the list with all lines of a certain type
84
 
         * type == simline_t::line will return all lines
85
 
         */
86
 
        void get_lines(int type, vector_tpl<linehandle_t>* lines) const;
87
 
 
88
 
        uint32 get_line_count() const { return all_managed_lines.get_count(); }
89
 
 
90
 
        karte_t* get_welt() const { return welt; }
91
 
 
92
 
        /**
93
 
         * Will open the line management window and offer information about the line
94
 
         * @author isidoro
95
 
         */
96
 
        void show_lineinfo(spieler_t *sp, linehandle_t line);
97
 
 
98
 
private:
99
 
        vector_tpl<linehandle_t> all_managed_lines;
100
 
 
101
 
        static karte_t * welt;
102
 
 
103
 
        schedule_list_gui_t *schedule_list_gui;  // Use with caution.  Valid only afer zeige_info
104
 
};
105
 
 
106
 
#endif