src/gfx.h
author rubidium
Sat, 22 Dec 2007 23:30:28 +0000
changeset 8121 3bc6351e7369
parent 8113 31b7784db761
permissions -rw-r--r--
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
2186
db48cf29b983 (svn r2701) Insert Id tags into all source files
tron
parents: 2134
diff changeset
     1
/* $Id$ */
db48cf29b983 (svn r2701) Insert Id tags into all source files
tron
parents: 2134
diff changeset
     2
6179
d19b0137d8e4 (svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6146
diff changeset
     3
/** @file gfx.h */
d19b0137d8e4 (svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6146
diff changeset
     4
7545
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
     5
/**
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
     6
 * @defgroup dirty Dirty
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
     7
 *
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
     8
 * Handles the repaint of some part of the screen.
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
     9
 *
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
    10
 * Some places in the code are called functions which makes something "dirty".
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
    11
 * This has nothing to do with making a Tile or Window darker or less visible.
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
    12
 * This term comes from memory caching and is used to define an object must
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
    13
 * be repaint. If some data of an object (like a Tile, Window, Vehicle, whatever)
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
    14
 * are changed which are so extensive the object must be repaint its marked
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
    15
 * as "dirty". The video driver repaint this object instead of the whole screen
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
    16
 * (this is btw. also possible if needed). This is used to avoid a
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
    17
 * flickering of the screen by the video driver constantly repainting it.
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
    18
 *
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
    19
 * This whole mechanism is controlled by an rectangle defined in #_invalid_rect. This
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
    20
 * rectangle defines the area on the screen which must be repaint. If a new object
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
    21
 * needs to be repainted this rectangle is extended to 'catch' the object on the
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
    22
 * screen. At some point (which is normaly uninteressted for patch writers) this
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
    23
 * rectangle is send to the video drivers method
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
    24
 * VideoDriver::MakeDirty and it is truncated back to an empty rectangle. At some
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
    25
 * later point (which is uninteressted, too) the video driver
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
    26
 * repaints all these saved rectangle instead of the whole screen and drop the
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
    27
 * rectangle informations. Then a new round begins by marking objects "dirty".
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
    28
 *
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
    29
 * @see VideoDriver::MakeDirty
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
    30
 * @see _invalid_rect
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
    31
 * @see _screen
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
    32
 */
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
    33
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
    34
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    35
#ifndef GFX_H
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    36
#define GFX_H
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    37
6289
9f468eccc674 (svn r9111) -Feature: [OSX] mighty mice and touchpads can now scroll the map (in all directions)
bjarni
parents: 6248
diff changeset
    38
#include "openttd.h"
8113
31b7784db761 (svn r11674) -Codechange: refactor some functions out of macros.h into more logical locations.
rubidium
parents: 7824
diff changeset
    39
#include "core/math_func.hpp"
8121
3bc6351e7369 (svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents: 8113
diff changeset
    40
#include "core/geometry_type.hpp"
3bc6351e7369 (svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents: 8113
diff changeset
    41
#include "core/enum_type.hpp"
6624
880e29b1f25e (svn r9844) -Codechange: replace zoomlevel with an enum
truelight
parents: 6377
diff changeset
    42
#include "zoom.hpp"
5636
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    43
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    44
enum WindowKeyCodes {
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    45
	WKC_SHIFT = 0x8000,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    46
	WKC_CTRL  = 0x4000,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    47
	WKC_ALT   = 0x2000,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    48
	WKC_META  = 0x1000,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    49
6179
d19b0137d8e4 (svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6146
diff changeset
    50
	/* Special ones */
5636
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    51
	WKC_NONE        =  0,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    52
	WKC_ESC         =  1,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    53
	WKC_BACKSPACE   =  2,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    54
	WKC_INSERT      =  3,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    55
	WKC_DELETE      =  4,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    56
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    57
	WKC_PAGEUP      =  5,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    58
	WKC_PAGEDOWN    =  6,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    59
	WKC_END         =  7,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    60
	WKC_HOME        =  8,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    61
6179
d19b0137d8e4 (svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6146
diff changeset
    62
	/* Arrow keys */
5636
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    63
	WKC_LEFT        =  9,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    64
	WKC_UP          = 10,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    65
	WKC_RIGHT       = 11,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    66
	WKC_DOWN        = 12,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    67
6179
d19b0137d8e4 (svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6146
diff changeset
    68
	/* Return & tab */
5636
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    69
	WKC_RETURN      = 13,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    70
	WKC_TAB         = 14,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    71
6179
d19b0137d8e4 (svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6146
diff changeset
    72
	/* Space */
5636
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    73
	WKC_SPACE       = 32,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    74
6179
d19b0137d8e4 (svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6146
diff changeset
    75
	/* Function keys */
5636
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    76
	WKC_F1          = 33,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    77
	WKC_F2          = 34,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    78
	WKC_F3          = 35,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    79
	WKC_F4          = 36,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    80
	WKC_F5          = 37,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    81
	WKC_F6          = 38,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    82
	WKC_F7          = 39,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    83
	WKC_F8          = 40,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    84
	WKC_F9          = 41,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    85
	WKC_F10         = 42,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    86
	WKC_F11         = 43,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    87
	WKC_F12         = 44,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    88
7311
fde7a4d92a39 (svn r10663) -Fix r10662: bad me, didn't comply with coding style, as penalty I updated the surrounding code to comply with coding style too; I will never do it again (I hope :p)
truelight
parents: 7310
diff changeset
    89
	/* Backquote is the key left of "1"
6179
d19b0137d8e4 (svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6146
diff changeset
    90
	 * we only store this key here, no matter what character is really mapped to it
6729
302e2c8fff07 (svn r9961) -Fix (r7182): some file were still in iso8859-15 instead of utf8.
rubidium
parents: 6705
diff changeset
    91
	 * on a particular keyboard. (US keyboard: ` and ~ ; German keyboard: ^ and °) */
5636
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    92
	WKC_BACKQUOTE   = 45,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    93
	WKC_PAUSE       = 46,
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
    94
6179
d19b0137d8e4 (svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6146
diff changeset
    95
	/* 0-9 are mapped to 48-57
d19b0137d8e4 (svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6146
diff changeset
    96
	 * A-Z are mapped to 65-90
d19b0137d8e4 (svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6146
diff changeset
    97
	 * a-z are mapped to 97-122 */
7310
eed5036fee1f (svn r10662) -Add: added 'V' as new shortcut for new viewport (bilbo)
truelight
parents: 6999
diff changeset
    98
7541
8086db74ec5b (svn r11061) -Fix [FS#1086]: [win32] some keys were handled twice
glx
parents: 7454
diff changeset
    99
	/* Numerical keyboard */
8086db74ec5b (svn r11061) -Fix [FS#1086]: [win32] some keys were handled twice
glx
parents: 7454
diff changeset
   100
	WKC_NUM_0       = 128,
8086db74ec5b (svn r11061) -Fix [FS#1086]: [win32] some keys were handled twice
glx
parents: 7454
diff changeset
   101
	WKC_NUM_1       = 129,
8086db74ec5b (svn r11061) -Fix [FS#1086]: [win32] some keys were handled twice
glx
parents: 7454
diff changeset
   102
	WKC_NUM_2       = 130,
8086db74ec5b (svn r11061) -Fix [FS#1086]: [win32] some keys were handled twice
glx
parents: 7454
diff changeset
   103
	WKC_NUM_3       = 131,
8086db74ec5b (svn r11061) -Fix [FS#1086]: [win32] some keys were handled twice
glx
parents: 7454
diff changeset
   104
	WKC_NUM_4       = 132,
8086db74ec5b (svn r11061) -Fix [FS#1086]: [win32] some keys were handled twice
glx
parents: 7454
diff changeset
   105
	WKC_NUM_5       = 133,
8086db74ec5b (svn r11061) -Fix [FS#1086]: [win32] some keys were handled twice
glx
parents: 7454
diff changeset
   106
	WKC_NUM_6       = 134,
8086db74ec5b (svn r11061) -Fix [FS#1086]: [win32] some keys were handled twice
glx
parents: 7454
diff changeset
   107
	WKC_NUM_7       = 135,
8086db74ec5b (svn r11061) -Fix [FS#1086]: [win32] some keys were handled twice
glx
parents: 7454
diff changeset
   108
	WKC_NUM_8       = 136,
8086db74ec5b (svn r11061) -Fix [FS#1086]: [win32] some keys were handled twice
glx
parents: 7454
diff changeset
   109
	WKC_NUM_9       = 137,
8086db74ec5b (svn r11061) -Fix [FS#1086]: [win32] some keys were handled twice
glx
parents: 7454
diff changeset
   110
	WKC_NUM_DIV     = 138,
8086db74ec5b (svn r11061) -Fix [FS#1086]: [win32] some keys were handled twice
glx
parents: 7454
diff changeset
   111
	WKC_NUM_MUL     = 139,
8086db74ec5b (svn r11061) -Fix [FS#1086]: [win32] some keys were handled twice
glx
parents: 7454
diff changeset
   112
	WKC_NUM_MINUS   = 140,
8086db74ec5b (svn r11061) -Fix [FS#1086]: [win32] some keys were handled twice
glx
parents: 7454
diff changeset
   113
	WKC_NUM_PLUS    = 141,
8086db74ec5b (svn r11061) -Fix [FS#1086]: [win32] some keys were handled twice
glx
parents: 7454
diff changeset
   114
	WKC_NUM_ENTER   = 142,
8086db74ec5b (svn r11061) -Fix [FS#1086]: [win32] some keys were handled twice
glx
parents: 7454
diff changeset
   115
	WKC_NUM_DECIMAL = 143,
7310
eed5036fee1f (svn r10662) -Add: added 'V' as new shortcut for new viewport (bilbo)
truelight
parents: 6999
diff changeset
   116
7541
8086db74ec5b (svn r11061) -Fix [FS#1086]: [win32] some keys were handled twice
glx
parents: 7454
diff changeset
   117
	/* Other keys */
8086db74ec5b (svn r11061) -Fix [FS#1086]: [win32] some keys were handled twice
glx
parents: 7454
diff changeset
   118
	WKC_SLASH       = 144, ///< / Forward slash
8086db74ec5b (svn r11061) -Fix [FS#1086]: [win32] some keys were handled twice
glx
parents: 7454
diff changeset
   119
	WKC_SEMICOLON   = 145, ///< ; Semicolon
8086db74ec5b (svn r11061) -Fix [FS#1086]: [win32] some keys were handled twice
glx
parents: 7454
diff changeset
   120
	WKC_EQUALS      = 146, ///< = Equals
8086db74ec5b (svn r11061) -Fix [FS#1086]: [win32] some keys were handled twice
glx
parents: 7454
diff changeset
   121
	WKC_L_BRACKET   = 147, ///< [ Left square bracket
8086db74ec5b (svn r11061) -Fix [FS#1086]: [win32] some keys were handled twice
glx
parents: 7454
diff changeset
   122
	WKC_BACKSLASH   = 148, ///< \ Backslash
8086db74ec5b (svn r11061) -Fix [FS#1086]: [win32] some keys were handled twice
glx
parents: 7454
diff changeset
   123
	WKC_R_BRACKET   = 149, ///< ] Right square bracket
8086db74ec5b (svn r11061) -Fix [FS#1086]: [win32] some keys were handled twice
glx
parents: 7454
diff changeset
   124
	WKC_SINGLEQUOTE = 150, ///< ' Single quote
8086db74ec5b (svn r11061) -Fix [FS#1086]: [win32] some keys were handled twice
glx
parents: 7454
diff changeset
   125
	WKC_COMMA       = 151, ///< , Comma
8086db74ec5b (svn r11061) -Fix [FS#1086]: [win32] some keys were handled twice
glx
parents: 7454
diff changeset
   126
	WKC_PERIOD      = 152, ///< . Period
8086db74ec5b (svn r11061) -Fix [FS#1086]: [win32] some keys were handled twice
glx
parents: 7454
diff changeset
   127
	WKC_MINUS       = 153, ///< - Minus
5636
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   128
};
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   129
6247
7d81e3a5d803 (svn r9050) -Codechange: Foo(void) -> Foo()
rubidium
parents: 6231
diff changeset
   130
void GameLoop();
5636
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   131
6247
7d81e3a5d803 (svn r9050) -Codechange: Foo(void) -> Foo()
rubidium
parents: 6231
diff changeset
   132
void CreateConsole();
5636
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   133
6138
f1196498ef66 (svn r8880) -Codechange: make anim cursors an array of structs.
rubidium
parents: 5941
diff changeset
   134
/** A single sprite of a list of animated cursors */
f1196498ef66 (svn r8880) -Codechange: make anim cursors an array of structs.
rubidium
parents: 5941
diff changeset
   135
struct AnimCursor {
6146
179f7480cf6b (svn r8889) -Fix (r8880): a CursorID is not a SpriteID.
rubidium
parents: 6138
diff changeset
   136
	static const CursorID LAST = MAX_UVALUE(CursorID);
6138
f1196498ef66 (svn r8880) -Codechange: make anim cursors an array of structs.
rubidium
parents: 5941
diff changeset
   137
	CursorID sprite;   ///< Must be set to LAST_ANIM when it is the last sprite of the loop
f1196498ef66 (svn r8880) -Codechange: make anim cursors an array of structs.
rubidium
parents: 5941
diff changeset
   138
	byte display_time; ///< Amount of ticks this sprite will be shown
f1196498ef66 (svn r8880) -Codechange: make anim cursors an array of structs.
rubidium
parents: 5941
diff changeset
   139
};
5636
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   140
6248
e4a2ed7e5613 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6247
diff changeset
   141
struct CursorVars {
5636
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   142
	Point pos, size, offs, delta; ///< position, size, offset from top-left, and movement
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   143
	Point draw_pos, draw_size;    ///< position and size bounding-box for drawing
5668
36b39f4a9032 (svn r8128) -Codechange: Split sprite and palette remap into separate 32 bit values.
peter1138
parents: 5636
diff changeset
   144
	SpriteID sprite; ///< current image of cursor
36b39f4a9032 (svn r8128) -Codechange: Split sprite and palette remap into separate 32 bit values.
peter1138
parents: 5636
diff changeset
   145
	SpriteID pal;
5636
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   146
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   147
	int wheel;       ///< mouse wheel movement
6289
9f468eccc674 (svn r9111) -Feature: [OSX] mighty mice and touchpads can now scroll the map (in all directions)
bjarni
parents: 6248
diff changeset
   148
9f468eccc674 (svn r9111) -Feature: [OSX] mighty mice and touchpads can now scroll the map (in all directions)
bjarni
parents: 6248
diff changeset
   149
	/* We need two different vars to keep track of how far the scrollwheel moved.
9f468eccc674 (svn r9111) -Feature: [OSX] mighty mice and touchpads can now scroll the map (in all directions)
bjarni
parents: 6248
diff changeset
   150
	 * OSX uses this for scrolling around the map. */
9f468eccc674 (svn r9111) -Feature: [OSX] mighty mice and touchpads can now scroll the map (in all directions)
bjarni
parents: 6248
diff changeset
   151
	int v_wheel;
9f468eccc674 (svn r9111) -Feature: [OSX] mighty mice and touchpads can now scroll the map (in all directions)
bjarni
parents: 6248
diff changeset
   152
	int h_wheel;
9f468eccc674 (svn r9111) -Feature: [OSX] mighty mice and touchpads can now scroll the map (in all directions)
bjarni
parents: 6248
diff changeset
   153
6138
f1196498ef66 (svn r8880) -Codechange: make anim cursors an array of structs.
rubidium
parents: 5941
diff changeset
   154
	const AnimCursor *animate_list; ///< in case of animated cursor, list of frames
f1196498ef66 (svn r8880) -Codechange: make anim cursors an array of structs.
rubidium
parents: 5941
diff changeset
   155
	const AnimCursor *animate_cur;  ///< in case of animated cursor, current frame
f1196498ef66 (svn r8880) -Codechange: make anim cursors an array of structs.
rubidium
parents: 5941
diff changeset
   156
	uint animate_timeout;           ///< in case of animated cursor, number of ticks to show the current cursor
5636
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   157
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   158
	bool visible;    ///< cursor is visible
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   159
	bool dirty;      ///< the rect occupied by the mouse is dirty (redraw)
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   160
	bool fix_at;     ///< mouse is moving, but cursor is not (used for scrolling)
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   161
	bool in_window;  ///< mouse inside this window, determines drawing logic
6248
e4a2ed7e5613 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6247
diff changeset
   162
};
5636
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   163
6248
e4a2ed7e5613 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6247
diff changeset
   164
struct DrawPixelInfo {
6878
5cefd3ac59c7 (svn r10121) -Codechange: split renderer from rest of code; no longer any code directly accesses the video-buffer
truelight
parents: 6729
diff changeset
   165
	void *dst_ptr;
5636
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   166
	int left, top, width, height;
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   167
	int pitch;
6624
880e29b1f25e (svn r9844) -Codechange: replace zoomlevel with an enum
truelight
parents: 6377
diff changeset
   168
	ZoomLevel zoom;
6248
e4a2ed7e5613 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6247
diff changeset
   169
};
5636
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   170
6248
e4a2ed7e5613 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6247
diff changeset
   171
struct Colour {
5636
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   172
	byte r;
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   173
	byte g;
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   174
	byte b;
6248
e4a2ed7e5613 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6247
diff changeset
   175
};
5636
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   176
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   177
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   178
6179
d19b0137d8e4 (svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6146
diff changeset
   179
extern byte _dirkeys;        ///< 1 = left, 2 = up, 4 = right, 8 = down
5636
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   180
extern bool _fullscreen;
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   181
extern CursorVars _cursor;
6179
d19b0137d8e4 (svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6146
diff changeset
   182
extern bool _ctrl_pressed;   ///< Is Ctrl pressed?
d19b0137d8e4 (svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6146
diff changeset
   183
extern bool _shift_pressed;  ///< Is Shift pressed?
5636
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   184
extern byte _fast_forward;
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   185
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   186
extern bool _left_button_down;
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   187
extern bool _left_button_clicked;
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   188
extern bool _right_button_down;
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   189
extern bool _right_button_clicked;
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   190
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   191
extern DrawPixelInfo _screen;
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   192
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   193
extern int _pal_first_dirty;
6960
356d856462b6 (svn r10216) -Fix: palette animation always redid all palette entries, where in fact only a few indexes were needed
truelight
parents: 6937
diff changeset
   194
extern int _pal_count_dirty;
5636
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   195
extern int _num_resolutions;
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   196
extern uint16 _resolutions[32][2];
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   197
extern uint16 _cur_resolution[2];
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   198
extern Colour _cur_palette[256];
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   199
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   200
void HandleKeypress(uint32 key);
6247
7d81e3a5d803 (svn r9050) -Codechange: Foo(void) -> Foo()
rubidium
parents: 6231
diff changeset
   201
void HandleMouseEvents();
5636
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   202
void CSleep(int milliseconds);
6247
7d81e3a5d803 (svn r9050) -Codechange: Foo(void) -> Foo()
rubidium
parents: 6231
diff changeset
   203
void UpdateWindows();
5636
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   204
6247
7d81e3a5d803 (svn r9050) -Codechange: Foo(void) -> Foo()
rubidium
parents: 6231
diff changeset
   205
uint32 InteractiveRandom(); //< Used for random sequences that are not the same on the other end of the multiplayer link
5636
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   206
uint InteractiveRandomRange(uint max);
7454
e55eea8c05c7 (svn r10932) -Codechange: replace "text" with "chat" for the chat related function and variables.
rubidium
parents: 7318
diff changeset
   207
void DrawChatMessage();
6247
7d81e3a5d803 (svn r9050) -Codechange: Foo(void) -> Foo()
rubidium
parents: 6231
diff changeset
   208
void DrawMouseCursor();
7d81e3a5d803 (svn r9050) -Codechange: Foo(void) -> Foo()
rubidium
parents: 6231
diff changeset
   209
void ScreenSizeChanged();
7d81e3a5d803 (svn r9050) -Codechange: Foo(void) -> Foo()
rubidium
parents: 6231
diff changeset
   210
void HandleExitGameRequest();
7d81e3a5d803 (svn r9050) -Codechange: Foo(void) -> Foo()
rubidium
parents: 6231
diff changeset
   211
void GameSizeChanged();
7d81e3a5d803 (svn r9050) -Codechange: Foo(void) -> Foo()
rubidium
parents: 6231
diff changeset
   212
void UndrawMouseCursor();
5636
3c19b56dc982 (svn r8095) -Codechange: stuff that is not related to HAL moved from hal.h to gfx.h
KUDr
parents: 5587
diff changeset
   213
6248
e4a2ed7e5613 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6247
diff changeset
   214
enum FontSize {
3798
b1f5290b36b1 (svn r4802) - Codechange: replace _stringwidth_base and associated magic numbers with a FontSize enum, using the numbers (which are SpriteIDs) in only the places needed.
peter1138
parents: 3312
diff changeset
   215
	FS_NORMAL,
b1f5290b36b1 (svn r4802) - Codechange: replace _stringwidth_base and associated magic numbers with a FontSize enum, using the numbers (which are SpriteIDs) in only the places needed.
peter1138
parents: 3312
diff changeset
   216
	FS_SMALL,
b1f5290b36b1 (svn r4802) - Codechange: replace _stringwidth_base and associated magic numbers with a FontSize enum, using the numbers (which are SpriteIDs) in only the places needed.
peter1138
parents: 3312
diff changeset
   217
	FS_LARGE,
b1f5290b36b1 (svn r4802) - Codechange: replace _stringwidth_base and associated magic numbers with a FontSize enum, using the numbers (which are SpriteIDs) in only the places needed.
peter1138
parents: 3312
diff changeset
   218
	FS_END,
6248
e4a2ed7e5613 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6247
diff changeset
   219
};
5587
167d9a91ef02 (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents: 5475
diff changeset
   220
DECLARE_POSTFIX_INCREMENT(FontSize);
3798
b1f5290b36b1 (svn r4802) - Codechange: replace _stringwidth_base and associated magic numbers with a FontSize enum, using the numbers (which are SpriteIDs) in only the places needed.
peter1138
parents: 3312
diff changeset
   221
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   222
void RedrawScreenRect(int left, int top, int right, int bottom);
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   223
void GfxScroll(int left, int top, int width, int height, int xo, int yo);
2097
e95d19e1941f (svn r2607) - Feature: add support for truncating strings to a given (pixel) length. Function courtesy of Ludde.
Darkvater
parents: 2062
diff changeset
   224
7681
582e8912e8d1 (svn r11212) -Codechange: add support for drawing parts of sprites. Patch by frosch.
rubidium
parents: 7643
diff changeset
   225
/**
582e8912e8d1 (svn r11212) -Codechange: add support for drawing parts of sprites. Patch by frosch.
rubidium
parents: 7643
diff changeset
   226
 * Used to only draw a part of the sprite.
582e8912e8d1 (svn r11212) -Codechange: add support for drawing parts of sprites. Patch by frosch.
rubidium
parents: 7643
diff changeset
   227
 * Draw the subsprite in the rect (sprite_x_offset + left, sprite_y_offset + top) to (sprite_x_offset + right, sprite_y_offset + bottom).
582e8912e8d1 (svn r11212) -Codechange: add support for drawing parts of sprites. Patch by frosch.
rubidium
parents: 7643
diff changeset
   228
 * Both corners are included in the drawing area.
582e8912e8d1 (svn r11212) -Codechange: add support for drawing parts of sprites. Patch by frosch.
rubidium
parents: 7643
diff changeset
   229
 */
582e8912e8d1 (svn r11212) -Codechange: add support for drawing parts of sprites. Patch by frosch.
rubidium
parents: 7643
diff changeset
   230
struct SubSprite {
582e8912e8d1 (svn r11212) -Codechange: add support for drawing parts of sprites. Patch by frosch.
rubidium
parents: 7643
diff changeset
   231
	int left, top, right, bottom;
582e8912e8d1 (svn r11212) -Codechange: add support for drawing parts of sprites. Patch by frosch.
rubidium
parents: 7643
diff changeset
   232
};
582e8912e8d1 (svn r11212) -Codechange: add support for drawing parts of sprites. Patch by frosch.
rubidium
parents: 7643
diff changeset
   233
582e8912e8d1 (svn r11212) -Codechange: add support for drawing parts of sprites. Patch by frosch.
rubidium
parents: 7643
diff changeset
   234
void DrawSprite(SpriteID img, SpriteID pal, int x, int y, const SubSprite *sub = NULL);
2406
8c873205483a (svn r2932) Give the strings consisting of an up/a down arrow symbolic names
tron
parents: 2187
diff changeset
   235
6179
d19b0137d8e4 (svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6146
diff changeset
   236
/* XXX doesn't really belong here, but the only
d19b0137d8e4 (svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6146
diff changeset
   237
 * consumers always use it in conjunction with DoDrawString() */
5108
aeaef6fe53b7 (svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents: 4954
diff changeset
   238
#define UPARROW   "\xEE\x8A\x80"
aeaef6fe53b7 (svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents: 4954
diff changeset
   239
#define DOWNARROW "\xEE\x8A\xAA"
2406
8c873205483a (svn r2932) Give the strings consisting of an up/a down arrow symbolic names
tron
parents: 2187
diff changeset
   240
8c873205483a (svn r2932) Give the strings consisting of an up/a down arrow symbolic names
tron
parents: 2187
diff changeset
   241
2097
e95d19e1941f (svn r2607) - Feature: add support for truncating strings to a given (pixel) length. Function courtesy of Ludde.
Darkvater
parents: 2062
diff changeset
   242
int DrawStringCentered(int x, int y, StringID str, uint16 color);
2113
be2f07df0dfa (svn r2623) - CodeChange: rework DrawStringCenteredTruncated() a bit. Instead of giving center + width you give the coordinates of the bounding box (left, right) it has to fit in (ludde)
Darkvater
parents: 2097
diff changeset
   243
int DrawStringCenteredTruncated(int xl, int xr, int y, StringID str, uint16 color);
2134
50fafe90c9f0 (svn r2644) - Fix: my name was mistyped ;p
Darkvater
parents: 2113
diff changeset
   244
int DoDrawStringCentered(int x, int y, const char *str, uint16 color);
2097
e95d19e1941f (svn r2607) - Feature: add support for truncating strings to a given (pixel) length. Function courtesy of Ludde.
Darkvater
parents: 2062
diff changeset
   245
e95d19e1941f (svn r2607) - Feature: add support for truncating strings to a given (pixel) length. Function courtesy of Ludde.
Darkvater
parents: 2062
diff changeset
   246
int DrawString(int x, int y, StringID str, uint16 color);
e95d19e1941f (svn r2607) - Feature: add support for truncating strings to a given (pixel) length. Function courtesy of Ludde.
Darkvater
parents: 2062
diff changeset
   247
int DrawStringTruncated(int x, int y, StringID str, uint16 color, uint maxw);
e95d19e1941f (svn r2607) - Feature: add support for truncating strings to a given (pixel) length. Function courtesy of Ludde.
Darkvater
parents: 2062
diff changeset
   248
1323
bac2e38e8b60 (svn r1827) Next iteration of the byte -> char transition: some string drawing functions and buffers
tron
parents: 1093
diff changeset
   249
int DoDrawString(const char *string, int x, int y, uint16 color);
2097
e95d19e1941f (svn r2607) - Feature: add support for truncating strings to a given (pixel) length. Function courtesy of Ludde.
Darkvater
parents: 2062
diff changeset
   250
int DoDrawStringTruncated(const char *str, int x, int y, uint16 color, uint maxw);
e95d19e1941f (svn r2607) - Feature: add support for truncating strings to a given (pixel) length. Function courtesy of Ludde.
Darkvater
parents: 2062
diff changeset
   251
e95d19e1941f (svn r2607) - Feature: add support for truncating strings to a given (pixel) length. Function courtesy of Ludde.
Darkvater
parents: 2062
diff changeset
   252
void DrawStringCenterUnderline(int x, int y, StringID str, uint16 color);
2113
be2f07df0dfa (svn r2623) - CodeChange: rework DrawStringCenteredTruncated() a bit. Instead of giving center + width you give the coordinates of the bounding box (left, right) it has to fit in (ludde)
Darkvater
parents: 2097
diff changeset
   253
void DrawStringCenterUnderlineTruncated(int xl, int xr, int y, StringID str, uint16 color);
2097
e95d19e1941f (svn r2607) - Feature: add support for truncating strings to a given (pixel) length. Function courtesy of Ludde.
Darkvater
parents: 2062
diff changeset
   254
4314
5c816195d9d4 (svn r5967) -Change: use right alignment for the year in the player's balance window instead of centering (about) 'string width' / 2 from the right edge
rubidium
parents: 3798
diff changeset
   255
int DrawStringRightAligned(int x, int y, StringID str, uint16 color);
2097
e95d19e1941f (svn r2607) - Feature: add support for truncating strings to a given (pixel) length. Function courtesy of Ludde.
Darkvater
parents: 2062
diff changeset
   256
void DrawStringRightAlignedTruncated(int x, int y, StringID str, uint16 color, uint maxw);
4314
5c816195d9d4 (svn r5967) -Change: use right alignment for the year in the player's balance window instead of centering (about) 'string width' / 2 from the right edge
rubidium
parents: 3798
diff changeset
   257
void DrawStringRightAlignedUnderline(int x, int y, StringID str, uint16 color);
2097
e95d19e1941f (svn r2607) - Feature: add support for truncating strings to a given (pixel) length. Function courtesy of Ludde.
Darkvater
parents: 2062
diff changeset
   258
193
0a7025304867 (svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents: 0
diff changeset
   259
void GfxFillRect(int left, int top, int right, int bottom, int color);
0a7025304867 (svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents: 0
diff changeset
   260
void GfxDrawLine(int left, int top, int right, int bottom, int color);
7643
af32b07bc027 (svn r11174) -Codechange: add possibility to show the bounding boxes of sprites using CTRL-B so one can get a better understanding of the used bounding boxes to fix the glitches that still exist. Patch by frosch.
rubidium
parents: 7545
diff changeset
   261
void DrawBox(int x, int y, int dx1, int dy1, int dx2, int dy2, int dx3, int dy3);
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   262
8121
3bc6351e7369 (svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents: 8113
diff changeset
   263
Dimension GetStringBoundingBox(const char *str);
4954
c1f059faa899 (svn r6953) -Codechange: Change FormatStringLinebreaks in such a way that if no whitespace was seen
Darkvater
parents: 4928
diff changeset
   264
uint32 FormatStringLinebreaks(char *str, int maxw);
6247
7d81e3a5d803 (svn r9050) -Codechange: Foo(void) -> Foo()
rubidium
parents: 6231
diff changeset
   265
void LoadStringWidthTable();
2634
0df9396b0067 (svn r3176) Use proper types, not some variants of int
tron
parents: 2548
diff changeset
   266
void DrawStringMultiCenter(int x, int y, StringID str, int maxw);
6377
c1bc323eaf0c (svn r9449) -Fix: Truncate the newgrf information text in the newgrf gui if it's too long.
maedhros
parents: 6289
diff changeset
   267
uint DrawStringMultiLine(int x, int y, StringID str, int maxw, int maxh = -1);
7545
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
   268
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
   269
/**
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
   270
 * Let the dirty blocks repainting by the video driver.
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
   271
 *
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
   272
 * @ingroup dirty
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
   273
 */
6247
7d81e3a5d803 (svn r9050) -Codechange: Foo(void) -> Foo()
rubidium
parents: 6231
diff changeset
   274
void DrawDirtyBlocks();
7545
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
   275
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
   276
/**
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
   277
 * Set a new dirty block.
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
   278
 *
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
   279
 * @ingroup dirty
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
   280
 */
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   281
void SetDirtyBlocks(int left, int top, int right, int bottom);
7545
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
   282
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
   283
/**
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
   284
 * Marks the whole screen as dirty.
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
   285
 *
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
   286
 * @ingroup dirty
d44e19c5671e (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman.
rubidium
parents: 7541
diff changeset
   287
 */
6247
7d81e3a5d803 (svn r9050) -Codechange: Foo(void) -> Foo()
rubidium
parents: 6231
diff changeset
   288
void MarkWholeScreenDirty();
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   289
6247
7d81e3a5d803 (svn r9050) -Codechange: Foo(void) -> Foo()
rubidium
parents: 6231
diff changeset
   290
void GfxInitPalettes();
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   291
4429
b4eb6d97996f (svn r6184) Remove the unused (because it was NULL in all callers) second parameter of FillDrawPixelInfo() and simplify some expressions
tron
parents: 4428
diff changeset
   292
bool FillDrawPixelInfo(DrawPixelInfo* n, int left, int top, int width, int height);
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   293
6179
d19b0137d8e4 (svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6146
diff changeset
   294
/* window.cpp */
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   295
void DrawOverlappedWindowForAll(int left, int top, int right, int bottom);
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   296
5668
36b39f4a9032 (svn r8128) -Codechange: Split sprite and palette remap into separate 32 bit values.
peter1138
parents: 5636
diff changeset
   297
void SetMouseCursor(SpriteID sprite, SpriteID pal);
6138
f1196498ef66 (svn r8880) -Codechange: make anim cursors an array of structs.
rubidium
parents: 5941
diff changeset
   298
void SetAnimatedMouseCursor(const AnimCursor *table);
6247
7d81e3a5d803 (svn r9050) -Codechange: Foo(void) -> Foo()
rubidium
parents: 6231
diff changeset
   299
void CursorTick();
7d81e3a5d803 (svn r9050) -Codechange: Foo(void) -> Foo()
rubidium
parents: 6231
diff changeset
   300
void DrawMouseCursor();
7d81e3a5d803 (svn r9050) -Codechange: Foo(void) -> Foo()
rubidium
parents: 6231
diff changeset
   301
void ScreenSizeChanged();
7d81e3a5d803 (svn r9050) -Codechange: Foo(void) -> Foo()
rubidium
parents: 6231
diff changeset
   302
void UndrawMouseCursor();
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   303
bool ChangeResInGame(int w, int h);
1806
5a55d508c23e (svn r2310) - Fix: Game would crash if you full-screened with the 'fullscreen' button than chose a resolution from the dropdown box that was no longer valid. Big thanks to DaleStan for track down the crashing bug.
Darkvater
parents: 1391
diff changeset
   304
void SortResolutions(int count);
5941
adaea39e84ab (svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents: 5668
diff changeset
   305
void ToggleFullScreen(bool fs);
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   306
6179
d19b0137d8e4 (svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6146
diff changeset
   307
/* gfx.cpp */
1390
e7cdf3ce0fb6 (svn r1894) - Codechange: cleaned up the console a bit, wholly unified handling of text with that of editboxes
Darkvater
parents: 1350
diff changeset
   308
#define ASCII_LETTERSTART 32
3798
b1f5290b36b1 (svn r4802) - Codechange: replace _stringwidth_base and associated magic numbers with a FontSize enum, using the numbers (which are SpriteIDs) in only the places needed.
peter1138
parents: 3312
diff changeset
   309
extern FontSize _cur_fontsize;
b1f5290b36b1 (svn r4802) - Codechange: replace _stringwidth_base and associated magic numbers with a FontSize enum, using the numbers (which are SpriteIDs) in only the places needed.
peter1138
parents: 3312
diff changeset
   310
5108
aeaef6fe53b7 (svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents: 4954
diff changeset
   311
byte GetCharacterWidth(FontSize size, uint32 key);
3798
b1f5290b36b1 (svn r4802) - Codechange: replace _stringwidth_base and associated magic numbers with a FontSize enum, using the numbers (which are SpriteIDs) in only the places needed.
peter1138
parents: 3312
diff changeset
   312
b1f5290b36b1 (svn r4802) - Codechange: replace _stringwidth_base and associated magic numbers with a FontSize enum, using the numbers (which are SpriteIDs) in only the places needed.
peter1138
parents: 3312
diff changeset
   313
static inline byte GetCharacterHeight(FontSize size)
b1f5290b36b1 (svn r4802) - Codechange: replace _stringwidth_base and associated magic numbers with a FontSize enum, using the numbers (which are SpriteIDs) in only the places needed.
peter1138
parents: 3312
diff changeset
   314
{
b1f5290b36b1 (svn r4802) - Codechange: replace _stringwidth_base and associated magic numbers with a FontSize enum, using the numbers (which are SpriteIDs) in only the places needed.
peter1138
parents: 3312
diff changeset
   315
	switch (size) {
b1f5290b36b1 (svn r4802) - Codechange: replace _stringwidth_base and associated magic numbers with a FontSize enum, using the numbers (which are SpriteIDs) in only the places needed.
peter1138
parents: 3312
diff changeset
   316
		default: NOT_REACHED();
b1f5290b36b1 (svn r4802) - Codechange: replace _stringwidth_base and associated magic numbers with a FontSize enum, using the numbers (which are SpriteIDs) in only the places needed.
peter1138
parents: 3312
diff changeset
   317
		case FS_NORMAL: return 10;
b1f5290b36b1 (svn r4802) - Codechange: replace _stringwidth_base and associated magic numbers with a FontSize enum, using the numbers (which are SpriteIDs) in only the places needed.
peter1138
parents: 3312
diff changeset
   318
		case FS_SMALL:  return 6;
b1f5290b36b1 (svn r4802) - Codechange: replace _stringwidth_base and associated magic numbers with a FontSize enum, using the numbers (which are SpriteIDs) in only the places needed.
peter1138
parents: 3312
diff changeset
   319
		case FS_LARGE:  return 18;
b1f5290b36b1 (svn r4802) - Codechange: replace _stringwidth_base and associated magic numbers with a FontSize enum, using the numbers (which are SpriteIDs) in only the places needed.
peter1138
parents: 3312
diff changeset
   320
	}
1391
929b46b9e3cc (svn r1895) - Fix: add assert for charwidth getter just in case
Darkvater
parents: 1390
diff changeset
   321
}
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   322
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   323
VARDEF DrawPixelInfo *_cur_dpi;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   324
4444
8d40844e6755 (svn r6222) Remove struct ColorList, because the names of its attributes are plain confusing
tron
parents: 4437
diff changeset
   325
enum {
8d40844e6755 (svn r6222) Remove struct ColorList, because the names of its attributes are plain confusing
tron
parents: 4437
diff changeset
   326
	COLOUR_DARK_BLUE,
8d40844e6755 (svn r6222) Remove struct ColorList, because the names of its attributes are plain confusing
tron
parents: 4437
diff changeset
   327
	COLOUR_PALE_GREEN,
8d40844e6755 (svn r6222) Remove struct ColorList, because the names of its attributes are plain confusing
tron
parents: 4437
diff changeset
   328
	COLOUR_PINK,
8d40844e6755 (svn r6222) Remove struct ColorList, because the names of its attributes are plain confusing
tron
parents: 4437
diff changeset
   329
	COLOUR_YELLOW,
8d40844e6755 (svn r6222) Remove struct ColorList, because the names of its attributes are plain confusing
tron
parents: 4437
diff changeset
   330
	COLOUR_RED,
8d40844e6755 (svn r6222) Remove struct ColorList, because the names of its attributes are plain confusing
tron
parents: 4437
diff changeset
   331
	COLOUR_LIGHT_BLUE,
8d40844e6755 (svn r6222) Remove struct ColorList, because the names of its attributes are plain confusing
tron
parents: 4437
diff changeset
   332
	COLOUR_GREEN,
8d40844e6755 (svn r6222) Remove struct ColorList, because the names of its attributes are plain confusing
tron
parents: 4437
diff changeset
   333
	COLOUR_DARK_GREEN,
8d40844e6755 (svn r6222) Remove struct ColorList, because the names of its attributes are plain confusing
tron
parents: 4437
diff changeset
   334
	COLOUR_BLUE,
8d40844e6755 (svn r6222) Remove struct ColorList, because the names of its attributes are plain confusing
tron
parents: 4437
diff changeset
   335
	COLOUR_CREAM,
8d40844e6755 (svn r6222) Remove struct ColorList, because the names of its attributes are plain confusing
tron
parents: 4437
diff changeset
   336
	COLOUR_MAUVE,
8d40844e6755 (svn r6222) Remove struct ColorList, because the names of its attributes are plain confusing
tron
parents: 4437
diff changeset
   337
	COLOUR_PURPLE,
8d40844e6755 (svn r6222) Remove struct ColorList, because the names of its attributes are plain confusing
tron
parents: 4437
diff changeset
   338
	COLOUR_ORANGE,
8d40844e6755 (svn r6222) Remove struct ColorList, because the names of its attributes are plain confusing
tron
parents: 4437
diff changeset
   339
	COLOUR_BROWN,
8d40844e6755 (svn r6222) Remove struct ColorList, because the names of its attributes are plain confusing
tron
parents: 4437
diff changeset
   340
	COLOUR_GREY,
8d40844e6755 (svn r6222) Remove struct ColorList, because the names of its attributes are plain confusing
tron
parents: 4437
diff changeset
   341
	COLOUR_WHITE
8d40844e6755 (svn r6222) Remove struct ColorList, because the names of its attributes are plain confusing
tron
parents: 4437
diff changeset
   342
};
8d40844e6755 (svn r6222) Remove struct ColorList, because the names of its attributes are plain confusing
tron
parents: 4437
diff changeset
   343
7824
5a63d41b59ea (svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
belugas
parents: 7681
diff changeset
   344
/** Colour of the strings, see _string_colormap in table/palettes.h or docs/ottd-colourtext-palette.png */
5a63d41b59ea (svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
belugas
parents: 7681
diff changeset
   345
enum TextColour {
5a63d41b59ea (svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
belugas
parents: 7681
diff changeset
   346
	TC_FROMSTRING  = 0x00,
5a63d41b59ea (svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
belugas
parents: 7681
diff changeset
   347
	TC_BLUE        = 0x00,
5a63d41b59ea (svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
belugas
parents: 7681
diff changeset
   348
	TC_SILVER      = 0x01,
5a63d41b59ea (svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
belugas
parents: 7681
diff changeset
   349
	TC_GOLD        = 0x02,
5a63d41b59ea (svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
belugas
parents: 7681
diff changeset
   350
	TC_RED         = 0x03,
5a63d41b59ea (svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
belugas
parents: 7681
diff changeset
   351
	TC_PURPLE      = 0x04,
5a63d41b59ea (svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
belugas
parents: 7681
diff changeset
   352
	TC_LIGHT_BROWN = 0x05,
5a63d41b59ea (svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
belugas
parents: 7681
diff changeset
   353
	TC_ORANGE      = 0x06,
5a63d41b59ea (svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
belugas
parents: 7681
diff changeset
   354
	TC_GREEN       = 0x07,
5a63d41b59ea (svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
belugas
parents: 7681
diff changeset
   355
	TC_YELLOW      = 0x08,
5a63d41b59ea (svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
belugas
parents: 7681
diff changeset
   356
	TC_DARK_GREEN  = 0x09,
5a63d41b59ea (svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
belugas
parents: 7681
diff changeset
   357
	TC_CREAM       = 0x0A,
5a63d41b59ea (svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
belugas
parents: 7681
diff changeset
   358
	TC_BROWN       = 0x0B,
5a63d41b59ea (svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
belugas
parents: 7681
diff changeset
   359
	TC_WHITE       = 0x0C,
5a63d41b59ea (svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
belugas
parents: 7681
diff changeset
   360
	TC_LIGHT_BLUE  = 0x0D,
5a63d41b59ea (svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
belugas
parents: 7681
diff changeset
   361
	TC_GREY        = 0x0E,
5a63d41b59ea (svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
belugas
parents: 7681
diff changeset
   362
	TC_DARK_BLUE   = 0x0F,
5a63d41b59ea (svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
belugas
parents: 7681
diff changeset
   363
	TC_BLACK       = 0x10,
5a63d41b59ea (svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
belugas
parents: 7681
diff changeset
   364
};
5a63d41b59ea (svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
belugas
parents: 7681
diff changeset
   365
4444
8d40844e6755 (svn r6222) Remove struct ColorList, because the names of its attributes are plain confusing
tron
parents: 4437
diff changeset
   366
/**
8d40844e6755 (svn r6222) Remove struct ColorList, because the names of its attributes are plain confusing
tron
parents: 4437
diff changeset
   367
 * All 16 colour gradients
8d40844e6755 (svn r6222) Remove struct ColorList, because the names of its attributes are plain confusing
tron
parents: 4437
diff changeset
   368
 * 8 colours per gradient from darkest (0) to lightest (7)
8d40844e6755 (svn r6222) Remove struct ColorList, because the names of its attributes are plain confusing
tron
parents: 4437
diff changeset
   369
 */
8d40844e6755 (svn r6222) Remove struct ColorList, because the names of its attributes are plain confusing
tron
parents: 4437
diff changeset
   370
VARDEF byte _colour_gradient[16][8];
8d40844e6755 (svn r6222) Remove struct ColorList, because the names of its attributes are plain confusing
tron
parents: 4437
diff changeset
   371
614
b96f987dbf80 (svn r1038) Feature: OpenTTD runs with the grf files of the DOS version
dominik
parents: 543
diff changeset
   372
VARDEF bool _use_dos_palette;
b96f987dbf80 (svn r1038) Feature: OpenTTD runs with the grf files of the DOS version
dominik
parents: 543
diff changeset
   373
6248
e4a2ed7e5613 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6247
diff changeset
   374
enum StringColorFlags {
6179
d19b0137d8e4 (svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 6146
diff changeset
   375
	IS_PALETTE_COLOR = 0x100, ///< color value is already a real palette color index, not an index of a StringColor
6248
e4a2ed7e5613 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6247
diff changeset
   376
};
657
d4d36b4853ec (svn r1091) Fix: Finally station names use 100% the correct color in transparent mode
dominik
parents: 614
diff changeset
   377
2436
7d5df545bd5d (svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
Darkvater
parents: 2407
diff changeset
   378
#endif /* GFX_H */