Skip to content

Commit

Permalink
CODE: remove leading spaces (ceeac)
Browse files Browse the repository at this point in the history
git-svn-id: svn://tron.homeunix.org/simutrans/simutrans/trunk@9071 8aca7d54-2c30-db11-9de9-000461428c89
  • Loading branch information
Dwachs committed May 7, 2020
1 parent 2a03063 commit e2205bd
Show file tree
Hide file tree
Showing 78 changed files with 406 additions and 421 deletions.
2 changes: 1 addition & 1 deletion bauer/hausbauer.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class hausbauer_t
/**
* Fills menu with icons of buildings of a given waytype.
* This is needed for station extensions and headquarters.
*/
*/
static void fill_menu(tool_selector_t* tool_selector, building_desc_t::btype, waytype_t wt, sint16 sound_ok);

/// @returns a random commercial building matching the requirements.
Expand Down
2 changes: 1 addition & 1 deletion bauer/tunnelbauer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ koord3d tunnel_builder_t::find_end_pos(player_t *player, koord3d pos, koord zv,
if( gr == NULL ) {
// check for slope down ...
gr = welt->lookup(pos + koord3d(0,0,-1));
if( !gr ) {
if( !gr ) {
gr = welt->lookup(pos + koord3d(0,0,-2));
}
if( gr && gr->get_weg_hang() == slope_t::flat ) {
Expand Down
13 changes: 6 additions & 7 deletions bauer/wegbauer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1209,13 +1209,12 @@ void way_builder_t::init_builder(bautyp_t wt, const way_desc_t *b, const tunnel_
}
#endif
}
DBG_MESSAGE("way_builder_t::init_builder()",
"setting way type to %d, desc=%s, bridge_desc=%s, tunnel_desc=%s",
bautyp,
desc ? desc->get_name() : "NULL",
bridge_desc ? bridge_desc->get_name() : "NULL",
tunnel_desc ? tunnel_desc->get_name() : "NULL"
);
DBG_MESSAGE("way_builder_t::init_builder()", "setting way type to %d, desc=%s, bridge_desc=%s, tunnel_desc=%s",
bautyp,
desc ? desc->get_name() : "NULL",
bridge_desc ? bridge_desc->get_name() : "NULL",
tunnel_desc ? tunnel_desc->get_name() : "NULL"
);
}


Expand Down
2 changes: 1 addition & 1 deletion boden/grund.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ class grund_t
objlist_t objlist;

/**
* Handle to halt built on this ground
* Handle to halt built on this ground
*/
halthandle_t this_halt;

Expand Down
2 changes: 1 addition & 1 deletion dataobj/loadsave.cc
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ size_t loadsave_t::read(void *buf, size_t len)
for( unsigned i=0; i<len; i++ ) {
((char*)buf)[i] = ls_buf[curr_buff][buf_pos[curr_buff]++];
}
return len;
return len;
}
else {
// copy up to full buffer
Expand Down
16 changes: 8 additions & 8 deletions dataobj/ribi.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ class slope_t {
* Each corner has height 0,1,2.
* Calculation has to be done modulo 3 (% 3).
*/
#define corner_sw(i) (i%3) // sw corner
#define corner_se(i) ((i/3)%3) // se corner
#define corner_ne(i) ((i/9)%3) // ne corner
#define corner_nw(i) (i/27) // nw corner
#define corner_sw(i) (i%3) // sw corner
#define corner_se(i) ((i/3)%3) // se corner
#define corner_ne(i) ((i/9)%3) // ne corner
#define corner_nw(i) (i/27) // nw corner

/**
* Named constants for special cases.
Expand Down Expand Up @@ -103,10 +103,10 @@ struct slope4_t {
*/
typedef sint8 type;

#define scorner_sw(i) (i%2) // sw corner
#define scorner_se(i) ((i/2)%2) // se corner
#define scorner_ne(i) ((i/4)%2) // ne corner
#define scorner_nw(i) (i/8) // nw corner
#define scorner_sw(i) (i%2) // sw corner
#define scorner_se(i) ((i/2)%2) // se corner
#define scorner_ne(i) ((i/4)%2) // ne corner
#define scorner_nw(i) (i/8) // nw corner
enum _corners {
corner_SW = 1,
corner_SE = 2,
Expand Down
20 changes: 10 additions & 10 deletions dataobj/settings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,16 @@ settings_t::settings_t() :
signals_on_left = false;

// forest setting ...
forest_base_size = 36; // Base forest size - minimal size of forest - map independent
forest_map_size_divisor = 38; // Map size divisor - smaller it is the larger are individual forests
forest_count_divisor = 16; // Forest count divisor - smaller it is, the more forest are generated
forest_inverse_spare_tree_density = 5; // Determines how often are spare trees going to be planted (works inversely)
max_no_of_trees_on_square = 3; // Number of trees on square 2 - minimal usable, 3 good, 5 very nice looking
tree_climates = 0; // bit set, if this climate is to be covered with trees entirely
no_tree_climates = 0; // bit set, if this climate is to be void of random trees
no_trees = false; // if set, no trees at all, may be useful for low end engines

lake = true; // if set lakes will be added to map
forest_base_size = 36; // Base forest size - minimal size of forest - map independent
forest_map_size_divisor = 38; // Map size divisor - smaller it is the larger are individual forests
forest_count_divisor = 16; // Forest count divisor - smaller it is, the more forest are generated
forest_inverse_spare_tree_density = 5; // Determines how often are spare trees going to be planted (works inversely)
max_no_of_trees_on_square = 3; // Number of trees on square 2 - minimal usable, 3 good, 5 very nice looking
tree_climates = 0; // bit set, if this climate is to be covered with trees entirely
no_tree_climates = 0; // bit set, if this climate is to be void of random trees
no_trees = false; // if set, no trees at all, may be useful for low end engines

lake = true; // if set lakes will be added to map

// some settings more
allow_player_change = true;
Expand Down
4 changes: 2 additions & 2 deletions descriptor/bridge_desc.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class checksum_t;
* 4 Background-images - snow
*/
class bridge_desc_t : public obj_desc_transport_infrastructure_t {
friend class bridge_reader_t;
friend class bridge_reader_t;

private:
uint8 pillars_every; // =0 off
Expand Down Expand Up @@ -60,7 +60,7 @@ class bridge_desc_t : public obj_desc_transport_infrastructure_t {

skin_desc_t const* get_cursor() const { return get_child<skin_desc_t>(2 + offset); }

image_id get_background(img_t img, uint8 season) const {
image_id get_background(img_t img, uint8 season) const {
const image_t *image = NULL;
if(season && number_of_seasons == 1) {
image = get_child<image_list_t>(3 + offset)->get_image(img);
Expand Down
2 changes: 1 addition & 1 deletion descriptor/crossing_desc.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class checksum_t;
* 2 Image-list
*/
class crossing_desc_t : public obj_desc_timelined_t {
friend class crossing_reader_t;
friend class crossing_reader_t;

private:
waytype_t waytype1;
Expand Down
12 changes: 6 additions & 6 deletions descriptor/factory_desc.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,13 @@ class factory_product_desc_t : public obj_desc_t {
friend class factory_product_reader_t;

private:
uint16 capacity;
uint16 capacity;

/**
* How much of this product is derived from one unit of factory
* production? 256 means 1.0
*/
uint16 factor;
/**
* How much of this product is derived from one unit of factory
* production? 256 means 1.0
*/
uint16 factor;

public:
goods_desc_t const* get_output_type() const { return get_child<goods_desc_t>(0); }
Expand Down
70 changes: 35 additions & 35 deletions descriptor/goods_desc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,41 +7,41 @@


static const char * catg_names[32] = {
"special freight",
"CATEGORY_01", // was "piece goods",
"CATEGORY_02", // was "bulk goods",
"CATEGORY_03", // was "oil/gasoline",
"CATEGORY_04", // was "cooled goods",
"CATEGORY_05", // was "liquid food",
"CATEGORY_06", // was "long goods",
"CATEGORY_07",

"CATEGORY_08",
"CATEGORY_09",
"CATEGORY_10",
"CATEGORY_11",
"CATEGORY_12",
"CATEGORY_13",
"CATEGORY_14",
"CATEGORY_15",

"CATEGORY_16",
"CATEGORY_17",
"CATEGORY_18",
"CATEGORY_19",
"CATEGORY_20",
"CATEGORY_21",
"CATEGORY_22",
"CATEGORY_23",

"CATEGORY_24",
"CATEGORY_25",
"CATEGORY_26",
"CATEGORY_27",
"CATEGORY_28",
"CATEGORY_29",
"CATEGORY_30",
"CATEGORY_31",
"special freight",
"CATEGORY_01", // was "piece goods",
"CATEGORY_02", // was "bulk goods",
"CATEGORY_03", // was "oil/gasoline",
"CATEGORY_04", // was "cooled goods",
"CATEGORY_05", // was "liquid food",
"CATEGORY_06", // was "long goods",
"CATEGORY_07",

"CATEGORY_08",
"CATEGORY_09",
"CATEGORY_10",
"CATEGORY_11",
"CATEGORY_12",
"CATEGORY_13",
"CATEGORY_14",
"CATEGORY_15",

"CATEGORY_16",
"CATEGORY_17",
"CATEGORY_18",
"CATEGORY_19",
"CATEGORY_20",
"CATEGORY_21",
"CATEGORY_22",
"CATEGORY_23",

"CATEGORY_24",
"CATEGORY_25",
"CATEGORY_26",
"CATEGORY_27",
"CATEGORY_28",
"CATEGORY_29",
"CATEGORY_30",
"CATEGORY_31",
};


Expand Down
44 changes: 22 additions & 22 deletions descriptor/ground_desc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -308,14 +308,14 @@ karte_t *ground_desc_t::world = NULL;
*/
const uint8 ground_desc_t::slopetable[80] =
{
0, 1, 0xFF, 2, 3, 0xFF, 0xFF, 0xFF, 0xFF, 4,
5, 0xFF, 6, 7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 8, 9, 0xFF,
10, 11, 0xFF, 0xFF, 0xFF, 0xFF, 12, 13, 0xFF, 14,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
0, 1, 0xFF, 2, 3, 0xFF, 0xFF, 0xFF, 0xFF, 4,
5, 0xFF, 6, 7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 8, 9, 0xFF,
10, 11, 0xFF, 0xFF, 0xFF, 0xFF, 12, 13, 0xFF, 14,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
};


Expand Down Expand Up @@ -352,25 +352,25 @@ const ground_desc_t *ground_desc_t::sea = NULL;
const ground_desc_t *ground_desc_t::outside = NULL;

static special_obj_tpl<ground_desc_t> const grounds[] = {
{ &ground_desc_t::shore, "Shore" },
{ &boden_texture, "ClimateTexture" },
{ &light_map, "LightTexture" },
{ &transition_water_texture, "ShoreTrans" },
{ &transition_slope_texture, "SlopeTrans" },
{ &ground_desc_t::fundament, "Basement" },
{ &ground_desc_t::slopes, "Slopes" },
{ &ground_desc_t::fences, "Fence" },
{ &ground_desc_t::marker, "Marker" },
{ &ground_desc_t::borders, "Borders" },
{ &ground_desc_t::sea, "Water" },
{ &ground_desc_t::outside, "Outside" },
{ NULL, NULL }
{ &ground_desc_t::shore, "Shore" },
{ &boden_texture, "ClimateTexture" },
{ &light_map, "LightTexture" },
{ &transition_water_texture, "ShoreTrans" },
{ &transition_slope_texture, "SlopeTrans" },
{ &ground_desc_t::fundament, "Basement" },
{ &ground_desc_t::slopes, "Slopes" },
{ &ground_desc_t::fences, "Fence" },
{ &ground_desc_t::marker, "Marker" },
{ &ground_desc_t::borders, "Borders" },
{ &ground_desc_t::sea, "Water" },
{ &ground_desc_t::outside, "Outside" },
{ NULL, NULL }
};

// the water and seven climates
static const char* const climate_names[MAX_CLIMATES] =
{
"Water", "desert", "tropic", "mediterran", "temperate", "tundra", "rocky", "arctic"
"Water", "desert", "tropic", "mediterran", "temperate", "tundra", "rocky", "arctic"
};

// from this number on there will be all ground images
Expand Down
4 changes: 2 additions & 2 deletions descriptor/image_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
* ... ...
*/
class image_list_t : public obj_desc_t {
friend class imagelist_reader_t;
friend class imagelist_reader_t;

uint16 count;
uint16 count;

public:
image_list_t() : count(0) {}
Expand Down
6 changes: 3 additions & 3 deletions descriptor/obj_node_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
* Stored structure of a pak node inside the file.
*/
struct obj_node_info_t {
uint32 type;
uint16 children;
uint32 size;
uint32 type;
uint16 children;
uint32 size;
};

#endif
2 changes: 1 addition & 1 deletion descriptor/reader/bridge_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -199,5 +199,5 @@ obj_desc_t * bridge_reader_t::read_node(FILE *fp, obj_node_info_t &node)
(desc->retire_date%12)+1,
desc->retire_date/12);

return desc;
return desc;
}
6 changes: 3 additions & 3 deletions descriptor/reader/ground_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@

void ground_reader_t::register_obj(obj_desc_t *&data)
{
ground_desc_t *desc = static_cast<ground_desc_t *>(data);
ground_desc_t *desc = static_cast<ground_desc_t *>(data);

ground_desc_t::register_desc(desc);
ground_desc_t::register_desc(desc);
}


bool ground_reader_t::successfully_loaded() const
{
return ground_desc_t::successfully_loaded();
return ground_desc_t::successfully_loaded();
}


Expand Down
8 changes: 4 additions & 4 deletions descriptor/reader/roadsign_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

void roadsign_reader_t::register_obj(obj_desc_t *&data)
{
roadsign_desc_t *desc = static_cast<roadsign_desc_t *>(data);
roadsign_desc_t *desc = static_cast<roadsign_desc_t *>(data);

roadsign_t::register_desc(desc);
roadsign_t::register_desc(desc);

checksum_t *chk = new checksum_t();
desc->calc_checksum(chk);
Expand All @@ -31,7 +31,7 @@ void roadsign_reader_t::register_obj(obj_desc_t *&data)

bool roadsign_reader_t::successfully_loaded() const
{
return roadsign_t::successfully_loaded();
return roadsign_t::successfully_loaded();
}


Expand All @@ -58,7 +58,7 @@ obj_desc_t * roadsign_reader_t::read_node(FILE *fp, obj_node_info_t &node)
desc->intro_date = decode_uint16(p);
desc->retire_date = decode_uint16(p);
}
else if(version==4) {
else if(version==4) {
// Versioned node, version 4
desc->min_speed = kmh_to_speed(decode_uint16(p));
desc->price = decode_uint32(p);
Expand Down
4 changes: 2 additions & 2 deletions descriptor/reader/root_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

void root_reader_t::register_obj(obj_desc_t *&data)
{
delete data;
data = NULL;
delete data;
data = NULL;
}


Expand Down
Loading

0 comments on commit e2205bd

Please sign in to comment.