mirror of https://github.com/OpenTTD/OpenTTD
(svn r13015) -Codechange: move some 'WP' structs out of window_gui.h to the .cpp files where they are actually used.
parent
5fda77239e
commit
4a11ebe76f
|
@ -97,8 +97,7 @@ static void Place_LandInfo(TileIndex tile)
|
||||||
{
|
{
|
||||||
DeleteWindowById(WC_LAND_INFO, 0);
|
DeleteWindowById(WC_LAND_INFO, 0);
|
||||||
|
|
||||||
Window *w = new Window(&_land_info_desc);
|
new Window(&_land_info_desc);
|
||||||
WP(w, void_d).data = &_landinfo_data;
|
|
||||||
|
|
||||||
Player *p = GetPlayer(IsValidPlayer(_local_player) ? _local_player : PLAYER_FIRST);
|
Player *p = GetPlayer(IsValidPlayer(_local_player) ? _local_player : PLAYER_FIRST);
|
||||||
Town *t = ClosestTownFromTile(tile, _patches.dist_local_authority);
|
Town *t = ClosestTownFromTile(tile, _patches.dist_local_authority);
|
||||||
|
@ -202,6 +201,12 @@ void PlaceLandBlockInfo()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct scroller_d {
|
||||||
|
int height;
|
||||||
|
uint16 counter;
|
||||||
|
};
|
||||||
|
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(scroller_d));
|
||||||
|
|
||||||
static const char *credits[] = {
|
static const char *credits[] = {
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* maximum length of string which fits in window -^*/
|
* maximum length of string which fits in window -^*/
|
||||||
|
@ -519,6 +524,13 @@ void HideFillingPercent(TextEffectID te_id)
|
||||||
if (te_id != INVALID_TE_ID) RemoveTextEffect(te_id);
|
if (te_id != INVALID_TE_ID) RemoveTextEffect(te_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct tooltips_d {
|
||||||
|
StringID string_id;
|
||||||
|
byte paramcount;
|
||||||
|
uint64 params[5];
|
||||||
|
};
|
||||||
|
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(tooltips_d));
|
||||||
|
|
||||||
static const Widget _tooltips_widgets[] = {
|
static const Widget _tooltips_widgets[] = {
|
||||||
{ WWT_PANEL, RESIZE_NONE, 14, 0, 199, 0, 31, 0x0, STR_NULL},
|
{ WWT_PANEL, RESIZE_NONE, 14, 0, 199, 0, 31, 0x0, STR_NULL},
|
||||||
{ WIDGETS_END},
|
{ WIDGETS_END},
|
||||||
|
|
|
@ -42,6 +42,12 @@ struct facesel_d {
|
||||||
};
|
};
|
||||||
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(facesel_d));
|
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(facesel_d));
|
||||||
|
|
||||||
|
struct highscore_d {
|
||||||
|
uint32 background_img;
|
||||||
|
int8 rank;
|
||||||
|
};
|
||||||
|
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(highscore_d));
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
FIRST_GUI_CALL = INT_MAX, ///< default value to specify thuis is the first call of the resizable gui
|
FIRST_GUI_CALL = INT_MAX, ///< default value to specify thuis is the first call of the resizable gui
|
||||||
};
|
};
|
||||||
|
|
|
@ -32,6 +32,13 @@
|
||||||
#include "table/strings.h"
|
#include "table/strings.h"
|
||||||
#include "table/sprites.h"
|
#include "table/sprites.h"
|
||||||
|
|
||||||
|
struct smallmap_d {
|
||||||
|
int32 scroll_x;
|
||||||
|
int32 scroll_y;
|
||||||
|
int32 subscroll;
|
||||||
|
};
|
||||||
|
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(smallmap_d));
|
||||||
|
|
||||||
static const Widget _smallmap_widgets[] = {
|
static const Widget _smallmap_widgets[] = {
|
||||||
{ WWT_CLOSEBOX, RESIZE_NONE, 13, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW},
|
{ WWT_CLOSEBOX, RESIZE_NONE, 13, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW},
|
||||||
{ WWT_CAPTION, RESIZE_RIGHT, 13, 11, 337, 0, 13, STR_00B0_MAP, STR_018C_WINDOW_TITLE_DRAG_THIS},
|
{ WWT_CAPTION, RESIZE_RIGHT, 13, 11, 337, 0, 13, STR_00B0_MAP, STR_018C_WINDOW_TITLE_DRAG_THIS},
|
||||||
|
|
|
@ -40,6 +40,11 @@
|
||||||
#include "table/sprites.h"
|
#include "table/sprites.h"
|
||||||
#include "table/strings.h"
|
#include "table/strings.h"
|
||||||
|
|
||||||
|
struct vehicledetails_d {
|
||||||
|
byte tab;
|
||||||
|
};
|
||||||
|
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(vehicledetails_d));
|
||||||
|
|
||||||
struct refit_d {
|
struct refit_d {
|
||||||
int sel;
|
int sel;
|
||||||
struct RefitOption *cargo;
|
struct RefitOption *cargo;
|
||||||
|
|
|
@ -379,18 +379,6 @@ struct def_d {
|
||||||
};
|
};
|
||||||
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(def_d));
|
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(def_d));
|
||||||
|
|
||||||
struct void_d {
|
|
||||||
void *data;
|
|
||||||
};
|
|
||||||
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(void_d));
|
|
||||||
|
|
||||||
struct tooltips_d {
|
|
||||||
StringID string_id;
|
|
||||||
byte paramcount;
|
|
||||||
uint64 params[5];
|
|
||||||
};
|
|
||||||
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(tooltips_d));
|
|
||||||
|
|
||||||
struct depot_d {
|
struct depot_d {
|
||||||
VehicleID sel;
|
VehicleID sel;
|
||||||
VehicleType type;
|
VehicleType type;
|
||||||
|
@ -404,18 +392,6 @@ struct depot_d {
|
||||||
};
|
};
|
||||||
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(depot_d));
|
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(depot_d));
|
||||||
|
|
||||||
struct vehicledetails_d {
|
|
||||||
byte tab;
|
|
||||||
};
|
|
||||||
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(vehicledetails_d));
|
|
||||||
|
|
||||||
struct smallmap_d {
|
|
||||||
int32 scroll_x;
|
|
||||||
int32 scroll_y;
|
|
||||||
int32 subscroll;
|
|
||||||
};
|
|
||||||
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(smallmap_d));
|
|
||||||
|
|
||||||
struct vp_d {
|
struct vp_d {
|
||||||
VehicleID follow_vehicle;
|
VehicleID follow_vehicle;
|
||||||
int32 scrollpos_x;
|
int32 scrollpos_x;
|
||||||
|
@ -426,18 +402,6 @@ struct vp_d {
|
||||||
};
|
};
|
||||||
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(vp_d));
|
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(vp_d));
|
||||||
|
|
||||||
struct highscore_d {
|
|
||||||
uint32 background_img;
|
|
||||||
int8 rank;
|
|
||||||
};
|
|
||||||
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(highscore_d));
|
|
||||||
|
|
||||||
struct scroller_d {
|
|
||||||
int height;
|
|
||||||
uint16 counter;
|
|
||||||
};
|
|
||||||
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(scroller_d));
|
|
||||||
|
|
||||||
enum SortListFlags {
|
enum SortListFlags {
|
||||||
VL_NONE = 0, ///< no sort
|
VL_NONE = 0, ///< no sort
|
||||||
VL_DESC = 1 << 0, ///< sort descending or ascending
|
VL_DESC = 1 << 0, ///< sort descending or ascending
|
||||||
|
@ -461,13 +425,6 @@ struct list_d {
|
||||||
};
|
};
|
||||||
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(list_d));
|
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(list_d));
|
||||||
|
|
||||||
struct message_d {
|
|
||||||
int msg;
|
|
||||||
int wparam;
|
|
||||||
int lparam;
|
|
||||||
};
|
|
||||||
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(message_d));
|
|
||||||
|
|
||||||
struct vehiclelist_d {
|
struct vehiclelist_d {
|
||||||
const Vehicle** sort_list; // List of vehicles (sorted)
|
const Vehicle** sort_list; // List of vehicles (sorted)
|
||||||
Listing *_sorting; // pointer to the appropiate subcategory of _sorting
|
Listing *_sorting; // pointer to the appropiate subcategory of _sorting
|
||||||
|
|
Loading…
Reference in New Issue