2014-04-02 05:56:26 +02:00
|
|
|
/*****************************************************************************
|
2014-04-03 04:08:06 +02:00
|
|
|
* Copyright (c) 2014 Ted John
|
|
|
|
* OpenRCT2, an open source clone of Roller Coaster Tycoon 2.
|
|
|
|
*
|
|
|
|
* This file is part of OpenRCT2.
|
|
|
|
*
|
|
|
|
* OpenRCT2 is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*****************************************************************************/
|
2014-04-02 05:56:26 +02:00
|
|
|
|
|
|
|
#ifndef _WINDOW_H_
|
|
|
|
#define _WINDOW_H_
|
|
|
|
|
2014-10-06 18:36:58 +02:00
|
|
|
#include "../common.h"
|
|
|
|
#include "../drawing/drawing.h"
|
2014-10-06 20:41:43 +02:00
|
|
|
#include "../peep/peep.h"
|
2014-10-06 18:36:58 +02:00
|
|
|
#include "../ride/ride.h"
|
2014-11-10 01:40:59 +01:00
|
|
|
#include "../ride/vehicle.h"
|
2014-10-06 18:36:58 +02:00
|
|
|
#include "../world/park.h"
|
2014-04-02 05:56:26 +02:00
|
|
|
|
|
|
|
struct rct_window;
|
|
|
|
union rct_window_event;
|
|
|
|
|
|
|
|
typedef void wndproc(struct rct_window*, union rct_window_event*);
|
|
|
|
|
2014-04-24 19:53:42 +02:00
|
|
|
typedef uint8 rct_windowclass;
|
|
|
|
typedef uint16 rct_windownumber;
|
2014-04-11 18:38:15 +02:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
rct_windowclass classification;
|
|
|
|
rct_windownumber number;
|
|
|
|
} window_identifier;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
window_identifier window;
|
|
|
|
int widget_index;
|
|
|
|
} widget_identifier;
|
|
|
|
|
2014-04-02 05:56:26 +02:00
|
|
|
/**
|
2014-04-03 04:08:06 +02:00
|
|
|
* Widget structure
|
|
|
|
* size: 0x10
|
|
|
|
*/
|
2014-04-02 05:56:26 +02:00
|
|
|
typedef struct {
|
|
|
|
uint8 type; // 0x00
|
|
|
|
uint8 colour; // 0x01
|
|
|
|
sint16 left; // 0x02
|
|
|
|
sint16 right; // 0x04
|
|
|
|
sint16 top; // 0x06
|
|
|
|
sint16 bottom; // 0x08
|
|
|
|
uint32 image; // 0x0A
|
|
|
|
uint16 tooltip; // 0x0E
|
|
|
|
} rct_widget;
|
|
|
|
|
|
|
|
/**
|
2014-04-03 04:08:06 +02:00
|
|
|
* Viewport structure
|
|
|
|
* size: 0x14
|
|
|
|
*/
|
2014-04-02 05:56:26 +02:00
|
|
|
typedef struct {
|
|
|
|
sint16 width; // 0x00
|
|
|
|
sint16 height; // 0x02
|
|
|
|
sint16 x; // 0x04
|
|
|
|
sint16 y; // 0x06
|
|
|
|
sint16 view_x; // 0x08
|
|
|
|
sint16 view_y; // 0x0A
|
|
|
|
sint16 view_width; // 0x0C
|
|
|
|
sint16 view_height; // 0x0E
|
|
|
|
uint8 zoom; // 0x10
|
|
|
|
uint8 var_11;
|
|
|
|
uint16 flags; // 0x12
|
|
|
|
} rct_viewport;
|
|
|
|
|
2014-04-24 19:53:42 +02:00
|
|
|
/**
|
|
|
|
* Scroll structure
|
|
|
|
* size: 0x12
|
|
|
|
*/
|
2014-04-02 05:56:26 +02:00
|
|
|
typedef struct {
|
2014-07-25 20:19:32 +02:00
|
|
|
uint16 flags; // 0x00
|
2014-04-02 05:56:26 +02:00
|
|
|
sint16 h_left; // 0x02
|
|
|
|
sint16 h_right; // 0x04
|
|
|
|
sint16 h_thumb_left; // 0x06
|
|
|
|
sint16 h_thumb_right; // 0x08
|
|
|
|
sint16 v_top; // 0x0A
|
|
|
|
sint16 v_bottom; // 0x0C
|
|
|
|
sint16 v_thumb_top; // 0x0E
|
|
|
|
sint16 v_thumb_bottom; // 0x10
|
|
|
|
} rct_scroll;
|
|
|
|
|
2014-08-23 09:30:31 +02:00
|
|
|
/**
|
|
|
|
* Viewport focus structure.
|
|
|
|
* size: 0xA
|
|
|
|
* Use sprite.type to work out type.
|
|
|
|
*/
|
2014-08-22 19:54:28 +02:00
|
|
|
typedef struct{
|
2014-08-22 21:17:48 +02:00
|
|
|
sint16 var_480;
|
2014-08-23 09:30:31 +02:00
|
|
|
sint16 x; //0x482
|
|
|
|
sint16 y; //0x484 & VIEWPORT_FOCUS_Y_MASK
|
|
|
|
sint16 z; //0x486
|
|
|
|
uint8 rotation;//0x488
|
2014-09-22 18:39:24 +02:00
|
|
|
uint8 zoom;//0x489
|
2014-08-22 19:54:28 +02:00
|
|
|
} coordinate_focus;
|
2014-08-22 13:24:00 +02:00
|
|
|
|
|
|
|
// Type is viewport_target_sprite_id & 0x80000000 != 0
|
2014-08-22 19:54:28 +02:00
|
|
|
typedef struct{
|
2014-08-22 21:17:48 +02:00
|
|
|
sint16 var_480;
|
2014-08-23 09:30:31 +02:00
|
|
|
uint16 sprite_id; //0x482
|
2014-08-22 13:34:22 +02:00
|
|
|
uint8 pad_484;
|
|
|
|
uint8 type; //0x485 & VIEWPORT_FOCUS_TYPE_MASK
|
2014-08-23 12:56:20 +02:00
|
|
|
uint16 pad_486;
|
|
|
|
uint8 rotation; //0x488
|
2014-09-22 18:39:24 +02:00
|
|
|
uint8 zoom; //0x489
|
2014-08-22 19:54:28 +02:00
|
|
|
} sprite_focus;
|
2014-08-22 13:24:00 +02:00
|
|
|
|
2014-08-22 19:54:28 +02:00
|
|
|
#define VIEWPORT_FOCUS_TYPE_MASK 0xC0
|
|
|
|
enum{
|
|
|
|
VIEWPORT_FOCUS_TYPE_COORDINATE = (1<<6),
|
|
|
|
VIEWPORT_FOCUS_TYPE_SPRITE = (1<<7)
|
|
|
|
};
|
2014-09-22 18:39:24 +02:00
|
|
|
#define VIEWPORT_FOCUS_Y_MASK 0x3FFF
|
2014-08-22 13:24:00 +02:00
|
|
|
|
|
|
|
|
2014-08-22 19:54:28 +02:00
|
|
|
typedef struct{
|
2014-08-22 21:17:48 +02:00
|
|
|
sint16 campaign_type;
|
|
|
|
sint16 no_weeks; //0x482
|
2014-08-22 19:54:28 +02:00
|
|
|
uint16 ride_id; //0x484
|
|
|
|
uint32 pad_486;
|
|
|
|
} campaign_variables;
|
|
|
|
|
|
|
|
typedef struct{
|
2014-08-22 21:17:48 +02:00
|
|
|
sint16 selected_ride_id; //0x480
|
|
|
|
sint16 highlighted_ride_id; //0x482
|
2014-08-22 19:54:28 +02:00
|
|
|
uint16 pad_484;
|
|
|
|
uint16 pad_486;
|
|
|
|
uint16 selected_ride_countdown; //488
|
|
|
|
} new_ride_variables;
|
|
|
|
|
|
|
|
typedef struct{
|
2014-08-22 21:17:48 +02:00
|
|
|
sint16 var_480;
|
|
|
|
sint16 var_482;
|
2014-08-22 19:54:28 +02:00
|
|
|
uint16 var_484;
|
|
|
|
uint16 var_486;
|
|
|
|
uint16 var_488;
|
|
|
|
} news_variables;
|
2014-08-22 21:17:48 +02:00
|
|
|
|
|
|
|
typedef struct{
|
|
|
|
sint16 rotation;
|
|
|
|
sint16 var_482;
|
|
|
|
uint16 var_484;
|
|
|
|
uint16 var_486;
|
|
|
|
uint16 var_488;
|
2014-08-25 16:04:28 +02:00
|
|
|
} map_variables;
|
|
|
|
|
|
|
|
typedef struct {
|
2014-09-03 20:13:37 +02:00
|
|
|
sint16 view;
|
2014-08-25 16:04:28 +02:00
|
|
|
sint32 var_482;
|
2014-09-01 13:04:34 +02:00
|
|
|
sint32 var_486;
|
2014-08-25 16:04:28 +02:00
|
|
|
} ride_variables;
|
|
|
|
|
2014-08-27 22:50:33 +02:00
|
|
|
typedef struct {
|
2014-09-01 23:09:22 +02:00
|
|
|
sint16 selected_scenery_id;
|
2014-09-06 01:09:12 +02:00
|
|
|
sint16 hover_counter;
|
2014-08-27 22:50:33 +02:00
|
|
|
} scenery_variables;
|
|
|
|
|
2014-09-27 01:41:24 +02:00
|
|
|
typedef struct {
|
|
|
|
uint16 var_480;
|
|
|
|
uint16 var_482;
|
|
|
|
uint16 var_484;
|
|
|
|
} track_list_variables;
|
|
|
|
|
2014-10-05 03:51:17 +02:00
|
|
|
typedef struct {
|
|
|
|
uint16 var_480;
|
|
|
|
} error_variables;
|
|
|
|
|
2014-04-02 05:56:26 +02:00
|
|
|
/**
|
2014-04-03 04:08:06 +02:00
|
|
|
* Window structure
|
|
|
|
* size: 0x4C0
|
|
|
|
*/
|
2014-04-02 05:56:26 +02:00
|
|
|
typedef struct rct_window {
|
|
|
|
uint32* event_handlers; // 0x000
|
|
|
|
rct_viewport* viewport; // 0x004
|
|
|
|
uint64 enabled_widgets; // 0x008
|
|
|
|
uint64 disabled_widgets; // 0x010
|
|
|
|
uint64 pressed_widgets; // 0x018
|
|
|
|
uint64 var_020;
|
|
|
|
rct_widget* widgets; // 0x028
|
|
|
|
sint16 x; // 0x02C
|
|
|
|
sint16 y; // 0x02E
|
|
|
|
sint16 width; // 0x030
|
|
|
|
sint16 height; // 0x032
|
|
|
|
sint16 min_width; // 0x034
|
|
|
|
sint16 max_width; // 0x036
|
|
|
|
sint16 min_height; // 0x038
|
|
|
|
sint16 max_height; // 0x03A
|
|
|
|
rct_windownumber number; // 0x03C
|
2014-04-09 15:43:27 +02:00
|
|
|
uint16 flags; // 0x03E
|
2014-04-02 05:56:26 +02:00
|
|
|
rct_scroll scrolls[3]; // 0x040
|
2014-07-23 19:07:38 +02:00
|
|
|
uint8 list_item_positions[1024];// 0x076
|
|
|
|
uint16 no_list_items; // 0x476 0 for no items
|
2014-04-19 04:16:20 +02:00
|
|
|
sint16 pad_478;
|
2014-07-23 19:07:38 +02:00
|
|
|
sint16 selected_list_item; // 0x47A -1 for none selected
|
2014-04-19 04:16:20 +02:00
|
|
|
sint16 pad_47C;
|
|
|
|
sint16 pad_47E;
|
2014-08-25 16:04:28 +02:00
|
|
|
union {
|
2014-08-23 09:30:31 +02:00
|
|
|
coordinate_focus viewport_focus_coordinates;
|
|
|
|
sprite_focus viewport_focus_sprite;
|
2014-08-22 19:54:28 +02:00
|
|
|
campaign_variables campaign;
|
|
|
|
new_ride_variables new_ride;
|
|
|
|
news_variables news;
|
2014-08-22 21:17:48 +02:00
|
|
|
map_variables map;
|
2014-08-25 16:04:28 +02:00
|
|
|
ride_variables ride;
|
2014-08-27 22:50:33 +02:00
|
|
|
scenery_variables scenery;
|
2014-09-27 01:41:24 +02:00
|
|
|
track_list_variables track_list;
|
2014-10-05 03:51:17 +02:00
|
|
|
error_variables error;
|
2014-08-22 19:54:28 +02:00
|
|
|
};
|
2014-07-23 19:07:38 +02:00
|
|
|
sint16 page; // 0x48A
|
2014-04-02 05:56:26 +02:00
|
|
|
sint16 var_48C;
|
2015-02-08 15:31:37 +01:00
|
|
|
uint16 frame_no; // 0x48E updated every tic for motion in windows sprites
|
2014-08-25 20:31:53 +02:00
|
|
|
uint16 list_information_type; // 0x490 0 for none, Used as current position of marquee in window_peep
|
2014-04-02 05:56:26 +02:00
|
|
|
sint16 var_492;
|
|
|
|
uint32 var_494;
|
|
|
|
uint8 var_498[0x14];
|
2014-05-14 15:58:14 +02:00
|
|
|
sint16 selected_tab; // 0x4AC
|
2014-04-02 05:56:26 +02:00
|
|
|
sint16 var_4AE;
|
2014-07-23 19:07:38 +02:00
|
|
|
sint16 viewport_target_sprite; // 0x4B0 viewport target sprite?
|
2014-05-04 12:56:35 +02:00
|
|
|
sint16 saved_view_x; // 0x4B2
|
|
|
|
sint16 saved_view_y; // 0x4B4
|
2014-04-02 05:56:26 +02:00
|
|
|
rct_windowclass classification; // 0x4B6
|
|
|
|
uint8 pad_4B7;
|
2014-04-09 23:35:29 +02:00
|
|
|
sint8 var_4B8;
|
|
|
|
sint8 var_4B9;
|
2014-04-02 05:56:26 +02:00
|
|
|
uint8 colours[6]; // 0x4BA
|
|
|
|
} rct_window;
|
|
|
|
|
2014-07-20 08:46:29 +02:00
|
|
|
#define RCT_WINDOW_RIGHT(w) (w->x + w->width)
|
|
|
|
#define RCT_WINDOW_BOTTOM(w) (w->y + w->height)
|
|
|
|
|
2014-04-02 05:56:26 +02:00
|
|
|
typedef enum {
|
|
|
|
WE_CLOSE = 0,
|
|
|
|
WE_MOUSE_UP = 1,
|
2014-04-18 04:04:46 +02:00
|
|
|
WE_RESIZE = 2,
|
2014-04-02 05:56:26 +02:00
|
|
|
WE_MOUSE_DOWN = 3,
|
|
|
|
WE_DROPDOWN = 4,
|
2014-09-13 15:30:21 +02:00
|
|
|
WE_UNKNOWN_05 = 5,
|
|
|
|
// Unknown 05: Used to update tabs that are not being animated
|
|
|
|
// see window_peep. When the overview tab is not highlighted the
|
|
|
|
// items being carried such as hats/balloons still need to be shown
|
|
|
|
// and removed. Probably called after anything that affects items
|
|
|
|
// being carried.
|
2014-04-02 05:56:26 +02:00
|
|
|
WE_UPDATE = 6,
|
|
|
|
WE_UNKNOWN_07 = 7,
|
|
|
|
WE_UNKNOWN_08 = 8,
|
2014-04-17 16:12:41 +02:00
|
|
|
WE_TOOL_UPDATE = 9,
|
|
|
|
WE_TOOL_DOWN = 10,
|
|
|
|
WE_TOOL_DRAG = 11,
|
|
|
|
WE_TOOL_UP = 12,
|
|
|
|
WE_TOOL_ABORT = 13,
|
2014-04-02 05:56:26 +02:00
|
|
|
WE_UNKNOWN_0E = 14,
|
|
|
|
WE_SCROLL_GETSIZE = 15,
|
|
|
|
WE_SCROLL_MOUSEDOWN = 16,
|
|
|
|
WE_UNKNOWN_11 = 17,
|
|
|
|
WE_SCROLL_MOUSEOVER = 18,
|
2014-04-17 04:19:30 +02:00
|
|
|
WE_TEXT_INPUT = 19,
|
2014-04-02 05:56:26 +02:00
|
|
|
WE_UNKNOWN_14 = 20,
|
2014-07-11 14:41:42 +02:00
|
|
|
WE_UNKNOWN_15 = 21, // scroll mouse move?
|
2014-04-02 05:56:26 +02:00
|
|
|
WE_TOOLTIP = 22,
|
2014-12-16 02:24:13 +01:00
|
|
|
WE_CURSOR = 23,
|
|
|
|
WE_MOVED = 24,
|
2014-04-02 05:56:26 +02:00
|
|
|
WE_INVALIDATE = 25,
|
|
|
|
WE_PAINT = 26,
|
|
|
|
WE_SCROLL_PAINT = 27,
|
|
|
|
} WINDOW_EVENTS;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
/*
|
|
|
|
WF_TIMEOUT_SHL = 0,
|
|
|
|
WF_TIMEOUT_MASK = 7,
|
|
|
|
WF_DRAGGING = 1 << 3,
|
|
|
|
WF_SCROLLER_UP = 1 << 4,
|
|
|
|
WF_SCROLLER_DOWN = 1 << 5,
|
|
|
|
WF_SCROLLER_MIDDLE = 1 << 6,
|
|
|
|
WF_DISABLE_VP_SCROLL = 1 << 9,
|
|
|
|
*/
|
|
|
|
|
2014-04-24 21:26:05 +02:00
|
|
|
WF_STICK_TO_BACK = (1 << 0),
|
|
|
|
WF_STICK_TO_FRONT = (1 << 1),
|
2014-04-26 02:16:32 +02:00
|
|
|
WF_2 = (1 << 2),
|
2014-08-24 13:33:37 +02:00
|
|
|
WF_SCROLLING_TO_LOCATION = (1 << 3),
|
2014-04-02 05:56:26 +02:00
|
|
|
WF_TRANSPARENT = (1 << 4),
|
2014-04-24 19:53:42 +02:00
|
|
|
WF_5 = (1 << 5),
|
2014-11-05 23:12:22 +01:00
|
|
|
WF_7 = (1 << 7),
|
2014-04-17 20:33:31 +02:00
|
|
|
WF_RESIZABLE = (1 << 8),
|
2014-04-24 19:53:42 +02:00
|
|
|
WF_9 = (1 << 9),
|
|
|
|
WF_10 = (1 << 10),
|
2014-04-02 05:56:26 +02:00
|
|
|
WF_WHITE_BORDER_ONE = (1 << 12),
|
|
|
|
WF_WHITE_BORDER_MASK = (1 << 12) | (1 << 13),
|
2014-12-16 02:24:13 +01:00
|
|
|
|
|
|
|
WF_NO_SNAPPING = (1 << 15)
|
2014-04-02 05:56:26 +02:00
|
|
|
} WINDOW_FLAGS;
|
|
|
|
|
2014-07-27 16:39:20 +02:00
|
|
|
enum SCROLL_FLAGS {
|
2014-04-11 18:38:15 +02:00
|
|
|
HSCROLLBAR_VISIBLE = (1 << 0),
|
|
|
|
HSCROLLBAR_THUMB_PRESSED = (1 << 1),
|
|
|
|
HSCROLLBAR_LEFT_PRESSED = (1 << 2),
|
|
|
|
HSCROLLBAR_RIGHT_PRESSED = (1 << 3),
|
|
|
|
VSCROLLBAR_VISIBLE = (1 << 4),
|
|
|
|
VSCROLLBAR_THUMB_PRESSED = (1 << 5),
|
|
|
|
VSCROLLBAR_UP_PRESSED = (1 << 6),
|
|
|
|
VSCROLLBAR_DOWN_PRESSED = (1 << 7),
|
|
|
|
};
|
|
|
|
|
|
|
|
#define SCROLLBAR_SIZE 16
|
|
|
|
|
|
|
|
enum {
|
|
|
|
SCROLL_PART_NONE = -1,
|
|
|
|
SCROLL_PART_VIEW = 0,
|
|
|
|
SCROLL_PART_HSCROLLBAR_LEFT = 1,
|
|
|
|
SCROLL_PART_HSCROLLBAR_RIGHT = 2,
|
|
|
|
SCROLL_PART_HSCROLLBAR_LEFT_TROUGH = 3,
|
|
|
|
SCROLL_PART_HSCROLLBAR_RIGHT_TROUGH = 4,
|
|
|
|
SCROLL_PART_HSCROLLBAR_THUMB = 5,
|
|
|
|
SCROLL_PART_VSCROLLBAR_TOP = 6,
|
|
|
|
SCROLL_PART_VSCROLLBAR_BOTTOM = 7,
|
|
|
|
SCROLL_PART_VSCROLLBAR_TOP_TROUGH = 8,
|
|
|
|
SCROLL_PART_VSCROLLBAR_BOTTOM_TROUGH = 9,
|
|
|
|
SCROLL_PART_VSCROLLBAR_THUMB = 10,
|
|
|
|
};
|
|
|
|
|
2014-04-02 05:56:26 +02:00
|
|
|
enum {
|
|
|
|
INPUT_STATE_RESET = 0,
|
|
|
|
INPUT_STATE_NORMAL = 1,
|
|
|
|
INPUT_STATE_WIDGET_PRESSED = 2,
|
2014-11-10 03:17:45 +01:00
|
|
|
INPUT_STATE_POSITIONING_WINDOW = 3,
|
|
|
|
INPUT_STATE_VIEWPORT_RIGHT = 4,
|
2014-04-02 05:56:26 +02:00
|
|
|
INPUT_STATE_DROPDOWN_ACTIVE = 5,
|
2014-04-24 19:53:42 +02:00
|
|
|
INPUT_STATE_VIEWPORT_LEFT = 6,
|
2014-04-02 05:56:26 +02:00
|
|
|
INPUT_STATE_SCROLL_LEFT = 7,
|
|
|
|
INPUT_STATE_RESIZING = 8,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
|
|
|
WC_MAIN_WINDOW = 0,
|
|
|
|
WC_TOP_TOOLBAR = 1,
|
|
|
|
WC_BOTTOM_TOOLBAR = 2,
|
|
|
|
WC_TOOLTIP = 5,
|
|
|
|
WC_DROPDOWN = 6,
|
|
|
|
WC_ABOUT = 8,
|
2014-09-11 18:55:19 +02:00
|
|
|
WC_PUBLISHER_CREDITS = 9,
|
|
|
|
WC_MUSIC_CREDITS = 10,
|
2014-04-24 19:53:42 +02:00
|
|
|
WC_ERROR = 11,
|
2014-04-02 05:56:26 +02:00
|
|
|
WC_RIDE = 12,
|
|
|
|
WC_RIDE_CONSTRUCTION = 13,
|
2014-05-02 23:21:08 +02:00
|
|
|
WC_SAVE_PROMPT = 14,
|
2014-04-02 05:56:26 +02:00
|
|
|
WC_RIDE_LIST = 15,
|
|
|
|
WC_CONSTRUCT_RIDE = 16,
|
2014-09-01 13:04:34 +02:00
|
|
|
WC_DEMOLISH_RIDE_PROMPT = 17,
|
2014-04-02 05:56:26 +02:00
|
|
|
WC_SCENERY = 18,
|
|
|
|
WC_OPTIONS = 19,
|
|
|
|
WC_FOOTPATH = 20,
|
|
|
|
WC_LAND = 21,
|
|
|
|
WC_WATER = 22,
|
|
|
|
WC_PEEP = 23,
|
|
|
|
WC_GUEST_LIST = 24,
|
|
|
|
WC_STAFF_LIST = 25,
|
2014-08-28 01:48:49 +02:00
|
|
|
WC_FIRE_PROMPT = 26,
|
2014-04-02 05:56:26 +02:00
|
|
|
WC_PARK_INFORMATION = 27,
|
|
|
|
WC_FINANCES = 28,
|
|
|
|
WC_TITLE_MENU = 29,
|
|
|
|
WC_TITLE_EXIT = 30,
|
|
|
|
WC_RECENT_NEWS = 31,
|
2014-04-13 23:23:56 +02:00
|
|
|
WC_SCENARIO_SELECT = 32,
|
2014-04-02 05:56:26 +02:00
|
|
|
WC_TRACK_DESIGN_LIST = 33,
|
2014-09-27 21:26:04 +02:00
|
|
|
WC_TRACK_DESIGN_PLACE = 34,
|
2014-04-02 05:56:26 +02:00
|
|
|
WC_NEW_CAMPAIGN = 35,
|
|
|
|
WC_KEYBOARD_SHORTCUT_LIST = 36,
|
|
|
|
WC_CHANGE_KEYBOARD_SHORTCUT = 37,
|
|
|
|
WC_MAP = 38,
|
|
|
|
WC_TITLE_LOGO = 39,
|
2014-05-09 10:04:40 +02:00
|
|
|
WC_BANNER = 40,
|
2014-10-17 03:01:58 +02:00
|
|
|
WC_MAP_TOOLTIP = 41,
|
2014-04-02 05:56:26 +02:00
|
|
|
WC_EDITOR_OBJECT_SELECTION = 42,
|
|
|
|
WC_EDITOR_INVENTION_LIST = 43,
|
2014-12-16 02:24:13 +01:00
|
|
|
WC_EDITOR_INVENTION_LIST_DRAG = 44,
|
2014-04-02 05:56:26 +02:00
|
|
|
WC_EDITOR_SCENARIO_OPTIONS = 45,
|
|
|
|
WC_EDTIOR_OBJECTIVE_OPTIONS = 46,
|
2014-12-16 16:33:32 +01:00
|
|
|
WC_MANAGE_TRACK_DESIGN = 47,
|
|
|
|
WC_TRACK_DELETE_PROMPT = 48,
|
2014-04-02 05:56:26 +02:00
|
|
|
WC_CLEAR_SCENERY = 50,
|
|
|
|
WC_CHEATS = 110,
|
2014-10-12 03:55:42 +02:00
|
|
|
WC_RESEARCH = 111,
|
2014-10-16 21:28:09 +02:00
|
|
|
WC_VIEWPORT = 112,
|
2015-02-09 19:32:58 +01:00
|
|
|
WC_TEXTINPUT = 113,
|
|
|
|
WC_MAPGEN = 114
|
2014-04-02 05:56:26 +02:00
|
|
|
} WINDOW_CLASS;
|
|
|
|
|
2014-05-24 01:00:58 +02:00
|
|
|
enum PROMPT_MODE {
|
2014-05-26 22:22:05 +02:00
|
|
|
PM_SAVE_BEFORE_LOAD = 0,
|
2014-05-24 01:00:58 +02:00
|
|
|
PM_SAVE_BEFORE_QUIT,
|
|
|
|
PM_SAVE_BEFORE_QUIT2,
|
|
|
|
PM_QUIT
|
|
|
|
};
|
2014-05-07 22:16:57 +02:00
|
|
|
|
2015-01-07 21:25:48 +01:00
|
|
|
typedef enum {
|
|
|
|
BTM_TB_DIRTY_FLAG_MONEY = (1 << 0),
|
|
|
|
BTM_TB_DIRTY_FLAG_DATE = (1 << 1),
|
|
|
|
BTM_TB_DIRTY_FLAG_PEEP_COUNT = (1 << 2),
|
|
|
|
BTM_TB_DIRTY_FLAG_CLIMATE = (1 << 3),
|
|
|
|
BTM_TB_DIRTY_FLAG_PARK_RATING = (1 << 4)
|
|
|
|
} BTM_TOOLBAR_DIRTY_FLAGS;
|
|
|
|
|
|
|
|
|
2014-07-10 22:22:32 +02:00
|
|
|
// rct2: 0x01420078
|
|
|
|
extern rct_window* g_window_list;
|
|
|
|
|
2014-09-30 19:56:30 +02:00
|
|
|
// rct2: 0x00F635EE
|
|
|
|
extern ride_list_item _window_track_list_item;
|
|
|
|
|
2014-04-08 18:52:39 +02:00
|
|
|
void window_dispatch_update_all();
|
2014-04-02 05:56:26 +02:00
|
|
|
void window_update_all();
|
2014-04-03 04:08:06 +02:00
|
|
|
rct_window *window_create(int x, int y, int width, int height, uint32 *event_handlers, rct_windowclass cls, uint16 flags);
|
2014-04-19 04:16:20 +02:00
|
|
|
rct_window *window_create_auto_pos(int width, int height, uint32 *event_handlers, rct_windowclass cls, uint16 flags);
|
2014-04-03 04:08:06 +02:00
|
|
|
void window_close(rct_window *window);
|
2014-10-16 03:02:43 +02:00
|
|
|
void window_close_by_class(rct_windowclass cls);
|
|
|
|
void window_close_by_number(rct_windowclass cls, rct_windownumber number);
|
2014-05-09 12:54:11 +02:00
|
|
|
void window_close_top();
|
|
|
|
void window_close_all();
|
2014-10-16 03:02:43 +02:00
|
|
|
rct_window *window_find_by_class(rct_windowclass cls);
|
|
|
|
rct_window *window_find_by_number(rct_windowclass cls, rct_windownumber number);
|
2014-04-14 04:09:51 +02:00
|
|
|
rct_window *window_find_from_point(int x, int y);
|
|
|
|
int window_find_widget_from_point(rct_window *w, int x, int y);
|
2014-04-03 04:08:06 +02:00
|
|
|
void window_invalidate(rct_window *window);
|
2014-10-16 03:02:43 +02:00
|
|
|
void window_invalidate_by_class(rct_windowclass cls);
|
|
|
|
void window_invalidate_by_number(rct_windowclass cls, rct_windownumber number);
|
|
|
|
void widget_invalidate(rct_window *w, int widgetIndex);
|
|
|
|
void widget_invalidate_by_class(rct_windowclass cls, int widgetIndex);
|
|
|
|
void widget_invalidate_by_number(rct_windowclass cls, rct_windownumber number, int widgetIndex);
|
2014-04-03 04:08:06 +02:00
|
|
|
void window_init_scroll_widgets(rct_window *w);
|
2014-04-25 04:02:06 +02:00
|
|
|
void window_update_scroll_widgets(rct_window *w);
|
2014-04-03 20:49:00 +02:00
|
|
|
int window_get_scroll_data_index(rct_window *w, int widget_index);
|
2014-05-04 15:10:32 +02:00
|
|
|
int window_get_scroll_size(rct_window *w, int scrollIndex, int *width, int *height);
|
2014-04-03 20:49:00 +02:00
|
|
|
|
|
|
|
rct_window *window_bring_to_front(rct_window *w);
|
2014-10-16 03:02:43 +02:00
|
|
|
rct_window *window_bring_to_front_by_class(rct_windowclass cls);
|
|
|
|
rct_window *window_bring_to_front_by_number(rct_windowclass cls, rct_windownumber number);
|
2014-04-02 05:56:26 +02:00
|
|
|
|
2014-09-01 22:06:50 +02:00
|
|
|
void window_push_others_right(rct_window *w);
|
2014-04-13 23:23:56 +02:00
|
|
|
void window_push_others_below(rct_window *w1);
|
|
|
|
|
2014-04-09 18:06:47 +02:00
|
|
|
rct_window *window_get_main();
|
|
|
|
|
2014-08-22 13:24:00 +02:00
|
|
|
void window_scroll_to_viewport(rct_window *w);
|
2014-04-11 18:38:15 +02:00
|
|
|
void window_scroll_to_location(rct_window *w, int x, int y, int z);
|
2014-04-10 16:14:47 +02:00
|
|
|
void window_rotate_camera(rct_window *w);
|
2014-04-26 16:50:01 +02:00
|
|
|
void window_zoom_in(rct_window *w);
|
|
|
|
void window_zoom_out(rct_window *w);
|
2014-04-10 16:14:47 +02:00
|
|
|
|
2014-04-17 04:19:30 +02:00
|
|
|
void window_show_textinput(rct_window *w, int widgetIndex, uint16 title, uint16 text, int value);
|
|
|
|
|
2014-04-08 18:52:39 +02:00
|
|
|
void window_draw(rct_window *w, int left, int top, int right, int bottom);
|
2014-04-09 15:43:27 +02:00
|
|
|
void window_draw_widgets(rct_window *w, rct_drawpixelinfo *dpi);
|
2014-04-17 04:19:30 +02:00
|
|
|
void window_draw_viewport(rct_drawpixelinfo *dpi, rct_window *w);
|
2014-04-08 18:52:39 +02:00
|
|
|
|
2014-11-09 18:18:51 +01:00
|
|
|
void window_set_position(rct_window *w, int x, int y);
|
2014-04-25 04:02:06 +02:00
|
|
|
void window_move_position(rct_window *w, int dx, int dy);
|
|
|
|
void window_resize(rct_window *w, int dw, int dh);
|
|
|
|
void window_set_resize(rct_window *w, int minWidth, int minHeight, int maxWidth, int maxHeight);
|
2014-04-18 01:07:06 +02:00
|
|
|
|
2014-04-30 17:57:27 +02:00
|
|
|
int tool_set(rct_window *w, int widgetIndex, int tool);
|
|
|
|
void tool_cancel();
|
|
|
|
|
2014-09-27 01:41:24 +02:00
|
|
|
void window_close_construction_windows();
|
|
|
|
|
2014-11-02 15:03:28 +01:00
|
|
|
void window_update_viewport_ride_music();
|
|
|
|
|
2014-04-13 23:23:56 +02:00
|
|
|
// Open window functions
|
|
|
|
void window_main_open();
|
2015-01-17 10:55:27 +01:00
|
|
|
void window_relocate_windows(int width, int height);
|
2014-07-29 20:40:06 +02:00
|
|
|
void window_resize_gui(int width, int height);
|
2014-08-11 22:57:45 +02:00
|
|
|
void window_resize_gui_scenario_editor(int width, int height);
|
2015-02-09 19:32:58 +01:00
|
|
|
void window_top_toolbar_open();
|
2014-04-13 23:23:56 +02:00
|
|
|
void window_game_bottom_toolbar_open();
|
2014-04-28 03:35:37 +02:00
|
|
|
void window_about_open();
|
2014-04-28 18:35:12 +02:00
|
|
|
void window_footpath_open();
|
2014-05-02 23:21:08 +02:00
|
|
|
void window_save_prompt_open();
|
2014-04-13 23:23:56 +02:00
|
|
|
void window_title_menu_open();
|
|
|
|
void window_title_exit_open();
|
|
|
|
void window_title_logo_open();
|
2014-05-04 15:10:32 +02:00
|
|
|
void window_news_open();
|
2014-04-13 23:23:56 +02:00
|
|
|
void window_scenarioselect_open();
|
2014-09-27 01:41:24 +02:00
|
|
|
void window_track_list_open(ride_list_item item);
|
2014-04-18 20:51:18 +02:00
|
|
|
void window_clear_scenery_open();
|
2014-04-13 23:23:56 +02:00
|
|
|
void window_land_open();
|
2014-04-14 04:09:51 +02:00
|
|
|
void window_water_open();
|
2014-10-07 20:39:52 +02:00
|
|
|
void window_staff_list_open();
|
2014-05-05 04:27:17 +02:00
|
|
|
void window_guest_list_open();
|
2014-05-14 12:49:40 +02:00
|
|
|
void window_map_open();
|
2014-05-11 09:01:01 +02:00
|
|
|
void window_options_open();
|
2014-10-05 15:21:35 +02:00
|
|
|
void window_shortcut_keys_open();
|
2014-10-07 18:57:38 +02:00
|
|
|
void window_shortcut_change_open(int selected_key);
|
2014-10-07 20:39:52 +02:00
|
|
|
void window_guest_open(rct_peep* peep);
|
|
|
|
void window_staff_open(rct_peep* peep);
|
2014-10-10 12:13:54 +02:00
|
|
|
void window_staff_fire_prompt_open(rct_peep* peep);
|
2014-05-08 17:08:52 +02:00
|
|
|
void window_park_awards_open();
|
2014-04-17 04:19:30 +02:00
|
|
|
void window_park_entrance_open();
|
2014-05-08 17:35:32 +02:00
|
|
|
void window_park_guests_open();
|
2014-04-14 22:25:20 +02:00
|
|
|
void window_park_objective_open();
|
2014-05-08 17:08:52 +02:00
|
|
|
void window_park_rating_open();
|
2014-05-26 00:17:55 +02:00
|
|
|
void window_finances_open();
|
2014-08-19 22:33:05 +02:00
|
|
|
void window_finances_research_open();
|
2014-08-22 21:17:48 +02:00
|
|
|
void window_new_campaign_open(sint16 campaignType);
|
2014-10-16 01:35:42 +02:00
|
|
|
rct_window *window_ride_main_open(int rideIndex);
|
2014-11-10 01:40:59 +01:00
|
|
|
rct_window *window_ride_open_station(int rideIndex, int stationIndex);
|
|
|
|
rct_window *window_ride_open_track(rct_map_element *mapElement);
|
|
|
|
rct_window *window_ride_open_vehicle(rct_vehicle *vehicle);
|
2014-11-02 09:39:01 +01:00
|
|
|
void window_ride_demolish_prompt_open(int rideIndex);
|
2014-10-16 01:35:42 +02:00
|
|
|
void window_ride_construct(rct_window *w);
|
2014-04-19 04:16:20 +02:00
|
|
|
void window_ride_list_open();
|
2014-11-04 22:39:03 +01:00
|
|
|
rct_window * window_construction_open();
|
2014-09-28 00:48:42 +02:00
|
|
|
void window_track_place_open();
|
2014-08-18 00:57:41 +02:00
|
|
|
void window_new_ride_open();
|
2014-10-21 18:59:47 +02:00
|
|
|
void window_banner_open(rct_windownumber number);
|
2014-11-01 16:32:29 +01:00
|
|
|
void window_sign_open(rct_windownumber number);
|
2014-11-02 15:09:04 +01:00
|
|
|
void window_sign_small_open(rct_windownumber number);
|
2014-04-15 01:50:20 +02:00
|
|
|
void window_cheats_open();
|
2014-08-15 23:05:35 +02:00
|
|
|
void window_research_open();
|
2014-08-21 21:53:17 +02:00
|
|
|
void window_scenery_open();
|
2014-09-11 17:44:23 +02:00
|
|
|
void window_music_credits_open();
|
2014-09-26 22:19:48 +02:00
|
|
|
void window_publisher_credits_open();
|
2014-09-28 00:48:42 +02:00
|
|
|
void window_track_manage_open();
|
2014-10-12 03:55:42 +02:00
|
|
|
void window_viewport_open();
|
2014-12-11 00:07:11 +01:00
|
|
|
void window_text_input_open(rct_window* call_w, int call_widget, rct_string_id title, rct_string_id description, rct_string_id existing_text, uint32 existing_args, int maxLength);
|
2015-02-09 19:32:58 +01:00
|
|
|
rct_window *window_mapgen_open();
|
2014-04-13 23:23:56 +02:00
|
|
|
|
2014-11-23 17:28:23 +01:00
|
|
|
void window_editor_main_open();
|
|
|
|
void window_editor_bottom_toolbar_open();
|
2014-11-25 00:05:35 +01:00
|
|
|
void window_editor_object_selection_open();
|
|
|
|
void window_editor_inventions_list_open();
|
|
|
|
void window_editor_scenario_options_open();
|
|
|
|
void window_editor_objective_options_open();
|
2014-11-23 17:28:23 +01:00
|
|
|
|
2014-05-06 23:04:09 +02:00
|
|
|
void window_guest_list_init_vars_a();
|
|
|
|
void window_guest_list_init_vars_b();
|
2014-07-23 19:07:38 +02:00
|
|
|
void window_bubble_list_item(rct_window* w, int item_position);
|
2014-05-08 22:48:31 +02:00
|
|
|
|
2014-08-27 13:35:44 +02:00
|
|
|
void window_align_tabs( rct_window *w, uint8 start_tab_id, uint8 end_tab_id );
|
|
|
|
|
2014-05-10 00:11:51 +02:00
|
|
|
void window_new_ride_init_vars();
|
2014-10-08 23:11:50 +02:00
|
|
|
void window_new_ride_focus(ride_list_item rideItem);
|
2014-05-08 22:48:31 +02:00
|
|
|
|
2014-10-17 03:01:58 +02:00
|
|
|
void window_map_tooltip_update_visibility();
|
|
|
|
|
2014-10-07 20:39:52 +02:00
|
|
|
void window_staff_list_init_vars();
|
2014-05-06 23:04:09 +02:00
|
|
|
|
2014-11-11 21:51:25 +01:00
|
|
|
void window_event_mouse_up_call(rct_window* w, int widgetIndex);
|
|
|
|
void window_event_resize_call(rct_window* w);
|
|
|
|
void window_event_mouse_down_call(rct_window* w, int widgetIndex);
|
|
|
|
void window_event_invalidate_call(rct_window* w);
|
2014-05-09 18:27:59 +02:00
|
|
|
|
2014-10-15 23:59:26 +02:00
|
|
|
void sub_6EA73F();
|
|
|
|
|
2014-11-09 18:18:51 +01:00
|
|
|
void window_move_and_snap(rct_window *w, int newWindowX, int newWindowY, int snapProximity);
|
2014-11-11 01:20:06 +01:00
|
|
|
int window_can_resize(rct_window *w);
|
2014-11-09 18:18:51 +01:00
|
|
|
|
2014-08-10 19:12:07 +02:00
|
|
|
#ifdef _MSC_VER
|
|
|
|
#define window_get_register(w) \
|
|
|
|
__asm mov w, esi
|
|
|
|
|
2014-08-19 20:22:13 +02:00
|
|
|
#define window_widget_get_registers(w, widgetIndex) \
|
2014-08-10 19:12:07 +02:00
|
|
|
__asm mov widgetIndex, dx \
|
|
|
|
__asm mov w, esi
|
|
|
|
|
2014-08-12 01:27:25 +02:00
|
|
|
#define window_dropdown_get_registers(w, widgetIndex, dropdownIndex) \
|
|
|
|
__asm mov dropdownIndex, ax \
|
|
|
|
__asm mov widgetIndex, dx \
|
|
|
|
__asm mov w, esi
|
2014-09-09 19:08:34 +02:00
|
|
|
|
2014-12-11 00:07:11 +01:00
|
|
|
#define window_text_input_get_registers(w, widgetIndex, result, text) \
|
2014-09-09 19:08:34 +02:00
|
|
|
__asm mov widgetIndex, dx \
|
2014-12-11 00:07:11 +01:00
|
|
|
__asm mov result, cl \
|
2014-09-09 19:08:34 +02:00
|
|
|
__asm mov w, esi \
|
|
|
|
__asm mov text, edi
|
2014-08-12 01:27:25 +02:00
|
|
|
|
2014-12-16 02:24:13 +01:00
|
|
|
#define window_scroll_get_registers(w, i) \
|
|
|
|
__asm mov i, ax \
|
|
|
|
__asm mov w, esi
|
|
|
|
|
|
|
|
#define window_scrollmouse_get_registers(w, i, x, y) \
|
|
|
|
__asm mov i, ax \
|
2014-08-19 19:47:12 +02:00
|
|
|
__asm mov x, cx \
|
|
|
|
__asm mov y, dx \
|
|
|
|
__asm mov w, esi
|
|
|
|
|
|
|
|
#define window_tool_get_registers(w, widgetIndex, x, y) \
|
|
|
|
__asm mov x, ax \
|
|
|
|
__asm mov y, bx \
|
|
|
|
__asm mov widgetIndex, dx \
|
|
|
|
__asm mov w, esi
|
|
|
|
|
2014-09-02 15:05:44 +02:00
|
|
|
#define window_textinput_get_registers(w, widgetIndex, result, text) \
|
|
|
|
__asm mov result, cl \
|
|
|
|
__asm mov widgetIndex, dx \
|
|
|
|
__asm mov w, esi \
|
|
|
|
__asm mov text, edi
|
|
|
|
|
2014-08-10 19:12:07 +02:00
|
|
|
#define window_paint_get_registers(w, dpi) \
|
|
|
|
__asm mov w, esi \
|
|
|
|
__asm mov dpi, edi
|
2014-12-11 00:07:11 +01:00
|
|
|
|
2014-12-16 02:24:13 +01:00
|
|
|
#define window_scrollpaint_get_registers(w, dpi, i) \
|
|
|
|
__asm mov i, ax \
|
|
|
|
__asm mov w, esi \
|
|
|
|
__asm mov dpi, edi
|
|
|
|
|
2014-12-11 00:07:11 +01:00
|
|
|
#define window_scrollsize_set_registers(width, height) \
|
|
|
|
__asm mov ecx, width \
|
|
|
|
__asm mov edx, height
|
2014-12-16 02:24:13 +01:00
|
|
|
|
|
|
|
#define window_cursor_get_registers(w, widgetIndex, x, y) \
|
|
|
|
__asm mov widgetIndex, ax \
|
|
|
|
__asm mov x, cx \
|
|
|
|
__asm mov y, dx \
|
|
|
|
__asm mov w, esi
|
|
|
|
|
|
|
|
#define window_cursor_set_registers(cursorId) \
|
|
|
|
__asm mov ebx, cursorId
|
|
|
|
|
2014-08-10 19:12:07 +02:00
|
|
|
#else
|
|
|
|
#define window_get_register(w) \
|
2014-09-12 21:35:27 +02:00
|
|
|
__asm__ ( "mov %["#w"], esi " : [w] "+m" (w) );
|
2014-08-10 19:12:07 +02:00
|
|
|
|
2014-08-19 19:47:12 +02:00
|
|
|
#define window_widget_get_registers(w, widgetIndex) \
|
2014-09-12 21:35:27 +02:00
|
|
|
__asm__ ( "mov %["#widgetIndex"], dx " : [widgetIndex] "+m" (widgetIndex) ); \
|
|
|
|
__asm__ ( "mov %["#w"], esi " : [w] "+m" (w) );
|
2014-08-10 19:12:07 +02:00
|
|
|
|
2014-08-12 01:27:25 +02:00
|
|
|
#define window_dropdown_get_registers(w, widgetIndex, dropdownIndex) \
|
2014-09-12 21:35:27 +02:00
|
|
|
__asm__ ( "mov %["#dropdownIndex"], ax " : [dropdownIndex] "+m" (dropdownIndex) ); \
|
2014-12-11 00:07:11 +01:00
|
|
|
__asm__ ( "mov %["#widgetIndex"], dx " : [widgetIndex] "+m" (widgetIndex) ); \
|
2014-09-12 21:35:27 +02:00
|
|
|
__asm__ ( "mov %["#w"], esi " : [w] "+m" (w) );
|
2014-08-12 01:27:25 +02:00
|
|
|
|
2014-12-11 00:07:11 +01:00
|
|
|
#define window_text_input_get_registers(w, widgetIndex, result, text) \
|
|
|
|
__asm__ ( "mov %[_cl], cl " : [_cl] "+m" (result) ); \
|
2014-09-09 19:08:34 +02:00
|
|
|
__asm__ ( "mov %[widgetIndex], dx " : [widgetIndex] "+m" (widgetIndex) ); \
|
|
|
|
__asm__ ( "mov %[w], esi " : [w] "+m" (w) ); \
|
|
|
|
__asm__ ( "mov %[text], edi " : [text] "+m" (text) );
|
|
|
|
|
2014-12-16 02:24:13 +01:00
|
|
|
#define window_scroll_get_registers(w, i) \
|
|
|
|
__asm__ ( "mov %["#i"], ax " : [i] "+m" (i) ); \
|
|
|
|
__asm__ ( "mov %["#w"], esi " : [w] "+m" (w) );
|
|
|
|
|
|
|
|
#define window_scrollmouse_get_registers(w, i, x, y) \
|
|
|
|
__asm__ ( "mov %["#i"], ax " : [i] "+m" (i) ); \
|
2014-12-11 00:07:11 +01:00
|
|
|
__asm__ ( "mov %["#x"], cx " : [x] "+m" (x) ); \
|
|
|
|
__asm__ ( "mov %["#y"], dx " : [y] "+m" (y) ); \
|
2014-09-12 21:35:27 +02:00
|
|
|
__asm__ ( "mov %["#w"], esi " : [w] "+m" (w) );
|
2014-08-19 19:47:12 +02:00
|
|
|
|
|
|
|
#define window_tool_get_registers(w, widgetIndex, x, y) \
|
2014-12-11 00:07:11 +01:00
|
|
|
__asm__ ( "mov %["#x"], ax " : [x] "+m" (x) ); \
|
|
|
|
__asm__ ( "mov %["#y"], bx " : [y] "+m" (y) ); \
|
|
|
|
__asm__ ( "mov %["#widgetIndex"], dx " : [widgetIndex] "+m" (widgetIndex) ); \
|
2014-09-12 21:35:27 +02:00
|
|
|
__asm__ ( "mov %["#w"], esi " : [w] "+m" (w) );
|
2014-08-19 19:47:12 +02:00
|
|
|
|
2014-09-02 15:05:44 +02:00
|
|
|
#define window_textinput_get_registers(w, widgetIndex, result, text) \
|
|
|
|
__asm__ ( "mov %[result], cl " : [result] "+m" (result) ); \
|
|
|
|
__asm__ ( "mov %[widgetIndex], dx " : [widgetIndex] "+m" (widgetIndex) ); \
|
|
|
|
__asm__ ( "mov %[w], esi " : [w] "+m" (w) ); \
|
|
|
|
__asm__ ( "mov %[text], edi " : [text] "+m" (text) );
|
|
|
|
|
2014-08-10 19:12:07 +02:00
|
|
|
#define window_paint_get_registers(w, dpi) \
|
2014-09-12 21:35:27 +02:00
|
|
|
__asm__ ( "mov %["#w"], esi " : [w] "+m" (w) ); \
|
|
|
|
__asm__ ( "mov %["#dpi"], edi " : [dpi] "+m" (dpi) );
|
2014-12-11 00:07:11 +01:00
|
|
|
|
2014-12-16 02:24:13 +01:00
|
|
|
#define window_scrollpaint_get_registers(w, dpi, i) \
|
|
|
|
__asm__ ( "mov %["#i"], ax " : [i] "+m" (i) ); \
|
|
|
|
__asm__ ( "mov %["#w"], esi " : [w] "+m" (w) ); \
|
|
|
|
__asm__ ( "mov %["#dpi"], edi " : [dpi] "+m" (dpi) );
|
|
|
|
|
2014-12-11 00:07:11 +01:00
|
|
|
#define window_scrollsize_set_registers(width, height) \
|
|
|
|
__asm__ ( "mov ecx, %[width] " : [width] "+m" (width) ); \
|
|
|
|
__asm__ ( "mov edx, %[height] " : [height] "+m" (height) );
|
2014-12-16 02:24:13 +01:00
|
|
|
|
|
|
|
#define window_cursor_get_registers(w, widgetIndex, x, y) \
|
|
|
|
__asm__ ( "mov %["#widgetIndex"], ax " : [widgetIndex] "+m" (widgetIndex) ); \
|
|
|
|
__asm__ ( "mov %["#x"], cx " : [x] "+m" (x) ); \
|
|
|
|
__asm__ ( "mov %["#y"], dx " : [y] "+m" (y) ); \
|
|
|
|
__asm__ ( "mov %["#w"], esi " : [w] "+m" (w) );
|
|
|
|
|
|
|
|
#define window_cursor_set_registers(cursorId) \
|
|
|
|
__asm__ ( "mov ebx, %[cursorId] " : [cursorId] "+m" (cursorId) );
|
2014-08-10 19:12:07 +02:00
|
|
|
#endif
|
|
|
|
|
2014-04-21 11:27:48 +02:00
|
|
|
#endif
|