This file is indexed.

/usr/share/doc/allegro4-doc/html/alleg045.html is in allegro4-doc 2:4.4.2-5.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><head><title>
Allegro Manual: Available Allegro examples
</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="stylesheet" title="Default" type="text/css" href="allegro.css"></head><body bgcolor=white text=black link="#0000ee" alink="#ff0000" vlink="#551a8b">
<h1><a name="Available Allegro examples">Available Allegro examples</a></h1>

<ul>
<li><a href="#ex12bit">ex12bit</a> &mdash; How to fake a 12-bit truecolor mode on an 8-bit card.
<li><a href="#ex3buf">ex3buf</a> &mdash; Mode-X triple buffering and retrace interrupt simulation.
<li><a href="#ex3d">ex3d</a> &mdash; 3d 'bouncy cubes' demo.
<li><a href="#exaccel">exaccel</a> &mdash; Using offscreen video memory to store source graphics for VBE/AF.
<li><a href="#exalpha">exalpha</a> &mdash; Creating and using 32 bit RGBA sprites.
<li><a href="#exbitmap">exbitmap</a> &mdash; Loading and displaying PCX and BMP files.
<li><a href="#exblend">exblend</a> &mdash; Using translucency in truecolor modes.
<li><a href="#excamera">excamera</a> &mdash; Viewing a 3d world from an arbitrary camera position.
<li><a href="#excolmap">excolmap</a> &mdash; Creating graphical effects with color mapping tables.
<li><a href="#exconfig">exconfig</a> &mdash; Using the configuration routines.
<li><a href="#excustom">excustom</a> &mdash; Creating custom GUI objects.
<li><a href="#exdata">exdata</a> &mdash; Accessing the contents of datafiles.
<li><a href="#exdbuf">exdbuf</a> &mdash; How to use double buffering to avoid flicker.
<li><a href="#exexedat">exexedat</a> &mdash; Appending datafiles onto your executable.
<li><a href="#exfixed">exfixed</a> &mdash; Using fixed point maths.
<li><a href="#exflame">exflame</a> &mdash; How to write directly to video memory improving performance.
<li><a href="#exflip">exflip</a> &mdash; Comparison of double buffering and page flipping.
<li><a href="#exfont">exfont</a> &mdash; Loading and manipulating fonts.
<li><a href="#exgui">exgui</a> &mdash; Using the GUI routines.
<li><a href="#exhello">exhello</a> &mdash; Simple graphical "hello world" program.
<li><a href="#exjoy">exjoy</a> &mdash; Detecting, calibrating and using joystick input.
<li><a href="#exkeys">exkeys</a> &mdash; How to get input from the keyboard in different ways.
<li><a href="#exlights">exlights</a> &mdash; One way to do colored lighting effects in a hicolor video mode.
<li><a href="#exmem">exmem</a> &mdash; Drawing onto memory bitmaps and then blitting them to the screen.
<li><a href="#exmidi">exmidi</a> &mdash; Playing MIDI music.
<li><a href="#exmouse">exmouse</a> &mdash; Getting input from the mouse.
<li><a href="#expackf">expackf</a> &mdash; Using custom PACKFILE vtables.
<li><a href="#expal">expal</a> &mdash; Palette effects and color cycling.
<li><a href="#expat">expat</a> &mdash; Using patterned drawing modes and sub-bitmaps.
<li><a href="#exquat">exquat</a> &mdash; A comparison between Euler angles and quaternions.
<li><a href="#exrgbhsv">exrgbhsv</a> &mdash; RGB <-> HSV color space conversions.
<li><a href="#exrotscl">exrotscl</a> &mdash; Demonstrates rotate_scaled_sprite functions.
<li><a href="#exsample">exsample</a> &mdash; Playing digital samples.
<li><a href="#exscale">exscale</a> &mdash; Loading PCX files and bitmap stretching.
<li><a href="#exscn3d">exscn3d</a> &mdash; Using the 3d scene functions.
<li><a href="#exscroll">exscroll</a> &mdash; Mode-X hardware scrolling and split screens.
<li><a href="#exshade">exshade</a> &mdash; Gouraud shaded sprites.
<li><a href="#exspline">exspline</a> &mdash; Constructing smooth movement paths from spline curves.
<li><a href="#exsprite">exsprite</a> &mdash; Datafiles access and sprite animation.
<li><a href="#exstars">exstars</a> &mdash; 3d starfield and lightsourced spaceship.
<li><a href="#exstream">exstream</a> &mdash; Playing audio streams.
<li><a href="#exswitch">exswitch</a> &mdash; Controlling the console switch mode for background running.
<li><a href="#exsyscur">exsyscur</a> &mdash; Hardware accelerated mouse cursors.
<li><a href="#extimer">extimer</a> &mdash; Using the timer (delays and interrupts).
<li><a href="#extrans">extrans</a> &mdash; Lighting and translucency effects.
<li><a href="#extrans2">extrans2</a> &mdash; Drawing flipped, translucent and tinted sprites.
<li><a href="#extruec">extruec</a> &mdash; Truecolor pixel format conversions.
<li><a href="#exunicod">exunicod</a> &mdash; Using Unicode string functions.
<li><a href="#exupdate">exupdate</a> &mdash; Supporting different screen update methods in a single program.
<li><a href="#exxfade">exxfade</a> &mdash; Truecolor image loading and fades.
<li><a href="#exzbuf">exzbuf</a> &mdash; Z-buffered polygons demo.
</ul>

<p>
With Allegro comes quite a bunch of examples, which go from the simple
introductory `Hello world' to more complicated programs featuring truecolor
blending effects. This chapter describes these examples which you can find
in the allegro/examples folder. You don't have to go through them in the same
order as this documentation, but doing so you will learn the basic functions
and avoid missing any important bit of information.

<p><br>
<div class="al-api"><b>Example <a name="exhello">exhello</a></b></div><br>
   This is a very simple program showing how to get into graphics
   mode and draw text onto the screen.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg009.html#acquire_screen" title="Shortcut of acquire_bitmap(screen);">acquire_screen</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg013.html#clear_to_color" title="Clears the bitmap to the specified color.">clear_to_color</a>,
<a class="xref" href="alleg011.html#desktop_palette" title="The palette used by the Atari ST low resolution desktop.">desktop_palette</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg006.html#key" title="Array of flags indicating key state.">key</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg006.html#readkey" title="Returns the next character from the keyboard buffer.">readkey</a>,
<a class="xref" href="alleg009.html#release_screen" title="Shortcut of release_bitmap(screen);">release_screen</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg018.html#textout_centre_ex" title="Writes a centered string on a bitmap.">textout_centre_ex</a>.</blockquote>
<div class="al-api"><b>Example <a name="exmem">exmem</a></b></div><br>
   This program demonstrates the use of memory bitmaps. It creates
   a small temporary bitmap in memory, draws some circles onto it,
   and then blits lots of copies of it onto the screen.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg009.html#acquire_screen" title="Shortcut of acquire_bitmap(screen);">acquire_screen</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg013.html#circle" title="Draws a circle.">circle</a>,
<a class="xref" href="alleg013.html#clear_bitmap" title="Clears the bitmap to color 0.">clear_bitmap</a>,
<a class="xref" href="alleg009.html#create_bitmap" title="Creates a memory bitmap.">create_bitmap</a>,
<a class="xref" href="alleg011.html#desktop_palette" title="The palette used by the Atari ST low resolution desktop.">desktop_palette</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg012.html#palette_color" title="Maps palette indexes into the current pixel format colors.">palette_color</a>,
<a class="xref" href="alleg006.html#readkey" title="Returns the next character from the keyboard buffer.">readkey</a>,
<a class="xref" href="alleg009.html#release_screen" title="Shortcut of release_bitmap(screen);">release_screen</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>.</blockquote>
<div class="al-api"><b>Example <a name="expal">expal</a></b></div><br>
   This program demonstrates how to manipulate the palette. It draws
   a set of concentric circles onto the screen and animates them by
   cycling the palette.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg001.html#PALETTE" title="Stores palette information.">PALETTE</a>,
<a class="xref" href="alleg001.html#RGB" title="Single palette entry.">RGB</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg009.html#acquire_screen" title="Shortcut of acquire_bitmap(screen);">acquire_screen</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg011.html#black_palette" title="A palette containing solid black colors.">black_palette</a>,
<a class="xref" href="alleg013.html#circlefill" title="Draws a filled circle.">circlefill</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg004.html#install_mouse" title="Installs the Allegro mouse handler.">install_mouse</a>,
<a class="xref" href="alleg006.html#keypressed" title="Tells if there are keypresses waiting in the input buffer.">keypressed</a>,
<a class="xref" href="alleg009.html#release_screen" title="Shortcut of release_bitmap(screen);">release_screen</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg004.html#show_mouse" title="Tells Allegro to display a mouse pointer on the screen.">show_mouse</a>.</blockquote>
<div class="al-api"><b>Example <a name="expat">expat</a></b></div><br>
   This program demonstrates the use of patterned drawing and sub-bitmaps.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg009.html#acquire_bitmap" title="Locks the bitmap before drawing onto it.">acquire_bitmap</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg009.html#bitmap_mask_color" title="Returns the mask color of the specified bitmap.">bitmap_mask_color</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg013.html#clear_to_color" title="Clears the bitmap to the specified color.">clear_to_color</a>,
<a class="xref" href="alleg009.html#create_bitmap" title="Creates a memory bitmap.">create_bitmap</a>,
<a class="xref" href="alleg009.html#create_sub_bitmap" title="Creates a memory sub bitmap.">create_sub_bitmap</a>,
<a class="xref" href="alleg011.html#desktop_palette" title="The palette used by the Atari ST low resolution desktop.">desktop_palette</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg020.html#drawing_mode" title="Sets the graphics drawing mode.">drawing_mode</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg014.html#masked_blit" title="Copies a rectangle skipping pixels with the mask color.">masked_blit</a>,
<a class="xref" href="alleg012.html#palette_color" title="Maps palette indexes into the current pixel format colors.">palette_color</a>,
<a class="xref" href="alleg006.html#readkey" title="Returns the next character from the keyboard buffer.">readkey</a>,
<a class="xref" href="alleg013.html#rectfill" title="Draws a solid filled rectangle.">rectfill</a>,
<a class="xref" href="alleg009.html#release_bitmap" title="Releases a previously locked bitmap.">release_bitmap</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg020.html#solid_mode" title="Shortcut for selecting solid drawing mode.">solid_mode</a>,
<a class="xref" href="alleg018.html#text_height" title="Returns the height of a font in pixels.">text_height</a>,
<a class="xref" href="alleg018.html#text_length" title="Returns the length of a string in pixels.">text_length</a>,
<a class="xref" href="alleg018.html#textout_ex" title="Writes a string on a bitmap.">textout_ex</a>.</blockquote>
<div class="al-api"><b>Example <a name="exflame">exflame</a></b></div><br>
   This program demonstrates how to write directly to video memory.
   It implements a simple fire effect, first by calling getpixel() and
   putpixel(), then by accessing video memory directly a byte at a
   time, and finally using block memory copy operations.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg001.html#PALETTE" title="Stores palette information.">PALETTE</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg009.html#acquire_screen" title="Shortcut of acquire_bitmap(screen);">acquire_screen</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg022.html#bmp_read_line" title="Direct access bank switching line selection for reading.">bmp_read_line</a>,
<a class="xref" href="alleg022.html#bmp_unwrite_line" title="Direct access bank switching line release.">bmp_unwrite_line</a>,
<a class="xref" href="alleg022.html#bmp_write_line" title="Direct access bank switching line selection for writing.">bmp_write_line</a>,
<a class="xref" href="alleg006.html#clear_keybuf" title="Clears the keyboard buffer.">clear_keybuf</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg013.html#getpixel" title="Reads a pixel from a bitmap.">getpixel</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg006.html#keypressed" title="Tells if there are keypresses waiting in the input buffer.">keypressed</a>,
<a class="xref" href="alleg013.html#line" title="Draws a line onto the bitmap.">line</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg013.html#putpixel" title="Writes a pixel into a bitmap.">putpixel</a>,
<a class="xref" href="alleg009.html#release_screen" title="Shortcut of release_bitmap(screen);">release_screen</a>,
<a class="xref" href="alleg005.html#rest" title="Waits a specified number of milliseconds or yields CPU.">rest</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg018.html#textout_ex" title="Writes a string on a bitmap.">textout_ex</a>.</blockquote>
<div class="al-api"><b>Example <a name="exdbuf">exdbuf</a></b></div><br>
   This program demonstrates the use of double buffering.
   It moves a circle across the screen, first just erasing and
   redrawing directly to the screen, then with a double buffer.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg009.html#acquire_screen" title="Shortcut of acquire_bitmap(screen);">acquire_screen</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg013.html#circlefill" title="Draws a filled circle.">circlefill</a>,
<a class="xref" href="alleg006.html#clear_keybuf" title="Clears the keyboard buffer.">clear_keybuf</a>,
<a class="xref" href="alleg013.html#clear_to_color" title="Clears the bitmap to the specified color.">clear_to_color</a>,
<a class="xref" href="alleg009.html#create_bitmap" title="Creates a memory bitmap.">create_bitmap</a>,
<a class="xref" href="alleg011.html#desktop_palette" title="The palette used by the Atari ST low resolution desktop.">desktop_palette</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg005.html#install_timer" title="Installs the Allegro timer interrupt handler.">install_timer</a>,
<a class="xref" href="alleg006.html#keypressed" title="Tells if there are keypresses waiting in the input buffer.">keypressed</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg009.html#release_screen" title="Shortcut of release_bitmap(screen);">release_screen</a>,
<a class="xref" href="alleg005.html#retrace_count" title="Retrace count simulator.">retrace_count</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg018.html#textprintf_ex" title="Formatted output of a string.">textprintf_ex</a>.</blockquote>
<div class="al-api"><b>Example <a name="exflip">exflip</a></b></div><br>
   This program moves a circle across the screen, first with a
   double buffer and then using page flips.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg013.html#circlefill" title="Draws a filled circle.">circlefill</a>,
<a class="xref" href="alleg006.html#clear_keybuf" title="Clears the keyboard buffer.">clear_keybuf</a>,
<a class="xref" href="alleg013.html#clear_to_color" title="Clears the bitmap to the specified color.">clear_to_color</a>,
<a class="xref" href="alleg009.html#create_bitmap" title="Creates a memory bitmap.">create_bitmap</a>,
<a class="xref" href="alleg009.html#create_video_bitmap" title="Creates a video memory bitmap.">create_video_bitmap</a>,
<a class="xref" href="alleg011.html#desktop_palette" title="The palette used by the Atari ST low resolution desktop.">desktop_palette</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg005.html#install_timer" title="Installs the Allegro timer interrupt handler.">install_timer</a>,
<a class="xref" href="alleg006.html#keypressed" title="Tells if there are keypresses waiting in the input buffer.">keypressed</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg005.html#retrace_count" title="Retrace count simulator.">retrace_count</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg008.html#show_video_bitmap" title="Flips the hardware screen to use the specified page.">show_video_bitmap</a>,
<a class="xref" href="alleg018.html#textprintf_ex" title="Formatted output of a string.">textprintf_ex</a>.</blockquote>
<div class="al-api"><b>Example <a name="exfixed">exfixed</a></b></div><br>
   This program demonstrates how to use fixed point numbers, which
   are signed 32-bit integers storing the integer part in the
   upper 16 bits and the decimal part in the 16 lower bits. This
   example also uses the unusual approach of communicating with
   the user exclusively via the allegro_message() function.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg032.html#fixdiv" title="Fixed point division.">fixdiv</a>,
<a class="xref" href="alleg001.html#fixed" title="Fixed point integer to replace floats.">fixed</a>,
<a class="xref" href="alleg032.html#fixmul" title="Multiplies two fixed point values together.">fixmul</a>,
<a class="xref" href="alleg032.html#fixsqrt" title="Fixed point square root.">fixsqrt</a>,
<a class="xref" href="alleg032.html#fixtof" title="Converts a fixed point to floating point.">fixtof</a>,
<a class="xref" href="alleg032.html#ftofix" title="Converts a floating point value to fixed point.">ftofix</a>,
<a class="xref" href="alleg032.html#itofix" title="Converts an integer to fixed point.">itofix</a>.</blockquote>
<div class="al-api"><b>Example <a name="exfont">exfont</a></b></div><br>
   This is a very simple program showing how to load and manipulate fonts.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg001.html#FONT" title="Stores an Allegro font.">FONT</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg009.html#acquire_screen" title="Shortcut of acquire_bitmap(screen);">acquire_screen</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg013.html#clear_to_color" title="Clears the bitmap to the specified color.">clear_to_color</a>,
<a class="xref" href="alleg011.html#desktop_palette" title="The palette used by the Atari ST low resolution desktop.">desktop_palette</a>,
<a class="xref" href="alleg017.html#destroy_font" title="Frees the memory being used by a font structure.">destroy_font</a>,
<a class="xref" href="alleg017.html#extract_font_range" title="Extracts a range of characters from a font.">extract_font_range</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg006.html#key" title="Array of flags indicating key state.">key</a>,
<a class="xref" href="alleg017.html#load_font" title="Loads a font from a file.">load_font</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg017.html#merge_fonts" title="Merges two fonts into one font.">merge_fonts</a>,
<a class="xref" href="alleg006.html#readkey" title="Returns the next character from the keyboard buffer.">readkey</a>,
<a class="xref" href="alleg009.html#release_screen" title="Shortcut of release_bitmap(screen);">release_screen</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg018.html#textout_centre_ex" title="Writes a centered string on a bitmap.">textout_centre_ex</a>.</blockquote>
<div class="al-api"><b>Example <a name="exmouse">exmouse</a></b></div><br>
   This program demonstrates how to get mouse input. The
   first part of the test retrieves the raw mouse input data
   and displays it on the screen without using any mouse
   cursor. When you press a key the standard arrow-like mouse
   cursor appears.  You are not restricted to this shape,
   and a second key press modifies the cursor to be several
   concentric colored circles. They are not joined together,
   so you can still see bits of what's behind when you move the
   cursor over the printed text message.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg009.html#acquire_screen" title="Shortcut of acquire_bitmap(screen);">acquire_screen</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg009.html#bitmap_mask_color" title="Returns the mask color of the specified bitmap.">bitmap_mask_color</a>,
<a class="xref" href="alleg013.html#circle" title="Draws a circle.">circle</a>,
<a class="xref" href="alleg006.html#clear_keybuf" title="Clears the keyboard buffer.">clear_keybuf</a>,
<a class="xref" href="alleg013.html#clear_to_color" title="Clears the bitmap to the specified color.">clear_to_color</a>,
<a class="xref" href="alleg009.html#create_bitmap" title="Creates a memory bitmap.">create_bitmap</a>,
<a class="xref" href="alleg011.html#desktop_palette" title="The palette used by the Atari ST low resolution desktop.">desktop_palette</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg004.html#get_mouse_mickeys" title="How far the mouse has moved since the last call to this function.">get_mouse_mickeys</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg004.html#install_mouse" title="Installs the Allegro mouse handler.">install_mouse</a>,
<a class="xref" href="alleg005.html#install_timer" title="Installs the Allegro timer interrupt handler.">install_timer</a>,
<a class="xref" href="alleg006.html#key" title="Array of flags indicating key state.">key</a>,
<a class="xref" href="alleg006.html#keypressed" title="Tells if there are keypresses waiting in the input buffer.">keypressed</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg004.html#mouse_b" title="Global variable with the mouse position/button state.">mouse_b</a>,
<a class="xref" href="alleg004.html#mouse_w" title="Global variable with the mouse position/button state.">mouse_w</a>,
<a class="xref" href="alleg004.html#mouse_x" title="Global variable with the mouse position/button state.">mouse_x</a>,
<a class="xref" href="alleg004.html#mouse_y" title="Global variable with the mouse position/button state.">mouse_y</a>,
<a class="xref" href="alleg004.html#mouse_z" title="Global variable with the mouse position/button state.">mouse_z</a>,
<a class="xref" href="alleg012.html#palette_color" title="Maps palette indexes into the current pixel format colors.">palette_color</a>,
<a class="xref" href="alleg004.html#poll_mouse" title="Polls the mouse.">poll_mouse</a>,
<a class="xref" href="alleg006.html#readkey" title="Returns the next character from the keyboard buffer.">readkey</a>,
<a class="xref" href="alleg009.html#release_screen" title="Shortcut of release_bitmap(screen);">release_screen</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg004.html#set_mouse_sprite" title="Sets the mouse sprite.">set_mouse_sprite</a>,
<a class="xref" href="alleg004.html#set_mouse_sprite_focus" title="Sets the mouse sprite focus.">set_mouse_sprite_focus</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg004.html#show_mouse" title="Tells Allegro to display a mouse pointer on the screen.">show_mouse</a>,
<a class="xref" href="alleg018.html#textout_centre_ex" title="Writes a centered string on a bitmap.">textout_centre_ex</a>,
<a class="xref" href="alleg018.html#textout_ex" title="Writes a string on a bitmap.">textout_ex</a>,
<a class="xref" href="alleg018.html#textprintf_centre_ex" title="Formatted centered output of a string.">textprintf_centre_ex</a>,
<a class="xref" href="alleg018.html#textprintf_ex" title="Formatted output of a string.">textprintf_ex</a>,
<a class="xref" href="alleg018.html#textprintf_right_ex" title="Formatted right aligned output of a string.">textprintf_right_ex</a>,
<a class="xref" href="alleg008.html#vsync" title="Waits for a vertical retrace to begin.">vsync</a>.</blockquote>
<div class="al-api"><b>Example <a name="extimer">extimer</a></b></div><br>
   This program demonstrates how to use the timer routines.
   These can be a bit of a pain, because you have to be sure
   you lock all the memory that is used inside your interrupt
   handlers.  The first part of the example shows a basic use of
   timing using the blocking function rest(). The second part
   shows how to use three timers with different frequencies in
   a non blocking way.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg005.html#END_OF_FUNCTION" title="Locks the code used by a timer.">END_OF_FUNCTION</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg005.html#LOCK_FUNCTION" title="Locks the memory of a function used by a timer.">LOCK_FUNCTION</a>,
<a class="xref" href="alleg005.html#LOCK_VARIABLE" title="Locks the memory of a variable used by a timer.">LOCK_VARIABLE</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg013.html#clear_to_color" title="Clears the bitmap to the specified color.">clear_to_color</a>,
<a class="xref" href="alleg011.html#desktop_palette" title="The palette used by the Atari ST low resolution desktop.">desktop_palette</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg005.html#install_int" title="Installs a user timer handler.">install_int</a>,
<a class="xref" href="alleg005.html#install_int_ex" title="Adds or modifies a timer.">install_int_ex</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg005.html#install_timer" title="Installs the Allegro timer interrupt handler.">install_timer</a>,
<a class="xref" href="alleg006.html#key" title="Array of flags indicating key state.">key</a>,
<a class="xref" href="alleg006.html#keypressed" title="Tells if there are keypresses waiting in the input buffer.">keypressed</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg006.html#readkey" title="Returns the next character from the keyboard buffer.">readkey</a>,
<a class="xref" href="alleg005.html#rest" title="Waits a specified number of milliseconds or yields CPU.">rest</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg018.html#textprintf_centre_ex" title="Formatted centered output of a string.">textprintf_centre_ex</a>.</blockquote>
<div class="al-api"><b>Example <a name="exkeys">exkeys</a></b></div><br>
   This program demonstrates how to access the keyboard. The
   first part shows the basic use of readkey(). The second part
   shows how to extract the ASCII value. Next come the scan codes.
   The fourth test detects modifier keys like alt or shift. The
   fifth test requires some focus to be passed. The final step
   shows how to use the global key array to read simultaneous
   key presses.
   The last method to detect key presses are keyboard callbacks.
   This is demonstrated by installing a keyboard callback,
   which marks all pressed keys by drawing to a grid.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg005.html#END_OF_FUNCTION" title="Locks the code used by a timer.">END_OF_FUNCTION</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg005.html#LOCK_FUNCTION" title="Locks the memory of a function used by a timer.">LOCK_FUNCTION</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg009.html#acquire_screen" title="Shortcut of acquire_bitmap(screen);">acquire_screen</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg006.html#clear_keybuf" title="Clears the keyboard buffer.">clear_keybuf</a>,
<a class="xref" href="alleg013.html#clear_to_color" title="Clears the bitmap to the specified color.">clear_to_color</a>,
<a class="xref" href="alleg011.html#desktop_palette" title="The palette used by the Atari ST low resolution desktop.">desktop_palette</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg005.html#install_timer" title="Installs the Allegro timer interrupt handler.">install_timer</a>,
<a class="xref" href="alleg006.html#key" title="Array of flags indicating key state.">key</a>,
<a class="xref" href="alleg006.html#key_shifts" title="Bitmask containing the current state of modifier keys.">key_shifts</a>,
<a class="xref" href="alleg006.html#keyboard_lowlevel_callback" title="User specified low level keyboard event handler.">keyboard_lowlevel_callback</a>,
<a class="xref" href="alleg006.html#keypressed" title="Tells if there are keypresses waiting in the input buffer.">keypressed</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg006.html#readkey" title="Returns the next character from the keyboard buffer.">readkey</a>,
<a class="xref" href="alleg013.html#rectfill" title="Draws a solid filled rectangle.">rectfill</a>,
<a class="xref" href="alleg009.html#release_screen" title="Shortcut of release_bitmap(screen);">release_screen</a>,
<a class="xref" href="alleg005.html#rest" title="Waits a specified number of milliseconds or yields CPU.">rest</a>,
<a class="xref" href="alleg006.html#scancode_to_name" title="Converts a scancode to a key name.">scancode_to_name</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg018.html#textprintf_centre_ex" title="Formatted centered output of a string.">textprintf_centre_ex</a>,
<a class="xref" href="alleg018.html#textprintf_ex" title="Formatted output of a string.">textprintf_ex</a>,
<a class="xref" href="alleg006.html#ureadkey" title="Returns the next unicode character from the keyboard buffer.">ureadkey</a>,
<a class="xref" href="alleg002.html#usprintf" title="Writes formatted data into a buffer.">usprintf</a>,
<a class="xref" href="alleg002.html#ustrzncpy" title="Copies a string into another one, specifying size.">ustrzncpy</a>.</blockquote>
<div class="al-api"><b>Example <a name="exjoy">exjoy</a></b></div><br>
   This program uses the Allegro library to detect and read the value
   of a joystick. The output of the program is a small target sight
   on the screen which you can move. At the same time the program will
   tell you what you are doing with the joystick (moving or firing).


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg007.html#calibrate_joystick" title="Calibrates the specified joystick.">calibrate_joystick</a>,
<a class="xref" href="alleg007.html#calibrate_joystick_name" title="Returns the next calibration text string.">calibrate_joystick_name</a>,
<a class="xref" href="alleg013.html#circle" title="Draws a circle.">circle</a>,
<a class="xref" href="alleg013.html#clear_bitmap" title="Clears the bitmap to color 0.">clear_bitmap</a>,
<a class="xref" href="alleg006.html#clear_keybuf" title="Clears the keyboard buffer.">clear_keybuf</a>,
<a class="xref" href="alleg009.html#create_bitmap" title="Creates a memory bitmap.">create_bitmap</a>,
<a class="xref" href="alleg011.html#default_palette" title="The default IBM BIOS palette.">default_palette</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg020.html#drawing_mode" title="Sets the graphics drawing mode.">drawing_mode</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg007.html#install_joystick" title="Initialises the joystick.">install_joystick</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg007.html#joy" title="Global array of joystick state information.">joy</a>,
<a class="xref" href="alleg006.html#key" title="Array of flags indicating key state.">key</a>,
<a class="xref" href="alleg006.html#keypressed" title="Tells if there are keypresses waiting in the input buffer.">keypressed</a>,
<a class="xref" href="alleg007.html#num_joysticks" title="Global variable saying how many joysticks there are.">num_joysticks</a>,
<a class="xref" href="alleg012.html#palette_color" title="Maps palette indexes into the current pixel format colors.">palette_color</a>,
<a class="xref" href="alleg007.html#poll_joystick" title="Polls the joystick.">poll_joystick</a>,
<a class="xref" href="alleg013.html#putpixel" title="Writes a pixel into a bitmap.">putpixel</a>,
<a class="xref" href="alleg006.html#readkey" title="Returns the next character from the keyboard buffer.">readkey</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg018.html#textout_centre_ex" title="Writes a centered string on a bitmap.">textout_centre_ex</a>,
<a class="xref" href="alleg018.html#textprintf_centre_ex" title="Formatted centered output of a string.">textprintf_centre_ex</a>,
<a class="xref" href="alleg018.html#textprintf_ex" title="Formatted output of a string.">textprintf_ex</a>.</blockquote>
<div class="al-api"><b>Example <a name="exsample">exsample</a></b></div><br>
   This program demonstrates how to play samples. You have to
   use this example from the command line to specify as first
   parameter a WAV or VOC sound file to play. If the file is
   loaded successfully, the sound will be played in an infinite
   loop. While it is being played, you can use the left and right
   arrow keys to modify the panning of the sound. You can also
   use the up and down arrow keys to modify the pitch.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg001.html#SAMPLE" title="Stores sound data.">SAMPLE</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg026.html#adjust_sample" title="Alters the parameters of a sample while it is playing.">adjust_sample</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg013.html#clear_to_color" title="Clears the bitmap to the specified color.">clear_to_color</a>,
<a class="xref" href="alleg011.html#desktop_palette" title="The palette used by the Atari ST low resolution desktop.">desktop_palette</a>,
<a class="xref" href="alleg026.html#destroy_sample" title="Destroys a sample structure when you are done with it.">destroy_sample</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg024.html#install_sound" title="Initialises the sound module.">install_sound</a>,
<a class="xref" href="alleg005.html#install_timer" title="Installs the Allegro timer interrupt handler.">install_timer</a>,
<a class="xref" href="alleg006.html#key" title="Array of flags indicating key state.">key</a>,
<a class="xref" href="alleg026.html#load_sample" title="Loads a sample from a file.">load_sample</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg026.html#play_sample" title="Plays a sample.">play_sample</a>,
<a class="xref" href="alleg006.html#poll_keyboard" title="Polls the keyboard.">poll_keyboard</a>,
<a class="xref" href="alleg005.html#rest" title="Waits a specified number of milliseconds or yields CPU.">rest</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg018.html#textprintf_centre_ex" title="Formatted centered output of a string.">textprintf_centre_ex</a>.</blockquote>
<div class="al-api"><b>Example <a name="exmidi">exmidi</a></b></div><br>
   This program demonstrates how to play MIDI files.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg001.html#MIDI" title="Stores MIDI data.">MIDI</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg013.html#clear_to_color" title="Clears the bitmap to the specified color.">clear_to_color</a>,
<a class="xref" href="alleg011.html#desktop_palette" title="The palette used by the Atari ST low resolution desktop.">desktop_palette</a>,
<a class="xref" href="alleg027.html#destroy_midi" title="Destroys a MIDI structure when you are done with it.">destroy_midi</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg030.html#get_filename" title="Returns a pointer to the filename portion of a path.">get_filename</a>,
<a class="xref" href="alleg027.html#get_midi_length" title="Determines the total playing time of a midi, in seconds.">get_midi_length</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg024.html#install_sound" title="Initialises the sound module.">install_sound</a>,
<a class="xref" href="alleg005.html#install_timer" title="Installs the Allegro timer interrupt handler.">install_timer</a>,
<a class="xref" href="alleg006.html#key" title="Array of flags indicating key state.">key</a>,
<a class="xref" href="alleg006.html#keypressed" title="Tells if there are keypresses waiting in the input buffer.">keypressed</a>,
<a class="xref" href="alleg027.html#load_midi" title="Loads a MIDI file.">load_midi</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg027.html#midi_pause" title="Pauses the MIDI player.">midi_pause</a>,
<a class="xref" href="alleg027.html#midi_pos" title="Stores the current position in the MIDI file.">midi_pos</a>,
<a class="xref" href="alleg027.html#midi_resume" title="Resumes playback of a paused MIDI file.">midi_resume</a>,
<a class="xref" href="alleg027.html#midi_time" title="The current position in the MIDI file, in seconds.">midi_time</a>,
<a class="xref" href="alleg027.html#play_midi" title="Starts playing the specified MIDI file.">play_midi</a>,
<a class="xref" href="alleg006.html#readkey" title="Returns the next character from the keyboard buffer.">readkey</a>,
<a class="xref" href="alleg013.html#rectfill" title="Draws a solid filled rectangle.">rectfill</a>,
<a class="xref" href="alleg005.html#rest" title="Waits a specified number of milliseconds or yields CPU.">rest</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_display_switch_mode" title="Tells Allegro how the program handles background switching.">set_display_switch_mode</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg018.html#text_height" title="Returns the height of a font in pixels.">text_height</a>,
<a class="xref" href="alleg018.html#text_length" title="Returns the length of a string in pixels.">text_length</a>,
<a class="xref" href="alleg018.html#textprintf_centre_ex" title="Formatted centered output of a string.">textprintf_centre_ex</a>.</blockquote>
<div class="al-api"><b>Example <a name="exgui">exgui</a></b></div><br>
   This program demonstrates how to use the GUI routines. From
   the simple dialog controls that display a text or a bitmap to
   more complex multiple choice selection lists, Allegro provides
   a framework which can be customised to suit your needs.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#DATAFILE" title="Stores an Allegro datafile in memory.">DATAFILE</a>,
<a class="xref" href="alleg001.html#DIALOG" title="Stores a GUI description.">DIALOG</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg001.html#MENU" title="Stores the entries of a menu.">MENU</a>,
<a class="xref" href="alleg035.html#active_menu" title="Global pointer to the most recent activated menu.">active_menu</a>,
<a class="xref" href="alleg035.html#alert" title="Displays a popup alert box.">alert</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg035.html#d_bitmap_proc" title="Dialog procedure drawing a bitmap.">d_bitmap_proc</a>,
<a class="xref" href="alleg035.html#d_box_proc" title="Dialog procedure drawing boxes onto the screen.">d_box_proc</a>,
<a class="xref" href="alleg035.html#d_button_proc" title="Dialog procedure implementing a button object.">d_button_proc</a>,
<a class="xref" href="alleg035.html#d_check_proc" title="Dialog procedure implementing a check box object.">d_check_proc</a>,
<a class="xref" href="alleg035.html#d_clear_proc" title="Dialog procedure to clear the screen.">d_clear_proc</a>,
<a class="xref" href="alleg035.html#d_ctext_proc" title="Dialogs procedure drawing text onto the screen.">d_ctext_proc</a>,
<a class="xref" href="alleg035.html#d_edit_proc" title="Dialog procedure implementing an editable text object.">d_edit_proc</a>,
<a class="xref" href="alleg035.html#d_icon_proc" title="Dialog procedure implementing a bitmap button.">d_icon_proc</a>,
<a class="xref" href="alleg035.html#d_keyboard_proc" title="Invisible dialog procedure for implementing keyboard shortcuts.">d_keyboard_proc</a>,
<a class="xref" href="alleg035.html#d_list_proc" title="Dialog procedure implementing a list box object.">d_list_proc</a>,
<a class="xref" href="alleg035.html#d_menu_proc" title="Dialog procedure implementing a menu bar object.">d_menu_proc</a>,
<a class="xref" href="alleg035.html#d_radio_proc" title="Dialog procedure implementing a radio button object.">d_radio_proc</a>,
<a class="xref" href="alleg035.html#d_rtext_proc" title="Dialogs procedure drawing text onto the screen.">d_rtext_proc</a>,
<a class="xref" href="alleg035.html#d_shadow_box_proc" title="Dialog procedure drawing boxes onto the screen.">d_shadow_box_proc</a>,
<a class="xref" href="alleg035.html#d_slider_proc" title="Dialog procedure implementing a slider control object.">d_slider_proc</a>,
<a class="xref" href="alleg035.html#d_text_list_proc" title="Dialog procedure implementing a list box object with type ahead.">d_text_list_proc</a>,
<a class="xref" href="alleg035.html#d_text_proc" title="Dialogs procedure drawing text onto the screen.">d_text_proc</a>,
<a class="xref" href="alleg035.html#d_textbox_proc" title="Dialog procedure implementing a text box object.">d_textbox_proc</a>,
<a class="xref" href="alleg035.html#d_yield_proc" title="Invisible dialog procedure that yields CPU time slices.">d_yield_proc</a>,
<a class="xref" href="alleg035.html#do_dialog" title="Basic dialog manager function.">do_dialog</a>,
<a class="xref" href="alleg035.html#gui_bg_color" title="The foreground and background colors for the standard dialogs.">gui_bg_color</a>,
<a class="xref" href="alleg035.html#gui_fg_color" title="The foreground and background colors for the standard dialogs.">gui_fg_color</a>,
<a class="xref" href="alleg035.html#gui_mg_color" title="The color used for displaying greyed-out dialog objects.">gui_mg_color</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg004.html#install_mouse" title="Installs the Allegro mouse handler.">install_mouse</a>,
<a class="xref" href="alleg005.html#install_timer" title="Installs the Allegro timer interrupt handler.">install_timer</a>,
<a class="xref" href="alleg006.html#key" title="Array of flags indicating key state.">key</a>,
<a class="xref" href="alleg031.html#load_datafile" title="Loads a datafile into memory.">load_datafile</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg035.html#position_dialog" title="Moves an array of dialog objects to the specified position.">position_dialog</a>,
<a class="xref" href="alleg030.html#replace_filename" title="Replaces path+filename with a new filename tail.">replace_filename</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg035.html#set_dialog_color" title="Sets the colors of an array of dialog objects.">set_dialog_color</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg031.html#unload_datafile" title="Frees all the objects in a datafile.">unload_datafile</a>,
<a class="xref" href="alleg002.html#ustrtok" title="Retrieves tokens from a string.">ustrtok</a>,
<a class="xref" href="alleg002.html#ustrzcat" title="Concatenates a string to another one, specifying size.">ustrzcat</a>,
<a class="xref" href="alleg002.html#ustrzcpy" title="Copies a string into another one, specifying size.">ustrzcpy</a>,
<a class="xref" href="alleg002.html#uszprintf" title="Writes formatted data into a buffer, specifying size.">uszprintf</a>.</blockquote>
<div class="al-api"><b>Example <a name="excustom">excustom</a></b></div><br>
   A follow up of the exgui.c example showing how to customise the
   default Allegro framework. In this case a dialog procedure
   animates a graphical clock without disrupting other GUI
   dialogs.  A more simple option shows how to dynamically change
   the font used by all GUI elements.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg001.html#DATAFILE" title="Stores an Allegro datafile in memory.">DATAFILE</a>,
<a class="xref" href="alleg001.html#DIALOG" title="Stores a GUI description.">DIALOG</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg001.html#FONT" title="Stores an Allegro font.">FONT</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg013.html#circle" title="Draws a circle.">circle</a>,
<a class="xref" href="alleg013.html#circlefill" title="Draws a filled circle.">circlefill</a>,
<a class="xref" href="alleg013.html#clear_to_color" title="Clears the bitmap to the specified color.">clear_to_color</a>,
<a class="xref" href="alleg009.html#create_bitmap" title="Creates a memory bitmap.">create_bitmap</a>,
<a class="xref" href="alleg035.html#d_button_proc" title="Dialog procedure implementing a button object.">d_button_proc</a>,
<a class="xref" href="alleg035.html#d_check_proc" title="Dialog procedure implementing a check box object.">d_check_proc</a>,
<a class="xref" href="alleg035.html#d_clear_proc" title="Dialog procedure to clear the screen.">d_clear_proc</a>,
<a class="xref" href="alleg035.html#d_edit_proc" title="Dialog procedure implementing an editable text object.">d_edit_proc</a>,
<a class="xref" href="alleg011.html#desktop_palette" title="The palette used by the Atari ST low resolution desktop.">desktop_palette</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg035.html#do_dialog" title="Basic dialog manager function.">do_dialog</a>,
<a class="xref" href="alleg032.html#fixcos" title="Fixed point cosine of binary angles.">fixcos</a>,
<a class="xref" href="alleg001.html#fixed" title="Fixed point integer to replace floats.">fixed</a>,
<a class="xref" href="alleg032.html#fixmul" title="Multiplies two fixed point values together.">fixmul</a>,
<a class="xref" href="alleg032.html#fixsin" title="Fixed point sine of binary angles.">fixsin</a>,
<a class="xref" href="alleg032.html#fixtoi" title="Converts a fixed point to integer with rounding.">fixtoi</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg004.html#install_mouse" title="Installs the Allegro mouse handler.">install_mouse</a>,
<a class="xref" href="alleg005.html#install_timer" title="Installs the Allegro timer interrupt handler.">install_timer</a>,
<a class="xref" href="alleg032.html#itofix" title="Converts an integer to fixed point.">itofix</a>,
<a class="xref" href="alleg006.html#key" title="Array of flags indicating key state.">key</a>,
<a class="xref" href="alleg013.html#line" title="Draws a line onto the bitmap.">line</a>,
<a class="xref" href="alleg031.html#load_datafile" title="Loads a datafile into memory.">load_datafile</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg035.html#object_message" title="Sends a message to an object and returns the answer.">object_message</a>,
<a class="xref" href="alleg030.html#replace_filename" title="Replaces path+filename with a new filename tail.">replace_filename</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg031.html#unload_datafile" title="Frees all the objects in a datafile.">unload_datafile</a>.</blockquote>
<div class="al-api"><b>Example <a name="exunicod">exunicod</a></b></div><br>
   This program demonstrates the use of the 16-bit Unicode text
   encoding format with Allegro. The example displays a message
   translated to different languages scrolling on the screen
   using an external font containing the required characters to
   display those messages.
   
<p>
   Note how the Allegro unicode string functions resemble the
   functions you can find in the standard C library, only these
   handle Unicode on all platforms.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg001.html#DATAFILE" title="Stores an Allegro datafile in memory.">DATAFILE</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg001.html#FONT" title="Stores an Allegro font.">FONT</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg013.html#clear_to_color" title="Clears the bitmap to the specified color.">clear_to_color</a>,
<a class="xref" href="alleg009.html#create_bitmap" title="Creates a memory bitmap.">create_bitmap</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg005.html#install_int_ex" title="Adds or modifies a timer.">install_int_ex</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg005.html#install_timer" title="Installs the Allegro timer interrupt handler.">install_timer</a>,
<a class="xref" href="alleg006.html#keypressed" title="Tells if there are keypresses waiting in the input buffer.">keypressed</a>,
<a class="xref" href="alleg031.html#load_datafile" title="Loads a datafile into memory.">load_datafile</a>,
<a class="xref" href="alleg030.html#replace_filename" title="Replaces path+filename with a new filename tail.">replace_filename</a>,
<a class="xref" href="alleg005.html#rest" title="Waits a specified number of milliseconds or yields CPU.">rest</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg002.html#set_uformat" title="Set the global current text encoding format.">set_uformat</a>,
<a class="xref" href="alleg000.html#set_window_title" title="Sets the window title of the Allegro program.">set_window_title</a>,
<a class="xref" href="alleg018.html#text_height" title="Returns the height of a font in pixels.">text_height</a>,
<a class="xref" href="alleg018.html#text_length" title="Returns the length of a string in pixels.">text_length</a>,
<a class="xref" href="alleg018.html#textout_ex" title="Writes a string on a bitmap.">textout_ex</a>,
<a class="xref" href="alleg002.html#uconvert_ascii" title="Converts string from ASCII into the current format.">uconvert_ascii</a>,
<a class="xref" href="alleg031.html#unload_datafile" title="Frees all the objects in a datafile.">unload_datafile</a>,
<a class="xref" href="alleg002.html#ustrcat" title="Concatenates a string to another one.">ustrcat</a>,
<a class="xref" href="alleg002.html#ustrcpy" title="Copies a string into another one.">ustrcpy</a>,
<a class="xref" href="alleg002.html#ustrsize" title="Size of the string in bytes without null terminator.">ustrsize</a>,
<a class="xref" href="alleg002.html#ustrsizez" title="Size of the string in bytes including null terminator.">ustrsizez</a>.</blockquote>
<div class="al-api"><b>Example <a name="exbitmap">exbitmap</a></b></div><br>
   This program demonstrates how to load and display a bitmap
   file.  You have to use this example from the command line to
   specify as first parameter a graphic file in one of Allegro's
   supported formats.  If the file is loaded successfully,
   it will be displayed until you press a key.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg001.html#PALETTE" title="Stores palette information.">PALETTE</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg010.html#load_bitmap" title="Loads any supported bitmap from a file.">load_bitmap</a>,
<a class="xref" href="alleg006.html#readkey" title="Returns the next character from the keyboard buffer.">readkey</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>.</blockquote>
<div class="al-api"><b>Example <a name="exscale">exscale</a></b></div><br>
   This example demonstrates how to use PCX files, palettes and stretch
   blits. It loads a PCX file, sets its palette and does some random
   stretch_blits. Don't worry - it's VERY slowed down using vsync().


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg001.html#PALETTE" title="Stores palette information.">PALETTE</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg006.html#keypressed" title="Tells if there are keypresses waiting in the input buffer.">keypressed</a>,
<a class="xref" href="alleg010.html#load_pcx" title="Loads a PCX bitmap from a file.">load_pcx</a>,
<a class="xref" href="alleg030.html#replace_filename" title="Replaces path+filename with a new filename tail.">replace_filename</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg014.html#stretch_blit" title="Scales a rectangular area from one bitmap to another.">stretch_blit</a>,
<a class="xref" href="alleg008.html#vsync" title="Waits for a vertical retrace to begin.">vsync</a>.</blockquote>
<div class="al-api"><b>Example <a name="exconfig">exconfig</a></b></div><br>
   This is a very simple program showing how to use the Allegro
   configuration (ini file) routines. A first look at the example
   shows nothing more than a static graphic and the wait for
   a key press. However, the way this graphic is displayed is
   configured through a custom exconfig.ini file which is loaded
   manually. From this file the example obtains parameters like
   fullscreen/windowed mode, a specific graphic resolution to set
   up, which graphic to show, how to blit it on the screen, etc.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg001.html#RGB" title="Single palette entry.">RGB</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg013.html#clear_bitmap" title="Clears the bitmap to color 0.">clear_bitmap</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg003.html#get_config_argv" title="Reads a token list from the configuration file.">get_config_argv</a>,
<a class="xref" href="alleg003.html#get_config_int" title="Retrieves an integer from the configuration file.">get_config_int</a>,
<a class="xref" href="alleg003.html#get_config_string" title="Retrieves a string from the configuration file.">get_config_string</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg013.html#line" title="Draws a line onto the bitmap.">line</a>,
<a class="xref" href="alleg010.html#load_bitmap" title="Loads any supported bitmap from a file.">load_bitmap</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg003.html#pop_config_state" title="Pops a previously pushed configuration state.">pop_config_state</a>,
<a class="xref" href="alleg003.html#push_config_state" title="Pushes the current configuration state.">push_config_state</a>,
<a class="xref" href="alleg006.html#readkey" title="Returns the next character from the keyboard buffer.">readkey</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_color_depth" title="Sets the global pixel color depth.">set_color_depth</a>,
<a class="xref" href="alleg003.html#set_config_file" title="Sets the configuration file.">set_config_file</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg014.html#stretch_blit" title="Scales a rectangular area from one bitmap to another.">stretch_blit</a>,
<a class="xref" href="alleg018.html#textout_centre_ex" title="Writes a centered string on a bitmap.">textout_centre_ex</a>,
<a class="xref" href="alleg018.html#textprintf_centre_ex" title="Formatted centered output of a string.">textprintf_centre_ex</a>,
<a class="xref" href="alleg002.html#ustrdup" title="Duplicates a string.">ustrdup</a>,
<a class="xref" href="alleg002.html#ustricmp" title="Compares two strings ignoring case.">ustricmp</a>.</blockquote>
<div class="al-api"><b>Example <a name="exdata">exdata</a></b></div><br>
   This program demonstrates how to access the contents of an
   Allegro datafile (created by the grabber utility). The example
   loads the file <tt>`example.dat'</tt>, then blits a bitmap and shows
   a font, both from this datafile.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#DATAFILE" title="Stores an Allegro datafile in memory.">DATAFILE</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg031.html#load_datafile" title="Loads a datafile into memory.">load_datafile</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg006.html#readkey" title="Returns the next character from the keyboard buffer.">readkey</a>,
<a class="xref" href="alleg030.html#replace_filename" title="Replaces path+filename with a new filename tail.">replace_filename</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg010.html#set_color_conversion" title="Tells Allegro how to convert images during loading time.">set_color_conversion</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg018.html#textout_ex" title="Writes a string on a bitmap.">textout_ex</a>,
<a class="xref" href="alleg031.html#unload_datafile" title="Frees all the objects in a datafile.">unload_datafile</a>.</blockquote>
<div class="al-api"><b>Example <a name="exsprite">exsprite</a></b></div><br>
   This example demonstrates how to use datafiles, various sprite
   drawing routines and flicker-free animation.
   
<p>
   Why is the animate() routine coded in that way?  As you
   probably know, VIDEO RAM is much slower than "normal"
   RAM, so it's advisable to reduce VRAM blits to a minimum.
   Drawing sprite on the screen (meaning in VRAM) and then
   clearing a background for it is not very fast. This example
   uses a different method which is much faster, but require a
   bit more memory.
   
<p>
   First the buffer is cleared (it's a normal BITMAP), then the
   sprite is drawn on it, and when the drawing is finished this
   buffer is copied directly to the screen. So the end result is
   that there is a single VRAM blit instead of blitting/clearing
   the background and drawing a sprite on it.  It's a good method
   even when you have to restore the background. And of course,
   it completely removes any flickering effect.
   
<p>
   When one uses a big (ie. 800x600 background) and draws
   something on it, it's wise to use a copy of background
   somewhere in memory and restore background using this
   "virtual background". When blitting from VRAM in SVGA modes,
   it's probably, that drawing routines have to switch banks on
   video card. I think, I don't have to remind how slow is it.
   
<p>
   Note that on modern systems, the above isn't true anymore, and
   you usually get the best performance by caching all your
   animations in video ram and doing only VRAM->VRAM blits, so
   there is no more RAM->VRAM transfer at all anymore. And usually,
   such transfers can run in parallel on the graphics card's
   processor as well, costing virtually no main cpu time at all.
   See the exaccel example for an example of this.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg001.html#DATAFILE" title="Stores an Allegro datafile in memory.">DATAFILE</a>,
<a class="xref" href="alleg005.html#END_OF_FUNCTION" title="Locks the code used by a timer.">END_OF_FUNCTION</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg005.html#LOCK_FUNCTION" title="Locks the memory of a function used by a timer.">LOCK_FUNCTION</a>,
<a class="xref" href="alleg005.html#LOCK_VARIABLE" title="Locks the memory of a variable used by a timer.">LOCK_VARIABLE</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg013.html#circle" title="Draws a circle.">circle</a>,
<a class="xref" href="alleg013.html#clear_bitmap" title="Clears the bitmap to color 0.">clear_bitmap</a>,
<a class="xref" href="alleg006.html#clear_keybuf" title="Clears the keyboard buffer.">clear_keybuf</a>,
<a class="xref" href="alleg009.html#create_bitmap" title="Creates a memory bitmap.">create_bitmap</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg014.html#draw_sprite" title="Draws a copy of the sprite onto the destination bitmap.">draw_sprite</a>,
<a class="xref" href="alleg014.html#draw_sprite_h_flip" title="Draws the sprite transformed to the destination bitmap.">draw_sprite_h_flip</a>,
<a class="xref" href="alleg014.html#draw_sprite_v_flip" title="Draws the sprite transformed to the destination bitmap.">draw_sprite_v_flip</a>,
<a class="xref" href="alleg014.html#draw_sprite_vh_flip" title="Draws the sprite transformed to the destination bitmap.">draw_sprite_vh_flip</a>,
<a class="xref" href="alleg001.html#fixed" title="Fixed point integer to replace floats.">fixed</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg013.html#hline" title="Draws a horizontal line onto the bitmap.">hline</a>,
<a class="xref" href="alleg005.html#install_int_ex" title="Adds or modifies a timer.">install_int_ex</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg024.html#install_sound" title="Initialises the sound module.">install_sound</a>,
<a class="xref" href="alleg005.html#install_timer" title="Installs the Allegro timer interrupt handler.">install_timer</a>,
<a class="xref" href="alleg032.html#itofix" title="Converts an integer to fixed point.">itofix</a>,
<a class="xref" href="alleg006.html#key" title="Array of flags indicating key state.">key</a>,
<a class="xref" href="alleg006.html#keypressed" title="Tells if there are keypresses waiting in the input buffer.">keypressed</a>,
<a class="xref" href="alleg031.html#load_datafile" title="Loads a datafile into memory.">load_datafile</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg012.html#palette_color" title="Maps palette indexes into the current pixel format colors.">palette_color</a>,
<a class="xref" href="alleg014.html#pivot_sprite" title="Rotates a sprite around a specified point.">pivot_sprite</a>,
<a class="xref" href="alleg014.html#pivot_sprite_v_flip" title="Rotates and flips a sprite around a specified point.">pivot_sprite_v_flip</a>,
<a class="xref" href="alleg026.html#play_sample" title="Plays a sample.">play_sample</a>,
<a class="xref" href="alleg013.html#rectfill" title="Draws a solid filled rectangle.">rectfill</a>,
<a class="xref" href="alleg030.html#replace_filename" title="Replaces path+filename with a new filename tail.">replace_filename</a>,
<a class="xref" href="alleg005.html#rest" title="Waits a specified number of milliseconds or yields CPU.">rest</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg018.html#text_height" title="Returns the height of a font in pixels.">text_height</a>,
<a class="xref" href="alleg018.html#textout_centre_ex" title="Writes a centered string on a bitmap.">textout_centre_ex</a>,
<a class="xref" href="alleg031.html#unload_datafile" title="Frees all the objects in a datafile.">unload_datafile</a>,
<a class="xref" href="alleg008.html#vsync" title="Waits for a vertical retrace to begin.">vsync</a>.</blockquote>
<div class="al-api"><b>Example <a name="exrotscl">exrotscl</a></b></div><br>
   This example demonstrates rotate_scaled_sprite functions.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg009.html#acquire_screen" title="Shortcut of acquire_bitmap(screen);">acquire_screen</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg013.html#clear_to_color" title="Clears the bitmap to the specified color.">clear_to_color</a>,
<a class="xref" href="alleg009.html#create_bitmap" title="Creates a memory bitmap.">create_bitmap</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg014.html#draw_trans_sprite" title="Draws a sprite blending it with the destination.">draw_trans_sprite</a>,
<a class="xref" href="alleg001.html#fixed" title="Fixed point integer to replace floats.">fixed</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg032.html#ftofix" title="Converts a floating point value to fixed point.">ftofix</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg006.html#key" title="Array of flags indicating key state.">key</a>,
<a class="xref" href="alleg006.html#keypressed" title="Tells if there are keypresses waiting in the input buffer.">keypressed</a>,
<a class="xref" href="alleg010.html#load_bitmap" title="Loads any supported bitmap from a file.">load_bitmap</a>,
<a class="xref" href="alleg012.html#makeacol" title="Converts RGBA colors into display dependent pixel formats.">makeacol</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg006.html#readkey" title="Returns the next character from the keyboard buffer.">readkey</a>,
<a class="xref" href="alleg009.html#release_screen" title="Shortcut of release_bitmap(screen);">release_screen</a>,
<a class="xref" href="alleg005.html#rest" title="Waits a specified number of milliseconds or yields CPU.">rest</a>,
<a class="xref" href="alleg014.html#rotate_scaled_sprite" title="Rotates and stretches a sprite.">rotate_scaled_sprite</a>,
<a class="xref" href="alleg014.html#rotate_scaled_sprite_lit" title="Rotates and stretches a sprite.">rotate_scaled_sprite_lit</a>,
<a class="xref" href="alleg014.html#rotate_scaled_sprite_trans" title="Rotates and stretches a sprite.">rotate_scaled_sprite_trans</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg020.html#set_alpha_blender" title="Enables a special alpha-channel blending mode.">set_alpha_blender</a>,
<a class="xref" href="alleg010.html#set_color_conversion" title="Tells Allegro how to convert images during loading time.">set_color_conversion</a>,
<a class="xref" href="alleg008.html#set_color_depth" title="Sets the global pixel color depth.">set_color_depth</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg020.html#set_trans_blender" title="Enables a truecolor blender.">set_trans_blender</a>,
<a class="xref" href="alleg018.html#textout_centre_ex" title="Writes a centered string on a bitmap.">textout_centre_ex</a>.</blockquote>
<div class="al-api"><b>Example <a name="exexedat">exexedat</a></b></div><br>
   This program demonstrates how to access the contents of an Allegro
   datafile (created by the grabber utility) linked to the executable by the
   exedat tool. It is basically the exdata example with minor
   modifications.
   
<p>
   You may ask: how do you compile, append and exec your program?
   
<p>
   Answer: like this...
   
<p>
   1) Compile your program like normal. Use the magic filenames with '#'
   to load your data where needed.
   
<p>
   2) Once you compressed your program, run "exedat foo.exe data.dat"
   
<p>
   3) Finally run your program.
   
<p>
   Note that appending data to the end of binaries may not be portable
   across all platforms supported by Allegro.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#DATAFILE" title="Stores an Allegro datafile in memory.">DATAFILE</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg013.html#line" title="Draws a line onto the bitmap.">line</a>,
<a class="xref" href="alleg031.html#load_datafile" title="Loads a datafile into memory.">load_datafile</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg006.html#readkey" title="Returns the next character from the keyboard buffer.">readkey</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg010.html#set_color_conversion" title="Tells Allegro how to convert images during loading time.">set_color_conversion</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg018.html#textout_ex" title="Writes a string on a bitmap.">textout_ex</a>,
<a class="xref" href="alleg031.html#unload_datafile" title="Frees all the objects in a datafile.">unload_datafile</a>.</blockquote>
<div class="al-api"><b>Example <a name="extrans">extrans</a></b></div><br>
   This program demonstrates how to use the lighting and
   translucency functions. The first part of the example will
   show a dark screen illuminated by a spotlight you can move
   with your mouse. After a key press the example shows the full
   bitmap and the spotlight changes to be a reduced version of
   the background with 50% of translucency.
   
<p>
   The translucency effect is easy to do in all color depths.
   However, the lighting effect has to be performed in a different
   way depending on whether the screen is in 8bit mode or another
   color depth. This is because additive drawing mode uses a
   different set of routines for truecolor modes.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg001.html#COLOR_MAP" title="Stores a color map to accelerate drawing.">COLOR_MAP</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg001.html#PALETTE" title="Stores palette information.">PALETTE</a>,
<a class="xref" href="alleg001.html#RGB" title="Single palette entry.">RGB</a>,
<a class="xref" href="alleg001.html#RGB_MAP" title="Stores an rgb map to accelerate conversions.">RGB_MAP</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg009.html#bitmap_color_depth" title="Returns the color depth of the specified bitmap.">bitmap_color_depth</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg013.html#circlefill" title="Draws a filled circle.">circlefill</a>,
<a class="xref" href="alleg013.html#clear_bitmap" title="Clears the bitmap to color 0.">clear_bitmap</a>,
<a class="xref" href="alleg006.html#clear_keybuf" title="Clears the keyboard buffer.">clear_keybuf</a>,
<a class="xref" href="alleg020.html#color_map" title="Global pointer to the color mapping table.">color_map</a>,
<a class="xref" href="alleg009.html#create_bitmap" title="Creates a memory bitmap.">create_bitmap</a>,
<a class="xref" href="alleg009.html#create_bitmap_ex" title="Creates a memory bitmap specifying color depth.">create_bitmap_ex</a>,
<a class="xref" href="alleg020.html#create_light_table" title="Fills a color mapping table for lighting effects.">create_light_table</a>,
<a class="xref" href="alleg021.html#create_rgb_table" title="Generates an RGB mapping table with lookup data for a palette.">create_rgb_table</a>,
<a class="xref" href="alleg020.html#create_trans_table" title="Fills a color mapping table for translucency effects.">create_trans_table</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg014.html#draw_trans_sprite" title="Draws a sprite blending it with the destination.">draw_trans_sprite</a>,
<a class="xref" href="alleg020.html#drawing_mode" title="Sets the graphics drawing mode.">drawing_mode</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg004.html#install_mouse" title="Installs the Allegro mouse handler.">install_mouse</a>,
<a class="xref" href="alleg005.html#install_timer" title="Installs the Allegro timer interrupt handler.">install_timer</a>,
<a class="xref" href="alleg006.html#keypressed" title="Tells if there are keypresses waiting in the input buffer.">keypressed</a>,
<a class="xref" href="alleg010.html#load_bitmap" title="Loads any supported bitmap from a file.">load_bitmap</a>,
<a class="xref" href="alleg004.html#mouse_x" title="Global variable with the mouse position/button state.">mouse_x</a>,
<a class="xref" href="alleg004.html#mouse_y" title="Global variable with the mouse position/button state.">mouse_y</a>,
<a class="xref" href="alleg004.html#poll_mouse" title="Polls the mouse.">poll_mouse</a>,
<a class="xref" href="alleg013.html#rectfill" title="Draws a solid filled rectangle.">rectfill</a>,
<a class="xref" href="alleg030.html#replace_filename" title="Replaces path+filename with a new filename tail.">replace_filename</a>,
<a class="xref" href="alleg005.html#rest" title="Waits a specified number of milliseconds or yields CPU.">rest</a>,
<a class="xref" href="alleg021.html#rgb_map" title="Look up table to speed up reducing RGB values to palette colors.">rgb_map</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg020.html#set_alpha_blender" title="Enables a special alpha-channel blending mode.">set_alpha_blender</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg020.html#set_trans_blender" title="Enables a truecolor blender.">set_trans_blender</a>,
<a class="xref" href="alleg020.html#set_write_alpha_blender" title="Enables the special alpha-channel editing mode.">set_write_alpha_blender</a>,
<a class="xref" href="alleg014.html#stretch_blit" title="Scales a rectangular area from one bitmap to another.">stretch_blit</a>.</blockquote>
<div class="al-api"><b>Example <a name="extrans2">extrans2</a></b></div><br>
   This program demonstrates how to draw trans and lit sprites and flip them
   at the same time, using draw_sprite_ex() function.
   It displays several images moving around using different drawing modes
   while you can press space key to change the flipping orientation.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg013.html#clear_bitmap" title="Clears the bitmap to color 0.">clear_bitmap</a>,
<a class="xref" href="alleg009.html#create_bitmap" title="Creates a memory bitmap.">create_bitmap</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg014.html#draw_sprite_ex" title="Draws a optionally flipped/blended/tinted sprite on the bitmap.">draw_sprite_ex</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg005.html#install_timer" title="Installs the Allegro timer interrupt handler.">install_timer</a>,
<a class="xref" href="alleg006.html#key" title="Array of flags indicating key state.">key</a>,
<a class="xref" href="alleg010.html#load_bitmap" title="Loads any supported bitmap from a file.">load_bitmap</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg030.html#replace_filename" title="Replaces path+filename with a new filename tail.">replace_filename</a>,
<a class="xref" href="alleg005.html#rest" title="Waits a specified number of milliseconds or yields CPU.">rest</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_color_depth" title="Sets the global pixel color depth.">set_color_depth</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg020.html#set_trans_blender" title="Enables a truecolor blender.">set_trans_blender</a>,
<a class="xref" href="alleg014.html#stretch_blit" title="Scales a rectangular area from one bitmap to another.">stretch_blit</a>,
<a class="xref" href="alleg018.html#textprintf_ex" title="Formatted output of a string.">textprintf_ex</a>.</blockquote>
<div class="al-api"><b>Example <a name="extruec">extruec</a></b></div><br>
   This program shows how to specify colors in the various different
   truecolor pixel formats. The example shows the same screen (a few
   text lines and three coloured gradients) in all the color depth
   modes supported by your video card. The more color depth you have,
   the less banding you will see in the gradients.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg001.html#PALETTE" title="Stores palette information.">PALETTE</a>,
<a class="xref" href="alleg001.html#RGB" title="Single palette entry.">RGB</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg009.html#acquire_screen" title="Shortcut of acquire_bitmap(screen);">acquire_screen</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg013.html#clear_to_color" title="Clears the bitmap to the specified color.">clear_to_color</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg011.html#generate_332_palette" title="Constructs a fake truecolor palette.">generate_332_palette</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg006.html#key" title="Array of flags indicating key state.">key</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg006.html#readkey" title="Returns the next character from the keyboard buffer.">readkey</a>,
<a class="xref" href="alleg009.html#release_screen" title="Shortcut of release_bitmap(screen);">release_screen</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_color_depth" title="Sets the global pixel color depth.">set_color_depth</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg018.html#textout_centre_ex" title="Writes a centered string on a bitmap.">textout_centre_ex</a>,
<a class="xref" href="alleg018.html#textout_ex" title="Writes a string on a bitmap.">textout_ex</a>,
<a class="xref" href="alleg018.html#textprintf_ex" title="Formatted output of a string.">textprintf_ex</a>,
<a class="xref" href="alleg013.html#vline" title="Draws a vertical line onto the bitmap.">vline</a>.</blockquote>
<div class="al-api"><b>Example <a name="excolmap">excolmap</a></b></div><br>
   This program demonstrates how to create custom graphic effects
   with the create_color_table function. Allegro drawing routines
   are affected by any color table you might have set up. In
   the first part of this example, a greyscale color table is
   set. The result is that a simple rectfill call, instead of
   drawing a rectangle with color zero, uses the already drawn
   pixels to determine the pixel to be drawn (read the comment
   of return_grey_color() for a precise description of the
   algorithm). In the second part of the test, the color table
   is changed to be an inverse table, meaning that any pixel
   drawn will be shown as its color values had been inverted.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg001.html#COLOR_MAP" title="Stores a color map to accelerate drawing.">COLOR_MAP</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg001.html#PALETTE" title="Stores palette information.">PALETTE</a>,
<a class="xref" href="alleg001.html#RGB" title="Single palette entry.">RGB</a>,
<a class="xref" href="alleg001.html#RGB_MAP" title="Stores an rgb map to accelerate conversions.">RGB_MAP</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg013.html#circlefill" title="Draws a filled circle.">circlefill</a>,
<a class="xref" href="alleg006.html#clear_keybuf" title="Clears the keyboard buffer.">clear_keybuf</a>,
<a class="xref" href="alleg020.html#color_map" title="Global pointer to the color mapping table.">color_map</a>,
<a class="xref" href="alleg009.html#create_bitmap" title="Creates a memory bitmap.">create_bitmap</a>,
<a class="xref" href="alleg020.html#create_color_table" title="Fills a color mapping table for customised effects.">create_color_table</a>,
<a class="xref" href="alleg021.html#create_rgb_table" title="Generates an RGB mapping table with lookup data for a palette.">create_rgb_table</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg020.html#drawing_mode" title="Sets the graphics drawing mode.">drawing_mode</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg011.html#generate_332_palette" title="Constructs a fake truecolor palette.">generate_332_palette</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg006.html#keypressed" title="Tells if there are keypresses waiting in the input buffer.">keypressed</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg013.html#rectfill" title="Draws a solid filled rectangle.">rectfill</a>,
<a class="xref" href="alleg021.html#rgb_map" title="Look up table to speed up reducing RGB values to palette colors.">rgb_map</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg018.html#textout_centre_ex" title="Writes a centered string on a bitmap.">textout_centre_ex</a>,
<a class="xref" href="alleg008.html#vsync" title="Waits for a vertical retrace to begin.">vsync</a>.</blockquote>
<div class="al-api"><b>Example <a name="exrgbhsv">exrgbhsv</a></b></div><br>
   This program shows how to convert colors between the different
   color-space representations. The central area of the screen
   will display the current color. On the top left corner of the
   screen, three sliders allow you to modify the red, green and
   blue value of the color. On the bottom right corner of the
   screen, three sliders allow you to modify the hue, saturation
   and value of the color. The color bars beneath the sliders
   show what the resulting color will look like when the slider
   is dragged to that position.
   
<p>
   Additionally this example also shows how to "inherit" the
   behaviour of a GUI object and extend it, here used to create
   the sliders.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg001.html#DIALOG" title="Stores a GUI description.">DIALOG</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg001.html#PALETTE" title="Stores palette information.">PALETTE</a>,
<a class="xref" href="alleg001.html#RGB" title="Single palette entry.">RGB</a>,
<a class="xref" href="alleg001.html#RGB_MAP" title="Stores an rgb map to accelerate conversions.">RGB_MAP</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg013.html#clear_to_color" title="Clears the bitmap to the specified color.">clear_to_color</a>,
<a class="xref" href="alleg009.html#create_bitmap_ex" title="Creates a memory bitmap specifying color depth.">create_bitmap_ex</a>,
<a class="xref" href="alleg021.html#create_rgb_table" title="Generates an RGB mapping table with lookup data for a palette.">create_rgb_table</a>,
<a class="xref" href="alleg035.html#d_bitmap_proc" title="Dialog procedure drawing a bitmap.">d_bitmap_proc</a>,
<a class="xref" href="alleg035.html#d_box_proc" title="Dialog procedure drawing boxes onto the screen.">d_box_proc</a>,
<a class="xref" href="alleg035.html#d_slider_proc" title="Dialog procedure implementing a slider control object.">d_slider_proc</a>,
<a class="xref" href="alleg035.html#d_text_proc" title="Dialogs procedure drawing text onto the screen.">d_text_proc</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg035.html#do_dialog" title="Basic dialog manager function.">do_dialog</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg011.html#generate_332_palette" title="Constructs a fake truecolor palette.">generate_332_palette</a>,
<a class="xref" href="alleg008.html#get_color_depth" title="Returns the current pixel color depth.">get_color_depth</a>,
<a class="xref" href="alleg021.html#hsv_to_rgb" title="Converts color values between the HSV and RGB color spaces.">hsv_to_rgb</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg004.html#install_mouse" title="Installs the Allegro mouse handler.">install_mouse</a>,
<a class="xref" href="alleg005.html#install_timer" title="Installs the Allegro timer interrupt handler.">install_timer</a>,
<a class="xref" href="alleg006.html#key" title="Array of flags indicating key state.">key</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg012.html#makecol32" title="Converts an RGB value into a display dependent pixel format.">makecol32</a>,
<a class="xref" href="alleg012.html#makecol8" title="Converts an RGB value into a display dependent pixel format.">makecol8</a>,
<a class="xref" href="alleg035.html#object_message" title="Sends a message to an object and returns the answer.">object_message</a>,
<a class="xref" href="alleg021.html#rgb_map" title="Look up table to speed up reducing RGB values to palette colors.">rgb_map</a>,
<a class="xref" href="alleg021.html#rgb_to_hsv" title="Converts color values between the HSV and RGB color spaces.">rgb_to_hsv</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg011.html#set_color" title="Sets the specified palette entry to the specified RGB triplet.">set_color</a>,
<a class="xref" href="alleg008.html#set_color_depth" title="Sets the global pixel color depth.">set_color_depth</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg018.html#textout_ex" title="Writes a string on a bitmap.">textout_ex</a>,
<a class="xref" href="alleg013.html#vline" title="Draws a vertical line onto the bitmap.">vline</a>,
<a class="xref" href="alleg008.html#vsync" title="Waits for a vertical retrace to begin.">vsync</a>.</blockquote>
<div class="al-api"><b>Example <a name="exshade">exshade</a></b></div><br>
   This program demonstrates how to draw Gouraud shaded (lit)
   sprites.  In an apparently black screen, a planet like sprite
   is drawn close to the middle of the screen. In a similar
   way to how the first test of extrans works, you move the
   cursor on the screen with the mouse. Attached to this mouse
   you can imagine a virtual spotlight illuminating the scene
   around. Depending on where the mouse is, the Gouraud shaded
   sprite will show the direction of the light.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg001.html#COLOR_MAP" title="Stores a color map to accelerate drawing.">COLOR_MAP</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg001.html#PALETTE" title="Stores palette information.">PALETTE</a>,
<a class="xref" href="alleg001.html#RGB" title="Single palette entry.">RGB</a>,
<a class="xref" href="alleg001.html#RGB_MAP" title="Stores an rgb map to accelerate conversions.">RGB_MAP</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg013.html#clear_bitmap" title="Clears the bitmap to color 0.">clear_bitmap</a>,
<a class="xref" href="alleg020.html#color_map" title="Global pointer to the color mapping table.">color_map</a>,
<a class="xref" href="alleg009.html#create_bitmap" title="Creates a memory bitmap.">create_bitmap</a>,
<a class="xref" href="alleg020.html#create_light_table" title="Fills a color mapping table for lighting effects.">create_light_table</a>,
<a class="xref" href="alleg021.html#create_rgb_table" title="Generates an RGB mapping table with lookup data for a palette.">create_rgb_table</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg014.html#draw_gouraud_sprite" title="Draws a sprite with gouraud shading.">draw_gouraud_sprite</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg004.html#install_mouse" title="Installs the Allegro mouse handler.">install_mouse</a>,
<a class="xref" href="alleg006.html#keypressed" title="Tells if there are keypresses waiting in the input buffer.">keypressed</a>,
<a class="xref" href="alleg013.html#line" title="Draws a line onto the bitmap.">line</a>,
<a class="xref" href="alleg010.html#load_bitmap" title="Loads any supported bitmap from a file.">load_bitmap</a>,
<a class="xref" href="alleg004.html#mouse_x" title="Global variable with the mouse position/button state.">mouse_x</a>,
<a class="xref" href="alleg004.html#mouse_y" title="Global variable with the mouse position/button state.">mouse_y</a>,
<a class="xref" href="alleg012.html#palette_color" title="Maps palette indexes into the current pixel format colors.">palette_color</a>,
<a class="xref" href="alleg004.html#poll_mouse" title="Polls the mouse.">poll_mouse</a>,
<a class="xref" href="alleg030.html#replace_filename" title="Replaces path+filename with a new filename tail.">replace_filename</a>,
<a class="xref" href="alleg021.html#rgb_map" title="Look up table to speed up reducing RGB values to palette colors.">rgb_map</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg020.html#set_trans_blender" title="Enables a truecolor blender.">set_trans_blender</a>,
<a class="xref" href="alleg004.html#show_mouse" title="Tells Allegro to display a mouse pointer on the screen.">show_mouse</a>,
<a class="xref" href="alleg018.html#textout_ex" title="Writes a string on a bitmap.">textout_ex</a>.</blockquote>
<div class="al-api"><b>Example <a name="exblend">exblend</a></b></div><br>
   This program demonstrates how to use the translucency functions
   in truecolor video modes. Two image files are loaded from
   disk and displayed moving slowly around the screen. One of
   the images will be tinted to different colors. The other
   image will be faded out with a varying alpha strength, and
   drawn on top of the other image.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg001.html#PALETTE" title="Stores palette information.">PALETTE</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg013.html#circle" title="Draws a circle.">circle</a>,
<a class="xref" href="alleg013.html#clear_bitmap" title="Clears the bitmap to color 0.">clear_bitmap</a>,
<a class="xref" href="alleg006.html#clear_keybuf" title="Clears the keyboard buffer.">clear_keybuf</a>,
<a class="xref" href="alleg009.html#create_bitmap" title="Creates a memory bitmap.">create_bitmap</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg014.html#draw_lit_sprite" title="Draws a sprite tinted with a specific color.">draw_lit_sprite</a>,
<a class="xref" href="alleg014.html#draw_trans_sprite" title="Draws a sprite blending it with the destination.">draw_trans_sprite</a>,
<a class="xref" href="alleg032.html#fixcos" title="Fixed point cosine of binary angles.">fixcos</a>,
<a class="xref" href="alleg032.html#fixsin" title="Fixed point sine of binary angles.">fixsin</a>,
<a class="xref" href="alleg032.html#fixtoi" title="Converts a fixed point to integer with rounding.">fixtoi</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg005.html#install_timer" title="Installs the Allegro timer interrupt handler.">install_timer</a>,
<a class="xref" href="alleg032.html#itofix" title="Converts an integer to fixed point.">itofix</a>,
<a class="xref" href="alleg006.html#keypressed" title="Tells if there are keypresses waiting in the input buffer.">keypressed</a>,
<a class="xref" href="alleg010.html#load_bitmap" title="Loads any supported bitmap from a file.">load_bitmap</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg030.html#replace_filename" title="Replaces path+filename with a new filename tail.">replace_filename</a>,
<a class="xref" href="alleg005.html#retrace_count" title="Retrace count simulator.">retrace_count</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg010.html#set_color_conversion" title="Tells Allegro how to convert images during loading time.">set_color_conversion</a>,
<a class="xref" href="alleg008.html#set_color_depth" title="Sets the global pixel color depth.">set_color_depth</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg020.html#set_trans_blender" title="Enables a truecolor blender.">set_trans_blender</a>,
<a class="xref" href="alleg018.html#textprintf_ex" title="Formatted output of a string.">textprintf_ex</a>,
<a class="xref" href="alleg008.html#vsync" title="Waits for a vertical retrace to begin.">vsync</a>.</blockquote>
<div class="al-api"><b>Example <a name="exxfade">exxfade</a></b></div><br>
   This program demonstrates how to load and display bitmap files
   in truecolor video modes, and how to crossfade between them.
   You have to use this example from the command line to specify
   as parameters a number of graphic files. Use at least two
   files to see the graphical effect. The example will crossfade
   from one image to another with each key press until you press
   the ESC key.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg001.html#PALETTE" title="Stores palette information.">PALETTE</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_exit" title="Closes down the Allegro system.">allegro_exit</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg009.html#create_bitmap" title="Creates a memory bitmap.">create_bitmap</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg014.html#draw_trans_sprite" title="Draws a sprite blending it with the destination.">draw_trans_sprite</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg006.html#keypressed" title="Tells if there are keypresses waiting in the input buffer.">keypressed</a>,
<a class="xref" href="alleg013.html#line" title="Draws a line onto the bitmap.">line</a>,
<a class="xref" href="alleg010.html#load_bitmap" title="Loads any supported bitmap from a file.">load_bitmap</a>,
<a class="xref" href="alleg006.html#readkey" title="Returns the next character from the keyboard buffer.">readkey</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg010.html#set_color_conversion" title="Tells Allegro how to convert images during loading time.">set_color_conversion</a>,
<a class="xref" href="alleg008.html#set_color_depth" title="Sets the global pixel color depth.">set_color_depth</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg020.html#set_trans_blender" title="Enables a truecolor blender.">set_trans_blender</a>,
<a class="xref" href="alleg008.html#vsync" title="Waits for a vertical retrace to begin.">vsync</a>.</blockquote>
<div class="al-api"><b>Example <a name="exalpha">exalpha</a></b></div><br>
   This program demonstrates how to use the 32 bit RGBA
   translucency functions to store an alpha channel along with
   a bitmap graphic.  Two images are loaded from disk. One will
   be used for the background and the other as a sprite. The
   example generates an alpha channel for the sprite image,
   composing the 32 bit RGBA bitmap during runtime, and draws
   it at the position of the mouse cursor.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg006.html#clear_keybuf" title="Clears the keyboard buffer.">clear_keybuf</a>,
<a class="xref" href="alleg009.html#create_bitmap" title="Creates a memory bitmap.">create_bitmap</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg014.html#draw_trans_sprite" title="Draws a sprite blending it with the destination.">draw_trans_sprite</a>,
<a class="xref" href="alleg020.html#drawing_mode" title="Sets the graphics drawing mode.">drawing_mode</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg012.html#getb" title="Extract a color component from the current pixel format.">getb</a>,
<a class="xref" href="alleg012.html#getg" title="Extract a color component from the current pixel format.">getg</a>,
<a class="xref" href="alleg013.html#getpixel" title="Reads a pixel from a bitmap.">getpixel</a>,
<a class="xref" href="alleg012.html#getr" title="Extract a color component from the current pixel format.">getr</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg004.html#install_mouse" title="Installs the Allegro mouse handler.">install_mouse</a>,
<a class="xref" href="alleg005.html#install_timer" title="Installs the Allegro timer interrupt handler.">install_timer</a>,
<a class="xref" href="alleg006.html#keypressed" title="Tells if there are keypresses waiting in the input buffer.">keypressed</a>,
<a class="xref" href="alleg010.html#load_bitmap" title="Loads any supported bitmap from a file.">load_bitmap</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg004.html#mouse_x" title="Global variable with the mouse position/button state.">mouse_x</a>,
<a class="xref" href="alleg004.html#mouse_y" title="Global variable with the mouse position/button state.">mouse_y</a>,
<a class="xref" href="alleg013.html#putpixel" title="Writes a pixel into a bitmap.">putpixel</a>,
<a class="xref" href="alleg013.html#rectfill" title="Draws a solid filled rectangle.">rectfill</a>,
<a class="xref" href="alleg030.html#replace_filename" title="Replaces path+filename with a new filename tail.">replace_filename</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg020.html#set_alpha_blender" title="Enables a special alpha-channel blending mode.">set_alpha_blender</a>,
<a class="xref" href="alleg010.html#set_color_conversion" title="Tells Allegro how to convert images during loading time.">set_color_conversion</a>,
<a class="xref" href="alleg008.html#set_color_depth" title="Sets the global pixel color depth.">set_color_depth</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg020.html#set_multiply_blender" title="Enables a multiply blender mode.">set_multiply_blender</a>,
<a class="xref" href="alleg020.html#set_write_alpha_blender" title="Enables the special alpha-channel editing mode.">set_write_alpha_blender</a>,
<a class="xref" href="alleg020.html#solid_mode" title="Shortcut for selecting solid drawing mode.">solid_mode</a>,
<a class="xref" href="alleg014.html#stretch_blit" title="Scales a rectangular area from one bitmap to another.">stretch_blit</a>,
<a class="xref" href="alleg018.html#textprintf_ex" title="Formatted output of a string.">textprintf_ex</a>.</blockquote>
<div class="al-api"><b>Example <a name="exlights">exlights</a></b></div><br>
   This program shows one way to implement colored lighting effects
   in a hicolor video mode. Warning: it is not for the faint of heart!
   This is by no means the simplest or easiest to understand method,
   I just thought it was a cool concept that would be worth
   demonstrating.
   
<p>
   The basic approach is to select a 15 or 16 bit screen mode, but
   then draw onto 24 bit memory bitmaps. Since we only need the bottom
   5 bits of each 8 bit color in order to store 15 bit data within a
   24 bit location, we can fit a light level into the top 3 bits.
   The tricky bit is that these aren't actually 24 bit images at all:
   they are implemented as 8 bit memory bitmaps, and we just store the
   red level in one pixel, green in the next, and blue in the next,
   making the total image be three times wider than we really wanted.
   This allows us to use all the normal 256 color graphics routines
   for drawing onto our memory surfaces, most importantly the lookup
   table translucency, which can be used to combine the low 5 bits
   of color and the top 3 bits of light in a single drawing operation.
   Some trickery is needed to load 24 bit data into this fake 8 bit
   format, and of course it needs a custom routine to convert the
   resulting image while copying it across to the hardware screen.
   
<p>
   This program chugs slightly on my p133, but not significantly
   worse than any double buffering in what amounts to a 1920x640,
   256 color resolution. The light blending doesn't seem to slow
   it down too badly, so I think this technique would be quite usable
   on faster machines and in lower resolution hicolor modes. The
   biggest problem is that although you keep the full 15 bit color
   resolution, you only get 3 bits of light, ie. 8 light levels.
   You can do some nice colored light patches, but smooth gradients
   aren't going to work too well :-)


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg001.html#COLOR_MAP" title="Stores a color map to accelerate drawing.">COLOR_MAP</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg001.html#PALETTE" title="Stores palette information.">PALETTE</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg009.html#bitmap_color_depth" title="Returns the color depth of the specified bitmap.">bitmap_color_depth</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg022.html#bmp_unwrite_line" title="Direct access bank switching line release.">bmp_unwrite_line</a>,
<a class="xref" href="alleg022.html#bmp_write_line" title="Direct access bank switching line selection for writing.">bmp_write_line</a>,
<a class="xref" href="alleg013.html#circlefill" title="Draws a filled circle.">circlefill</a>,
<a class="xref" href="alleg013.html#clear_bitmap" title="Clears the bitmap to color 0.">clear_bitmap</a>,
<a class="xref" href="alleg006.html#clear_keybuf" title="Clears the keyboard buffer.">clear_keybuf</a>,
<a class="xref" href="alleg020.html#color_map" title="Global pointer to the color mapping table.">color_map</a>,
<a class="xref" href="alleg009.html#create_bitmap_ex" title="Creates a memory bitmap specifying color depth.">create_bitmap_ex</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg014.html#draw_trans_sprite" title="Draws a sprite blending it with the destination.">draw_trans_sprite</a>,
<a class="xref" href="alleg032.html#fixatan2" title="Fixed point version of the libc atan2() routine.">fixatan2</a>,
<a class="xref" href="alleg032.html#fixsqrt" title="Fixed point square root.">fixsqrt</a>,
<a class="xref" href="alleg032.html#fixtoi" title="Converts a fixed point to integer with rounding.">fixtoi</a>,
<a class="xref" href="alleg012.html#getb_depth" title="Extract a color component from a color in a specified pixel format.">getb_depth</a>,
<a class="xref" href="alleg012.html#getg_depth" title="Extract a color component from a color in a specified pixel format.">getg_depth</a>,
<a class="xref" href="alleg013.html#getpixel" title="Reads a pixel from a bitmap.">getpixel</a>,
<a class="xref" href="alleg012.html#getr_depth" title="Extract a color component from a color in a specified pixel format.">getr_depth</a>,
<a class="xref" href="alleg021.html#hsv_to_rgb" title="Converts color values between the HSV and RGB color spaces.">hsv_to_rgb</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg004.html#install_mouse" title="Installs the Allegro mouse handler.">install_mouse</a>,
<a class="xref" href="alleg005.html#install_timer" title="Installs the Allegro timer interrupt handler.">install_timer</a>,
<a class="xref" href="alleg032.html#itofix" title="Converts an integer to fixed point.">itofix</a>,
<a class="xref" href="alleg006.html#key" title="Array of flags indicating key state.">key</a>,
<a class="xref" href="alleg006.html#keypressed" title="Tells if there are keypresses waiting in the input buffer.">keypressed</a>,
<a class="xref" href="alleg013.html#line" title="Draws a line onto the bitmap.">line</a>,
<a class="xref" href="alleg010.html#load_bitmap" title="Loads any supported bitmap from a file.">load_bitmap</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg004.html#mouse_x" title="Global variable with the mouse position/button state.">mouse_x</a>,
<a class="xref" href="alleg004.html#mouse_y" title="Global variable with the mouse position/button state.">mouse_y</a>,
<a class="xref" href="alleg004.html#poll_mouse" title="Polls the mouse.">poll_mouse</a>,
<a class="xref" href="alleg030.html#replace_filename" title="Replaces path+filename with a new filename tail.">replace_filename</a>,
<a class="xref" href="alleg005.html#retrace_count" title="Retrace count simulator.">retrace_count</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg011.html#select_palette" title="Sets the internal palette for color conversion.">select_palette</a>,
<a class="xref" href="alleg010.html#set_color_conversion" title="Tells Allegro how to convert images during loading time.">set_color_conversion</a>,
<a class="xref" href="alleg008.html#set_color_depth" title="Sets the global pixel color depth.">set_color_depth</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>.</blockquote>
<div class="al-api"><b>Example <a name="ex3d">ex3d</a></b></div><br>
   This program demonstrates how to use the 3d matrix functions.
   It isn't a very elegant or efficient piece of code, but it
   does show the stuff in action. It is left to the reader as
   an exercise to design a proper model structure and rendering
   pipeline: after all, the best way to do that sort of stuff
   varies hugely from one game to another.
   
<p>
   The example first shows a screen resolution selection dialog.
   Then, a number of bouncing 3d cubes are animated. Pressing
   a key modifies the rendering of the cubes, which can be
   wireframe, the more complex transparent perspective correct
   texture mapped version, and many other.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg001.html#COLOR_MAP" title="Stores a color map to accelerate drawing.">COLOR_MAP</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg001.html#MATRIX" title="Fixed point matrix structure.">MATRIX</a>,
<a class="xref" href="alleg001.html#PALETTE" title="Stores palette information.">PALETTE</a>,
<a class="xref" href="alleg019.html#POLYTYPE_ATEX" title="Polygon rendering mode type">POLYTYPE_ATEX</a>,
<a class="xref" href="alleg019.html#POLYTYPE_ATEX_LIT" title="Polygon rendering mode type">POLYTYPE_ATEX_LIT</a>,
<a class="xref" href="alleg019.html#POLYTYPE_ATEX_MASK" title="Polygon rendering mode type">POLYTYPE_ATEX_MASK</a>,
<a class="xref" href="alleg019.html#POLYTYPE_ATEX_MASK_LIT" title="Polygon rendering mode type">POLYTYPE_ATEX_MASK_LIT</a>,
<a class="xref" href="alleg019.html#POLYTYPE_ATEX_MASK_TRANS" title="Polygon rendering mode type">POLYTYPE_ATEX_MASK_TRANS</a>,
<a class="xref" href="alleg019.html#POLYTYPE_ATEX_TRANS" title="Polygon rendering mode type">POLYTYPE_ATEX_TRANS</a>,
<a class="xref" href="alleg019.html#POLYTYPE_FLAT" title="Polygon rendering mode type">POLYTYPE_FLAT</a>,
<a class="xref" href="alleg019.html#POLYTYPE_GCOL" title="Polygon rendering mode type">POLYTYPE_GCOL</a>,
<a class="xref" href="alleg019.html#POLYTYPE_GRGB" title="Polygon rendering mode type">POLYTYPE_GRGB</a>,
<a class="xref" href="alleg019.html#POLYTYPE_PTEX" title="Polygon rendering mode type">POLYTYPE_PTEX</a>,
<a class="xref" href="alleg019.html#POLYTYPE_PTEX_LIT" title="Polygon rendering mode type">POLYTYPE_PTEX_LIT</a>,
<a class="xref" href="alleg019.html#POLYTYPE_PTEX_MASK" title="Polygon rendering mode type">POLYTYPE_PTEX_MASK</a>,
<a class="xref" href="alleg019.html#POLYTYPE_PTEX_MASK_LIT" title="Polygon rendering mode type">POLYTYPE_PTEX_MASK_LIT</a>,
<a class="xref" href="alleg019.html#POLYTYPE_PTEX_MASK_TRANS" title="Polygon rendering mode type">POLYTYPE_PTEX_MASK_TRANS</a>,
<a class="xref" href="alleg019.html#POLYTYPE_PTEX_TRANS" title="Polygon rendering mode type">POLYTYPE_PTEX_TRANS</a>,
<a class="xref" href="alleg001.html#RGB" title="Single palette entry.">RGB</a>,
<a class="xref" href="alleg001.html#RGB_MAP" title="Stores an rgb map to accelerate conversions.">RGB_MAP</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg001.html#V3D" title="Fixed point vertex structure used by 3d functions.">V3D</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_exit" title="Closes down the Allegro system.">allegro_exit</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg033.html#apply_matrix" title="Multiplies a point by a transformation matrix.">apply_matrix</a>,
<a class="xref" href="alleg009.html#bitmap_color_depth" title="Returns the color depth of the specified bitmap.">bitmap_color_depth</a>,
<a class="xref" href="alleg009.html#bitmap_mask_color" title="Returns the mask color of the specified bitmap.">bitmap_mask_color</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg013.html#clear_bitmap" title="Clears the bitmap to color 0.">clear_bitmap</a>,
<a class="xref" href="alleg013.html#clear_to_color" title="Clears the bitmap to the specified color.">clear_to_color</a>,
<a class="xref" href="alleg020.html#color_map" title="Global pointer to the color mapping table.">color_map</a>,
<a class="xref" href="alleg009.html#create_bitmap" title="Creates a memory bitmap.">create_bitmap</a>,
<a class="xref" href="alleg020.html#create_light_table" title="Fills a color mapping table for lighting effects.">create_light_table</a>,
<a class="xref" href="alleg021.html#create_rgb_table" title="Generates an RGB mapping table with lookup data for a palette.">create_rgb_table</a>,
<a class="xref" href="alleg020.html#create_trans_table" title="Fills a color mapping table for translucency effects.">create_trans_table</a>,
<a class="xref" href="alleg011.html#desktop_palette" title="The palette used by the Atari ST low resolution desktop.">desktop_palette</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg001.html#fixed" title="Fixed point integer to replace floats.">fixed</a>,
<a class="xref" href="alleg032.html#fixtoi" title="Converts a fixed point to integer with rounding.">fixtoi</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg033.html#get_transformation_matrix" title="Constructs X, Y, Z rotation matrices with an angle and scaling.">get_transformation_matrix</a>,
<a class="xref" href="alleg035.html#gfx_mode_select_ex" title="Extended version of the graphics mode selection dialog.">gfx_mode_select_ex</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg004.html#install_mouse" title="Installs the Allegro mouse handler.">install_mouse</a>,
<a class="xref" href="alleg005.html#install_timer" title="Installs the Allegro timer interrupt handler.">install_timer</a>,
<a class="xref" href="alleg032.html#itofix" title="Converts an integer to fixed point.">itofix</a>,
<a class="xref" href="alleg006.html#key" title="Array of flags indicating key state.">key</a>,
<a class="xref" href="alleg006.html#keypressed" title="Tells if there are keypresses waiting in the input buffer.">keypressed</a>,
<a class="xref" href="alleg013.html#line" title="Draws a line onto the bitmap.">line</a>,
<a class="xref" href="alleg012.html#palette_color" title="Maps palette indexes into the current pixel format colors.">palette_color</a>,
<a class="xref" href="alleg033.html#persp_project" title="Projects a 3d point into 2d screen space.">persp_project</a>,
<a class="xref" href="alleg033.html#polygon_z_normal" title="Finds the Z component of the normal vector to three vertices.">polygon_z_normal</a>,
<a class="xref" href="alleg019.html#quad3d" title="Draws a 3d quad onto the specified bitmap.">quad3d</a>,
<a class="xref" href="alleg006.html#readkey" title="Returns the next character from the keyboard buffer.">readkey</a>,
<a class="xref" href="alleg013.html#rect" title="Draws an outline rectangle.">rect</a>,
<a class="xref" href="alleg005.html#retrace_count" title="Retrace count simulator.">retrace_count</a>,
<a class="xref" href="alleg021.html#rgb_map" title="Look up table to speed up reducing RGB values to palette colors.">rgb_map</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_color_depth" title="Sets the global pixel color depth.">set_color_depth</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg033.html#set_projection_viewport" title="Sets the viewport used to scale the output of persp_project().">set_projection_viewport</a>,
<a class="xref" href="alleg020.html#set_trans_blender" title="Enables a truecolor blender.">set_trans_blender</a>,
<a class="xref" href="alleg018.html#textout_ex" title="Writes a string on a bitmap.">textout_ex</a>,
<a class="xref" href="alleg018.html#textprintf_ex" title="Formatted output of a string.">textprintf_ex</a>,
<a class="xref" href="alleg008.html#vsync" title="Waits for a vertical retrace to begin.">vsync</a>.</blockquote>
<div class="al-api"><b>Example <a name="excamera">excamera</a></b></div><br>
   This program demonstrates how to use the get_camera_matrix()
   function to view a 3d world from any position and angle. The
   example draws a checkered floor through a viewport region
   on the screen. You can use the keyboard to move around the
   camera or modify the size of the viewport. The keys that can
   be used with this example are displayed between brackets at
   the top of the screen.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg001.html#MATRIX_f" title="Floating point matrix structure.">MATRIX_f</a>,
<a class="xref" href="alleg019.html#POLYTYPE_FLAT" title="Polygon rendering mode type">POLYTYPE_FLAT</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg001.html#V3D_f" title="Floating point vertex structure used by 3d functions.">V3D_f</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg033.html#apply_matrix_f" title="Multiplies a point by a transformation matrix.">apply_matrix_f</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg013.html#clear_to_color" title="Clears the bitmap to the specified color.">clear_to_color</a>,
<a class="xref" href="alleg019.html#clip3d_f" title="Clips the polygon given in vtx using floating point math,">clip3d_f</a>,
<a class="xref" href="alleg009.html#create_bitmap" title="Creates a memory bitmap.">create_bitmap</a>,
<a class="xref" href="alleg011.html#desktop_palette" title="The palette used by the Atari ST low resolution desktop.">desktop_palette</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg033.html#get_camera_matrix_f" title="Floating point version of get_camera_matrix().">get_camera_matrix_f</a>,
<a class="xref" href="alleg033.html#get_vector_rotation_matrix_f" title="Constructs X, Y, Z rotation matrices with an angle.">get_vector_rotation_matrix_f</a>,
<a class="xref" href="alleg005.html#install_int_ex" title="Adds or modifies a timer.">install_int_ex</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg005.html#install_timer" title="Installs the Allegro timer interrupt handler.">install_timer</a>,
<a class="xref" href="alleg006.html#key" title="Array of flags indicating key state.">key</a>,
<a class="xref" href="alleg006.html#key_shifts" title="Bitmask containing the current state of modifier keys.">key_shifts</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg033.html#persp_project_f" title="Projects a 3d point into 2d screen space.">persp_project_f</a>,
<a class="xref" href="alleg006.html#poll_keyboard" title="Polls the keyboard.">poll_keyboard</a>,
<a class="xref" href="alleg013.html#polygon" title="Draws a filled polygon.">polygon</a>,
<a class="xref" href="alleg019.html#polygon3d_f" title="Draws a 3d polygon onto the specified bitmap.">polygon3d_f</a>,
<a class="xref" href="alleg013.html#rect" title="Draws an outline rectangle.">rect</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg009.html#set_clip_rect" title="Sets the clipping rectangle of a bitmap.">set_clip_rect</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg033.html#set_projection_viewport" title="Sets the viewport used to scale the output of persp_project().">set_projection_viewport</a>,
<a class="xref" href="alleg018.html#textprintf_ex" title="Formatted output of a string.">textprintf_ex</a>,
<a class="xref" href="alleg008.html#vsync" title="Waits for a vertical retrace to begin.">vsync</a>.</blockquote>
<div class="al-api"><b>Example <a name="exquat">exquat</a></b></div><br>
   Euler angles are convenient for storing and creating 3D orientations.
   However, this program demonstrates that they are not good when
   interpolating between two different orientations. The problem is
   solved by using Allegro's quaternion operations.
   
<p>
   In this program, two cubes are rotated between random orientations.
   Notice that although they have the same beginning and ending
   orientations, they do not follow the same path between orientations.
   
<p>
   One cube is being rotated by directly incrementing or decrementing
   the Euler angles from the starting point to the ending point.
   This is an intuitive notion, but it is incorrect because it does not
   cause the object to turn around a single unchanging axis of rotation.
   The axis of rotation wobbles resulting in the object spinning in
   strange ways. The object will eventually end up in the orientation
   that the user intended, but it gets there in a way that is unattractive.
   Imagine if this method was used to update the position of a camera in a
   game! Sometimes it would swing wildly and disorient the player.
   
<p>
   The other cube is animated using quaternions. This results in a much
   more pleasing animation because the cube turns around a single axis
   of rotation.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg001.html#MATRIX_f" title="Floating point matrix structure.">MATRIX_f</a>,
<a class="xref" href="alleg001.html#QUAT" title="Stores quaternion information.">QUAT</a>,
<a class="xref" href="alleg009.html#acquire_bitmap" title="Locks the bitmap before drawing onto it.">acquire_bitmap</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg033.html#apply_matrix_f" title="Multiplies a point by a transformation matrix.">apply_matrix_f</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg013.html#circle" title="Draws a circle.">circle</a>,
<a class="xref" href="alleg006.html#clear_keybuf" title="Clears the keyboard buffer.">clear_keybuf</a>,
<a class="xref" href="alleg013.html#clear_to_color" title="Clears the bitmap to the specified color.">clear_to_color</a>,
<a class="xref" href="alleg009.html#create_bitmap" title="Creates a memory bitmap.">create_bitmap</a>,
<a class="xref" href="alleg011.html#desktop_palette" title="The palette used by the Atari ST low resolution desktop.">desktop_palette</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg033.html#get_camera_matrix_f" title="Floating point version of get_camera_matrix().">get_camera_matrix_f</a>,
<a class="xref" href="alleg033.html#get_rotation_matrix" title="Constructs X, Y, Z rotation matrices.">get_rotation_matrix</a>,
<a class="xref" href="alleg033.html#get_rotation_matrix_f" title="Constructs X, Y, Z rotation matrices.">get_rotation_matrix_f</a>,
<a class="xref" href="alleg034.html#get_rotation_quat" title="Constructs a quaternion to rotate points around all three axes.">get_rotation_quat</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg006.html#keypressed" title="Tells if there are keypresses waiting in the input buffer.">keypressed</a>,
<a class="xref" href="alleg013.html#line" title="Draws a line onto the bitmap.">line</a>,
<a class="xref" href="alleg033.html#matrix_mul_f" title="Multiplies two matrices.">matrix_mul_f</a>,
<a class="xref" href="alleg012.html#palette_color" title="Maps palette indexes into the current pixel format colors.">palette_color</a>,
<a class="xref" href="alleg033.html#persp_project_f" title="Projects a 3d point into 2d screen space.">persp_project_f</a>,
<a class="xref" href="alleg034.html#quat_interpolate" title="Constructs a quaternion representing a rotation between from and to.">quat_interpolate</a>,
<a class="xref" href="alleg034.html#quat_to_matrix" title="Constructs a rotation matrix from a quaternion.">quat_to_matrix</a>,
<a class="xref" href="alleg006.html#readkey" title="Returns the next character from the keyboard buffer.">readkey</a>,
<a class="xref" href="alleg009.html#release_bitmap" title="Releases a previously locked bitmap.">release_bitmap</a>,
<a class="xref" href="alleg005.html#rest" title="Waits a specified number of milliseconds or yields CPU.">rest</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg033.html#set_projection_viewport" title="Sets the viewport used to scale the output of persp_project().">set_projection_viewport</a>,
<a class="xref" href="alleg018.html#textout_ex" title="Writes a string on a bitmap.">textout_ex</a>.</blockquote>
<div class="al-api"><b>Example <a name="exstars">exstars</a></b></div><br>
   This program draws a 3D star field (depth-cued) and a polygon
   starship (controllable with the keyboard cursor keys), using
   the Allegro math functions.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg001.html#MATRIX" title="Fixed point matrix structure.">MATRIX</a>,
<a class="xref" href="alleg001.html#PALETTE" title="Stores palette information.">PALETTE</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg033.html#apply_matrix" title="Multiplies a point by a transformation matrix.">apply_matrix</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg013.html#clear_bitmap" title="Clears the bitmap to color 0.">clear_bitmap</a>,
<a class="xref" href="alleg009.html#create_bitmap" title="Creates a memory bitmap.">create_bitmap</a>,
<a class="xref" href="alleg033.html#cross_product" title="Calculates the cross product.">cross_product</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg033.html#dot_product" title="Calculates the dot product.">dot_product</a>,
<a class="xref" href="alleg001.html#fixed" title="Fixed point integer to replace floats.">fixed</a>,
<a class="xref" href="alleg032.html#fixmul" title="Multiplies two fixed point values together.">fixmul</a>,
<a class="xref" href="alleg032.html#fixtof" title="Converts a fixed point to floating point.">fixtof</a>,
<a class="xref" href="alleg032.html#fixtoi" title="Converts a fixed point to integer with rounding.">fixtoi</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg033.html#get_rotation_matrix" title="Constructs X, Y, Z rotation matrices.">get_rotation_matrix</a>,
<a class="xref" href="alleg033.html#get_transformation_matrix" title="Constructs X, Y, Z rotation matrices with an angle and scaling.">get_transformation_matrix</a>,
<a class="xref" href="alleg033.html#get_translation_matrix" title="Constructs a translation matrix.">get_translation_matrix</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg005.html#install_timer" title="Installs the Allegro timer interrupt handler.">install_timer</a>,
<a class="xref" href="alleg032.html#itofix" title="Converts an integer to fixed point.">itofix</a>,
<a class="xref" href="alleg006.html#key" title="Array of flags indicating key state.">key</a>,
<a class="xref" href="alleg033.html#normalize_vector" title="Converts the vector to a unit vector.">normalize_vector</a>,
<a class="xref" href="alleg012.html#palette_color" title="Maps palette indexes into the current pixel format colors.">palette_color</a>,
<a class="xref" href="alleg033.html#persp_project" title="Projects a 3d point into 2d screen space.">persp_project</a>,
<a class="xref" href="alleg006.html#poll_keyboard" title="Polls the keyboard.">poll_keyboard</a>,
<a class="xref" href="alleg013.html#putpixel" title="Writes a pixel into a bitmap.">putpixel</a>,
<a class="xref" href="alleg013.html#rectfill" title="Draws a solid filled rectangle.">rectfill</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg033.html#set_projection_viewport" title="Sets the viewport used to scale the output of persp_project().">set_projection_viewport</a>,
<a class="xref" href="alleg018.html#textout_centre_ex" title="Writes a centered string on a bitmap.">textout_centre_ex</a>,
<a class="xref" href="alleg018.html#textprintf_centre_ex" title="Formatted centered output of a string.">textprintf_centre_ex</a>,
<a class="xref" href="alleg013.html#triangle" title="Draws a filled triangle.">triangle</a>,
<a class="xref" href="alleg008.html#vsync" title="Waits for a vertical retrace to begin.">vsync</a>.</blockquote>
<div class="al-api"><b>Example <a name="exscn3d">exscn3d</a></b></div><br>
   This program demonstrates how to use scanline sorting algorithm
   in Allegro (create_scene, clear_scene, ... functions). It
   also provides an example of how to use the 3D clipping
   function. The example consists of a flyby through a lot of
   rotating 3d cubes.
   


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg005.html#END_OF_FUNCTION" title="Locks the code used by a timer.">END_OF_FUNCTION</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg005.html#LOCK_FUNCTION" title="Locks the memory of a function used by a timer.">LOCK_FUNCTION</a>,
<a class="xref" href="alleg005.html#LOCK_VARIABLE" title="Locks the memory of a variable used by a timer.">LOCK_VARIABLE</a>,
<a class="xref" href="alleg001.html#MATRIX_f" title="Floating point matrix structure.">MATRIX_f</a>,
<a class="xref" href="alleg001.html#PALETTE" title="Stores palette information.">PALETTE</a>,
<a class="xref" href="alleg019.html#POLYTYPE_GCOL" title="Polygon rendering mode type">POLYTYPE_GCOL</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg001.html#V3D_f" title="Floating point vertex structure used by 3d functions.">V3D_f</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_exit" title="Closes down the Allegro system.">allegro_exit</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg033.html#apply_matrix_f" title="Multiplies a point by a transformation matrix.">apply_matrix_f</a>,
<a class="xref" href="alleg009.html#bitmap_color_depth" title="Returns the color depth of the specified bitmap.">bitmap_color_depth</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg013.html#clear_bitmap" title="Clears the bitmap to color 0.">clear_bitmap</a>,
<a class="xref" href="alleg019.html#clear_scene" title="Initializes a scene.">clear_scene</a>,
<a class="xref" href="alleg019.html#clip3d_f" title="Clips the polygon given in vtx using floating point math,">clip3d_f</a>,
<a class="xref" href="alleg009.html#create_bitmap" title="Creates a memory bitmap.">create_bitmap</a>,
<a class="xref" href="alleg019.html#create_scene" title="Allocates memory for a 3d scene.">create_scene</a>,
<a class="xref" href="alleg011.html#desktop_palette" title="The palette used by the Atari ST low resolution desktop.">desktop_palette</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg019.html#destroy_scene" title="Deallocates the memory used by a scene.">destroy_scene</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg033.html#get_rotation_matrix_f" title="Constructs X, Y, Z rotation matrices.">get_rotation_matrix_f</a>,
<a class="xref" href="alleg033.html#get_translation_matrix_f" title="Constructs a translation matrix.">get_translation_matrix_f</a>,
<a class="xref" href="alleg035.html#gfx_mode_select_ex" title="Extended version of the graphics mode selection dialog.">gfx_mode_select_ex</a>,
<a class="xref" href="alleg005.html#install_int" title="Installs a user timer handler.">install_int</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg004.html#install_mouse" title="Installs the Allegro mouse handler.">install_mouse</a>,
<a class="xref" href="alleg005.html#install_timer" title="Installs the Allegro timer interrupt handler.">install_timer</a>,
<a class="xref" href="alleg006.html#key" title="Array of flags indicating key state.">key</a>,
<a class="xref" href="alleg033.html#matrix_mul_f" title="Multiplies two matrices.">matrix_mul_f</a>,
<a class="xref" href="alleg012.html#palette_color" title="Maps palette indexes into the current pixel format colors.">palette_color</a>,
<a class="xref" href="alleg033.html#persp_project_f" title="Projects a 3d point into 2d screen space.">persp_project_f</a>,
<a class="xref" href="alleg033.html#polygon_z_normal_f" title="Finds the Z component of the normal vector to three vertices.">polygon_z_normal_f</a>,
<a class="xref" href="alleg019.html#render_scene" title="Renders all the queued scene polygons.">render_scene</a>,
<a class="xref" href="alleg019.html#scene_polygon3d_f" title="Puts a polygon in the scene rendering list.">scene_polygon3d_f</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_color_depth" title="Sets the global pixel color depth.">set_color_depth</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg033.html#set_projection_viewport" title="Sets the viewport used to scale the output of persp_project().">set_projection_viewport</a>,
<a class="xref" href="alleg018.html#textprintf_ex" title="Formatted output of a string.">textprintf_ex</a>.</blockquote>
<div class="al-api"><b>Example <a name="exzbuf">exzbuf</a></b></div><br>
   This program demonstrates how to use Z-buffered polygons and
   floating point 3D math routines. It also provides a simple
   way to compute fps (frames per second) using a timer. After
   selecting a screen resolution through the standard GUI dialog,
   the example shows two 3D cubes rotating and intersecting each
   other. Rather than having full polygons incorrectly overlap
   other polygons due to per-polygon sorting, each pixel is drawn
   at the correct depth.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg005.html#END_OF_FUNCTION" title="Locks the code used by a timer.">END_OF_FUNCTION</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg005.html#LOCK_FUNCTION" title="Locks the memory of a function used by a timer.">LOCK_FUNCTION</a>,
<a class="xref" href="alleg005.html#LOCK_VARIABLE" title="Locks the memory of a variable used by a timer.">LOCK_VARIABLE</a>,
<a class="xref" href="alleg001.html#MATRIX_f" title="Floating point matrix structure.">MATRIX_f</a>,
<a class="xref" href="alleg001.html#PALETTE" title="Stores palette information.">PALETTE</a>,
<a class="xref" href="alleg019.html#POLYTYPE_GCOL" title="Polygon rendering mode type">POLYTYPE_GCOL</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg001.html#V3D_f" title="Floating point vertex structure used by 3d functions.">V3D_f</a>,
<a class="xref" href="alleg001.html#ZBUFFER" title="Stores 3d zbuffer information.">ZBUFFER</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_exit" title="Closes down the Allegro system.">allegro_exit</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg033.html#apply_matrix_f" title="Multiplies a point by a transformation matrix.">apply_matrix_f</a>,
<a class="xref" href="alleg009.html#bitmap_color_depth" title="Returns the color depth of the specified bitmap.">bitmap_color_depth</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg013.html#clear_bitmap" title="Clears the bitmap to color 0.">clear_bitmap</a>,
<a class="xref" href="alleg019.html#clear_zbuffer" title="Writes a depth value into the given Z-buffer.">clear_zbuffer</a>,
<a class="xref" href="alleg009.html#create_bitmap" title="Creates a memory bitmap.">create_bitmap</a>,
<a class="xref" href="alleg019.html#create_zbuffer" title="Creates a Z-buffer for a bitmap.">create_zbuffer</a>,
<a class="xref" href="alleg011.html#desktop_palette" title="The palette used by the Atari ST low resolution desktop.">desktop_palette</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg019.html#destroy_zbuffer" title="Destroys a Z-buffer.">destroy_zbuffer</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg033.html#get_transformation_matrix_f" title="Floating point version of get_transformation_matrix().">get_transformation_matrix_f</a>,
<a class="xref" href="alleg035.html#gfx_mode_select_ex" title="Extended version of the graphics mode selection dialog.">gfx_mode_select_ex</a>,
<a class="xref" href="alleg005.html#install_int" title="Installs a user timer handler.">install_int</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg004.html#install_mouse" title="Installs the Allegro mouse handler.">install_mouse</a>,
<a class="xref" href="alleg005.html#install_timer" title="Installs the Allegro timer interrupt handler.">install_timer</a>,
<a class="xref" href="alleg006.html#keypressed" title="Tells if there are keypresses waiting in the input buffer.">keypressed</a>,
<a class="xref" href="alleg012.html#palette_color" title="Maps palette indexes into the current pixel format colors.">palette_color</a>,
<a class="xref" href="alleg033.html#persp_project_f" title="Projects a 3d point into 2d screen space.">persp_project_f</a>,
<a class="xref" href="alleg033.html#polygon_z_normal_f" title="Finds the Z component of the normal vector to three vertices.">polygon_z_normal_f</a>,
<a class="xref" href="alleg019.html#quad3d_f" title="Draws a 3d quad onto the specified bitmap.">quad3d_f</a>,
<a class="xref" href="alleg006.html#readkey" title="Returns the next character from the keyboard buffer.">readkey</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_color_depth" title="Sets the global pixel color depth.">set_color_depth</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg011.html#set_palette_range" title="Sets a specific range of the palette.">set_palette_range</a>,
<a class="xref" href="alleg033.html#set_projection_viewport" title="Sets the viewport used to scale the output of persp_project().">set_projection_viewport</a>,
<a class="xref" href="alleg019.html#set_zbuffer" title="Makes the given Z-buffer the active one.">set_zbuffer</a>,
<a class="xref" href="alleg018.html#textprintf_ex" title="Formatted output of a string.">textprintf_ex</a>,
<a class="xref" href="alleg008.html#vsync" title="Waits for a vertical retrace to begin.">vsync</a>.</blockquote>
<div class="al-api"><b>Example <a name="exscroll">exscroll</a></b></div><br>
   This program demonstrates how to use hardware scrolling.
   The scrolling should work on anything that supports virtual
   screens larger than the physical screen.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg001.html#RGB" title="Single palette entry.">RGB</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg009.html#acquire_bitmap" title="Locks the bitmap before drawing onto it.">acquire_bitmap</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg006.html#clear_keybuf" title="Clears the keyboard buffer.">clear_keybuf</a>,
<a class="xref" href="alleg009.html#create_sub_bitmap" title="Creates a memory sub bitmap.">create_sub_bitmap</a>,
<a class="xref" href="alleg011.html#desktop_palette" title="The palette used by the Atari ST low resolution desktop.">desktop_palette</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg006.html#keypressed" title="Tells if there are keypresses waiting in the input buffer.">keypressed</a>,
<a class="xref" href="alleg013.html#rectfill" title="Draws a solid filled rectangle.">rectfill</a>,
<a class="xref" href="alleg009.html#release_bitmap" title="Releases a previously locked bitmap.">release_bitmap</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#scroll_screen" title="Requests a hardware scroll request.">scroll_screen</a>,
<a class="xref" href="alleg011.html#set_color" title="Sets the specified palette entry to the specified RGB triplet.">set_color</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg013.html#vline" title="Draws a vertical line onto the bitmap.">vline</a>.</blockquote>
<div class="al-api"><b>Example <a name="ex3buf">ex3buf</a></b></div><br>
   This program demonstrates the use of triple buffering. Several
   triangles are displayed rotating and bouncing on the screen
   until you press a key. Note that on some platforms you
   can't get real hardware triple buffering.  The Allegro code
   remains the same, but most likely the graphic driver will
   emulate it. Unfortunately, in these cases you can't expect
   the animation to be completely smooth and flicker free.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg009.html#acquire_bitmap" title="Locks the bitmap before drawing onto it.">acquire_bitmap</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg013.html#clear_bitmap" title="Clears the bitmap to color 0.">clear_bitmap</a>,
<a class="xref" href="alleg006.html#clear_keybuf" title="Clears the keyboard buffer.">clear_keybuf</a>,
<a class="xref" href="alleg009.html#create_video_bitmap" title="Creates a video memory bitmap.">create_video_bitmap</a>,
<a class="xref" href="alleg011.html#desktop_palette" title="The palette used by the Atari ST low resolution desktop.">desktop_palette</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg008.html#enable_triple_buffer" title="Enables triple buffering.">enable_triple_buffer</a>,
<a class="xref" href="alleg032.html#fixcos" title="Fixed point cosine of binary angles.">fixcos</a>,
<a class="xref" href="alleg001.html#fixed" title="Fixed point integer to replace floats.">fixed</a>,
<a class="xref" href="alleg032.html#fixmul" title="Multiplies two fixed point values together.">fixmul</a>,
<a class="xref" href="alleg032.html#fixsin" title="Fixed point sine of binary angles.">fixsin</a>,
<a class="xref" href="alleg032.html#fixtoi" title="Converts a fixed point to integer with rounding.">fixtoi</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg008.html#gfx_capabilities" title="Bitfield describing video hardware capabilities.">gfx_capabilities</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg004.html#install_mouse" title="Installs the Allegro mouse handler.">install_mouse</a>,
<a class="xref" href="alleg005.html#install_timer" title="Installs the Allegro timer interrupt handler.">install_timer</a>,
<a class="xref" href="alleg032.html#itofix" title="Converts an integer to fixed point.">itofix</a>,
<a class="xref" href="alleg006.html#keypressed" title="Tells if there are keypresses waiting in the input buffer.">keypressed</a>,
<a class="xref" href="alleg008.html#poll_scroll" title="Checks the status of a scroll request with triple buffering.">poll_scroll</a>,
<a class="xref" href="alleg009.html#release_bitmap" title="Releases a previously locked bitmap.">release_bitmap</a>,
<a class="xref" href="alleg008.html#request_video_bitmap" title="Triple buffering page flip request.">request_video_bitmap</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg018.html#textout_ex" title="Writes a string on a bitmap.">textout_ex</a>,
<a class="xref" href="alleg013.html#triangle" title="Draws a filled triangle.">triangle</a>,
<a class="xref" href="alleg002.html#ustrzcpy" title="Copies a string into another one, specifying size.">ustrzcpy</a>.</blockquote>
<div class="al-api"><b>Example <a name="ex12bit">ex12bit</a></b></div><br>
   This program sets up a 12-bit mode on any 8-bit card, by
   setting up a 256-colour palette that will fool the eye into
   grouping two 8-bit pixels into one 12-bit pixel. In order
   to do this, you make your 256-colour palette with all the
   combinations of blue and green, assuming green ranges from 0-15
   and blue from 0-14. This takes up 16x15=240 colours. This
   leaves 16 colours to use as red (red ranges from 0-15).
   Then you put your green/blue in one pixel, and your red in
   the pixel next to it. The eye gets fooled into thinking it's
   all one pixel.
   
<p>
   The example starts setting a normal 256 color mode, and
   construct a special palette for it. But then comes the trick:
   you need to write to a set of two adjacent pixels to form a
   single 12 bit dot. Two eight bit pixels is the same as one 16
   bit pixel, so after setting the video mode you need to hack
   the screen bitmap about, halving the width and changing it
   to use the 16 bit drawing code. Then, once you have packed a
   color into the correct format (using the makecol12() function
   below), any of the normal Allegro drawing functions can be
   used with this 12 bit display!
   
<p>
   Things to note:
   
<p>
   <ul><li>The horizontal width is halved, so you get resolutions
   like 320x480, 400x600, and 512x768.
   
   <li>Because each dot is spread over two actual pixels, the
   display will be darker than in a normal video mode.
   
   <li>Any bitmap data will obviously need converting to the
   correct 12 bit format: regular 15 or 16 bit images won't
   display correctly...
   
   <li>Although this works like a truecolor mode, it is
   actually using a 256 color palette, so palette fades are
   still possible!
   
   <li>This code only works in linear screen modes (don't try
   Mode-X).</ul>


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg001.html#MATRIX" title="Fixed point matrix structure.">MATRIX</a>,
<a class="xref" href="alleg001.html#PALETTE" title="Stores palette information.">PALETTE</a>,
<a class="xref" href="alleg001.html#RGB" title="Single palette entry.">RGB</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg033.html#apply_matrix" title="Multiplies a point by a transformation matrix.">apply_matrix</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg013.html#circle" title="Draws a circle.">circle</a>,
<a class="xref" href="alleg013.html#clear_bitmap" title="Clears the bitmap to color 0.">clear_bitmap</a>,
<a class="xref" href="alleg006.html#clear_keybuf" title="Clears the keyboard buffer.">clear_keybuf</a>,
<a class="xref" href="alleg013.html#clear_to_color" title="Clears the bitmap to the specified color.">clear_to_color</a>,
<a class="xref" href="alleg009.html#create_bitmap" title="Creates a memory bitmap.">create_bitmap</a>,
<a class="xref" href="alleg009.html#create_bitmap_ex" title="Creates a memory bitmap specifying color depth.">create_bitmap_ex</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg013.html#ellipsefill" title="Draws a filled ellipse.">ellipsefill</a>,
<a class="xref" href="alleg011.html#fade_out" title="Gradually fades the palette to black.">fade_out</a>,
<a class="xref" href="alleg032.html#fixcos" title="Fixed point cosine of binary angles.">fixcos</a>,
<a class="xref" href="alleg001.html#fixed" title="Fixed point integer to replace floats.">fixed</a>,
<a class="xref" href="alleg032.html#fixsin" title="Fixed point sine of binary angles.">fixsin</a>,
<a class="xref" href="alleg032.html#fixtoi" title="Converts a fixed point to integer with rounding.">fixtoi</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg033.html#get_rotation_matrix" title="Constructs X, Y, Z rotation matrices.">get_rotation_matrix</a>,
<a class="xref" href="alleg013.html#getpixel" title="Reads a pixel from a bitmap.">getpixel</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg032.html#itofix" title="Converts an integer to fixed point.">itofix</a>,
<a class="xref" href="alleg006.html#keypressed" title="Tells if there are keypresses waiting in the input buffer.">keypressed</a>,
<a class="xref" href="alleg013.html#line" title="Draws a line onto the bitmap.">line</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg014.html#masked_blit" title="Copies a rectangle skipping pixels with the mask color.">masked_blit</a>,
<a class="xref" href="alleg013.html#putpixel" title="Writes a pixel into a bitmap.">putpixel</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg009.html#set_clip_rect" title="Sets the clipping rectangle of a bitmap.">set_clip_rect</a>,
<a class="xref" href="alleg011.html#set_color" title="Sets the specified palette entry to the specified RGB triplet.">set_color</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg018.html#text_height" title="Returns the height of a font in pixels.">text_height</a>,
<a class="xref" href="alleg018.html#text_length" title="Returns the length of a string in pixels.">text_length</a>,
<a class="xref" href="alleg018.html#textout_ex" title="Writes a string on a bitmap.">textout_ex</a>,
<a class="xref" href="alleg018.html#textprintf_ex" title="Formatted output of a string.">textprintf_ex</a>.</blockquote>
<div class="al-api"><b>Example <a name="exaccel">exaccel</a></b></div><br>
   This program demonstrates how to use an offscreen part of
   the video memory to store source graphics for a hardware
   accelerated graphics driver. The example loads the <tt>`mysha.pcx'</tt>
   file and then blits it several times on the screen. Depending
   on whether you have enough video memory and Allegro supports
   the hardware acceleration features of your card, your success
   running this example may be none at all, sluggish performance
   due to software emulation, or flicker free smooth hardware
   accelerated animation.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg001.html#PALETTE" title="Stores palette information.">PALETTE</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg009.html#acquire_bitmap" title="Locks the bitmap before drawing onto it.">acquire_bitmap</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg013.html#clear_bitmap" title="Clears the bitmap to color 0.">clear_bitmap</a>,
<a class="xref" href="alleg009.html#create_video_bitmap" title="Creates a video memory bitmap.">create_video_bitmap</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg008.html#gfx_capabilities" title="Bitfield describing video hardware capabilities.">gfx_capabilities</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg005.html#install_timer" title="Installs the Allegro timer interrupt handler.">install_timer</a>,
<a class="xref" href="alleg006.html#keypressed" title="Tells if there are keypresses waiting in the input buffer.">keypressed</a>,
<a class="xref" href="alleg010.html#load_bitmap" title="Loads any supported bitmap from a file.">load_bitmap</a>,
<a class="xref" href="alleg006.html#readkey" title="Returns the next character from the keyboard buffer.">readkey</a>,
<a class="xref" href="alleg009.html#release_bitmap" title="Releases a previously locked bitmap.">release_bitmap</a>,
<a class="xref" href="alleg030.html#replace_filename" title="Replaces path+filename with a new filename tail.">replace_filename</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg008.html#show_video_bitmap" title="Flips the hardware screen to use the specified page.">show_video_bitmap</a>,
<a class="xref" href="alleg018.html#textout_ex" title="Writes a string on a bitmap.">textout_ex</a>,
<a class="xref" href="alleg018.html#textprintf_ex" title="Formatted output of a string.">textprintf_ex</a>.</blockquote>
<div class="al-api"><b>Example <a name="exspline">exspline</a></b></div><br>
   This program demonstrates the use of spline curves to create smooth
   paths connecting a number of node points. This can be useful for
   constructing realistic motion and animations.
   
<p>
   The technique is to connect the series of guide points p1..p(n) with
   spline curves from p1-p2, p2-p3, etc. Each spline must pass though
   both of its guide points, so they must be used as the first and fourth
   of the spline control points. The fun bit is coming up with sensible
   values for the second and third spline control points, such that the
   spline segments will have equal gradients where they meet. I came
   up with the following solution:
   
<p>
   For each guide point p(n), calculate the desired tangent to the curve
   at that point. I took this to be the vector p(n-1) -> p(n+1), which
   can easily be calculated with the inverse tangent function, and gives
   decent looking results. One implication of this is that two dummy
   guide points are needed at each end of the curve, which are used in
   the tangent calculations but not connected to the set of splines.
   
<p>
   Having got these tangents, it becomes fairly easy to calculate the
   spline control points. For a spline between guide points p(a) and
   p(b), the second control point should lie along the positive tangent
   from p(a), and the third control point should lie along the negative
   tangent from p(b). How far they are placed along these tangents
   controls the shape of the curve: I found that applying a 'curviness'
   scaling factor to the distance between p(a) and p(b) works well.
   
<p>
   One thing to note about splines is that the generated points are
   not all equidistant. Instead they tend to bunch up nearer to the
   ends of the spline, which means you will need to apply some fudges
   to get an object to move at a constant speed. On the other hand,
   in situations where the curve has a noticeable change of direction
   at each guide point, the effect can be quite nice because it makes
   the object slow down for the curve.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg009.html#acquire_screen" title="Shortcut of acquire_bitmap(screen);">acquire_screen</a>,
<a class="xref" href="alleg035.html#alert" title="Displays a popup alert box.">alert</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg013.html#calc_spline" title="Calculates a series of values along a Bezier spline.">calc_spline</a>,
<a class="xref" href="alleg013.html#circlefill" title="Draws a filled circle.">circlefill</a>,
<a class="xref" href="alleg006.html#clear_keybuf" title="Clears the keyboard buffer.">clear_keybuf</a>,
<a class="xref" href="alleg013.html#clear_to_color" title="Clears the bitmap to the specified color.">clear_to_color</a>,
<a class="xref" href="alleg011.html#desktop_palette" title="The palette used by the Atari ST low resolution desktop.">desktop_palette</a>,
<a class="xref" href="alleg032.html#fixatan2" title="Fixed point version of the libc atan2() routine.">fixatan2</a>,
<a class="xref" href="alleg032.html#fixcos" title="Fixed point cosine of binary angles.">fixcos</a>,
<a class="xref" href="alleg001.html#fixed" title="Fixed point integer to replace floats.">fixed</a>,
<a class="xref" href="alleg032.html#fixmul" title="Multiplies two fixed point values together.">fixmul</a>,
<a class="xref" href="alleg032.html#fixsin" title="Fixed point sine of binary angles.">fixsin</a>,
<a class="xref" href="alleg032.html#fixsqrt" title="Fixed point square root.">fixsqrt</a>,
<a class="xref" href="alleg032.html#fixtof" title="Converts a fixed point to floating point.">fixtof</a>,
<a class="xref" href="alleg032.html#fixtoi" title="Converts a fixed point to integer with rounding.">fixtoi</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg032.html#ftofix" title="Converts a floating point value to fixed point.">ftofix</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg004.html#install_mouse" title="Installs the Allegro mouse handler.">install_mouse</a>,
<a class="xref" href="alleg005.html#install_timer" title="Installs the Allegro timer interrupt handler.">install_timer</a>,
<a class="xref" href="alleg032.html#itofix" title="Converts an integer to fixed point.">itofix</a>,
<a class="xref" href="alleg006.html#key" title="Array of flags indicating key state.">key</a>,
<a class="xref" href="alleg006.html#keypressed" title="Tells if there are keypresses waiting in the input buffer.">keypressed</a>,
<a class="xref" href="alleg013.html#line" title="Draws a line onto the bitmap.">line</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg004.html#mouse_b" title="Global variable with the mouse position/button state.">mouse_b</a>,
<a class="xref" href="alleg004.html#mouse_x" title="Global variable with the mouse position/button state.">mouse_x</a>,
<a class="xref" href="alleg004.html#mouse_y" title="Global variable with the mouse position/button state.">mouse_y</a>,
<a class="xref" href="alleg012.html#palette_color" title="Maps palette indexes into the current pixel format colors.">palette_color</a>,
<a class="xref" href="alleg004.html#poll_mouse" title="Polls the mouse.">poll_mouse</a>,
<a class="xref" href="alleg006.html#readkey" title="Returns the next character from the keyboard buffer.">readkey</a>,
<a class="xref" href="alleg009.html#release_screen" title="Shortcut of release_bitmap(screen);">release_screen</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg004.html#show_mouse" title="Tells Allegro to display a mouse pointer on the screen.">show_mouse</a>,
<a class="xref" href="alleg013.html#spline" title="Draws a Bezier spline using four control points.">spline</a>,
<a class="xref" href="alleg018.html#textout_centre_ex" title="Writes a centered string on a bitmap.">textout_centre_ex</a>,
<a class="xref" href="alleg018.html#textprintf_centre_ex" title="Formatted centered output of a string.">textprintf_centre_ex</a>,
<a class="xref" href="alleg018.html#textprintf_ex" title="Formatted output of a string.">textprintf_ex</a>,
<a class="xref" href="alleg008.html#vsync" title="Waits for a vertical retrace to begin.">vsync</a>,
<a class="xref" href="alleg020.html#xor_mode" title="Shortcut for toggling xor drawing mode on and off.">xor_mode</a>.</blockquote>
<div class="al-api"><b>Example <a name="exsyscur">exsyscur</a></b></div><br>
   This program demonstrates the use of hardware accelerated mouse cursors.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg013.html#clear_to_color" title="Clears the bitmap to the specified color.">clear_to_color</a>,
<a class="xref" href="alleg004.html#enable_hardware_cursor" title="Enables the OS hardware cursor.">enable_hardware_cursor</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg008.html#gfx_capabilities" title="Bitfield describing video hardware capabilities.">gfx_capabilities</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg004.html#install_mouse" title="Installs the Allegro mouse handler.">install_mouse</a>,
<a class="xref" href="alleg005.html#install_timer" title="Installs the Allegro timer interrupt handler.">install_timer</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg006.html#readkey" title="Returns the next character from the keyboard buffer.">readkey</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg004.html#select_mouse_cursor" title="Tells Allegro to select software or hardware cursor drawing.">select_mouse_cursor</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg004.html#show_mouse" title="Tells Allegro to display a mouse pointer on the screen.">show_mouse</a>,
<a class="xref" href="alleg018.html#text_height" title="Returns the height of a font in pixels.">text_height</a>,
<a class="xref" href="alleg018.html#textprintf_centre_ex" title="Formatted centered output of a string.">textprintf_centre_ex</a>.</blockquote>
<div class="al-api"><b>Example <a name="exupdate">exupdate</a></b></div><br>
   This program demonstrates how to support double buffering,
   page flipping, and triple buffering as options within a single
   program, and how to make things run at a constant rate no
   matter what the speed of your computer. You have to use this
   example from the command line to specify as first parameter a
   number which represents the type of video update you want: 1
   for double buffering with memory bitmaps, 2 for page flipping,
   3 for triple buffering and 4 for double buffering with system
   bitmaps. After this, a dialog allows you to select a screen
   resolution and finally you will see a kaleidoscopic animation,
   along with a frames per second counter on the top left of
   the screen.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg005.html#END_OF_FUNCTION" title="Locks the code used by a timer.">END_OF_FUNCTION</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg005.html#LOCK_FUNCTION" title="Locks the memory of a function used by a timer.">LOCK_FUNCTION</a>,
<a class="xref" href="alleg005.html#LOCK_VARIABLE" title="Locks the memory of a variable used by a timer.">LOCK_VARIABLE</a>,
<a class="xref" href="alleg001.html#PALETTE" title="Stores palette information.">PALETTE</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg009.html#acquire_bitmap" title="Locks the bitmap before drawing onto it.">acquire_bitmap</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg009.html#bitmap_color_depth" title="Returns the color depth of the specified bitmap.">bitmap_color_depth</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg013.html#clear_bitmap" title="Clears the bitmap to color 0.">clear_bitmap</a>,
<a class="xref" href="alleg009.html#create_bitmap" title="Creates a memory bitmap.">create_bitmap</a>,
<a class="xref" href="alleg009.html#create_system_bitmap" title="Creates a system memory bitmap.">create_system_bitmap</a>,
<a class="xref" href="alleg009.html#create_video_bitmap" title="Creates a video memory bitmap.">create_video_bitmap</a>,
<a class="xref" href="alleg011.html#desktop_palette" title="The palette used by the Atari ST low resolution desktop.">desktop_palette</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg008.html#enable_triple_buffer" title="Enables triple buffering.">enable_triple_buffer</a>,
<a class="xref" href="alleg032.html#fixcos" title="Fixed point cosine of binary angles.">fixcos</a>,
<a class="xref" href="alleg001.html#fixed" title="Fixed point integer to replace floats.">fixed</a>,
<a class="xref" href="alleg032.html#fixmul" title="Multiplies two fixed point values together.">fixmul</a>,
<a class="xref" href="alleg032.html#fixsin" title="Fixed point sine of binary angles.">fixsin</a>,
<a class="xref" href="alleg032.html#fixtoi" title="Converts a fixed point to integer with rounding.">fixtoi</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg032.html#ftofix" title="Converts a floating point value to fixed point.">ftofix</a>,
<a class="xref" href="alleg011.html#generate_332_palette" title="Constructs a fake truecolor palette.">generate_332_palette</a>,
<a class="xref" href="alleg008.html#gfx_capabilities" title="Bitfield describing video hardware capabilities.">gfx_capabilities</a>,
<a class="xref" href="alleg035.html#gfx_mode_select_ex" title="Extended version of the graphics mode selection dialog.">gfx_mode_select_ex</a>,
<a class="xref" href="alleg005.html#install_int_ex" title="Adds or modifies a timer.">install_int_ex</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg004.html#install_mouse" title="Installs the Allegro mouse handler.">install_mouse</a>,
<a class="xref" href="alleg005.html#install_timer" title="Installs the Allegro timer interrupt handler.">install_timer</a>,
<a class="xref" href="alleg006.html#keypressed" title="Tells if there are keypresses waiting in the input buffer.">keypressed</a>,
<a class="xref" href="alleg013.html#line" title="Draws a line onto the bitmap.">line</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg008.html#poll_scroll" title="Checks the status of a scroll request with triple buffering.">poll_scroll</a>,
<a class="xref" href="alleg009.html#release_bitmap" title="Releases a previously locked bitmap.">release_bitmap</a>,
<a class="xref" href="alleg008.html#request_video_bitmap" title="Triple buffering page flip request.">request_video_bitmap</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_color_depth" title="Sets the global pixel color depth.">set_color_depth</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg008.html#show_video_bitmap" title="Flips the hardware screen to use the specified page.">show_video_bitmap</a>,
<a class="xref" href="alleg018.html#textout_ex" title="Writes a string on a bitmap.">textout_ex</a>,
<a class="xref" href="alleg018.html#textprintf_ex" title="Formatted output of a string.">textprintf_ex</a>,
<a class="xref" href="alleg013.html#triangle" title="Draws a filled triangle.">triangle</a>,
<a class="xref" href="alleg008.html#vsync" title="Waits for a vertical retrace to begin.">vsync</a>,
<a class="xref" href="alleg020.html#xor_mode" title="Shortcut for toggling xor drawing mode on and off.">xor_mode</a>.</blockquote>
<div class="al-api"><b>Example <a name="exswitch">exswitch</a></b></div><br>
   This program shows how to control the console switching mode, and
   let your program run in the background. These functions don't apply
   to every platform and driver, for example you can't control the
   switching mode from a DOS program.
   
<p>
   Yes, I know the fractal drawing is very slow: that's the point!
   This is so you can easily check whether it goes on working in the
   background after you switch away from the app.
   
<p>
   Depending on the type of selected switching mode, you will see
   whether the contents of the screen are preserved or not.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg005.html#END_OF_FUNCTION" title="Locks the code used by a timer.">END_OF_FUNCTION</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg005.html#LOCK_FUNCTION" title="Locks the memory of a function used by a timer.">LOCK_FUNCTION</a>,
<a class="xref" href="alleg005.html#LOCK_VARIABLE" title="Locks the memory of a variable used by a timer.">LOCK_VARIABLE</a>,
<a class="xref" href="alleg001.html#PALETTE" title="Stores palette information.">PALETTE</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg009.html#acquire_bitmap" title="Locks the bitmap before drawing onto it.">acquire_bitmap</a>,
<a class="xref" href="alleg009.html#acquire_screen" title="Shortcut of acquire_bitmap(screen);">acquire_screen</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_exit" title="Closes down the Allegro system.">allegro_exit</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg009.html#bitmap_color_depth" title="Returns the color depth of the specified bitmap.">bitmap_color_depth</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg013.html#clear_to_color" title="Clears the bitmap to the specified color.">clear_to_color</a>,
<a class="xref" href="alleg009.html#create_sub_bitmap" title="Creates a memory sub bitmap.">create_sub_bitmap</a>,
<a class="xref" href="alleg011.html#desktop_palette" title="The palette used by the Atari ST low resolution desktop.">desktop_palette</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg008.html#get_display_switch_mode" title="Returns the current display switching mode.">get_display_switch_mode</a>,
<a class="xref" href="alleg035.html#gfx_mode_select_ex" title="Extended version of the graphics mode selection dialog.">gfx_mode_select_ex</a>,
<a class="xref" href="alleg005.html#install_int" title="Installs a user timer handler.">install_int</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg004.html#install_mouse" title="Installs the Allegro mouse handler.">install_mouse</a>,
<a class="xref" href="alleg005.html#install_timer" title="Installs the Allegro timer interrupt handler.">install_timer</a>,
<a class="xref" href="alleg006.html#keypressed" title="Tells if there are keypresses waiting in the input buffer.">keypressed</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg012.html#palette_color" title="Maps palette indexes into the current pixel format colors.">palette_color</a>,
<a class="xref" href="alleg013.html#putpixel" title="Writes a pixel into a bitmap.">putpixel</a>,
<a class="xref" href="alleg006.html#readkey" title="Returns the next character from the keyboard buffer.">readkey</a>,
<a class="xref" href="alleg013.html#rectfill" title="Draws a solid filled rectangle.">rectfill</a>,
<a class="xref" href="alleg009.html#release_bitmap" title="Releases a previously locked bitmap.">release_bitmap</a>,
<a class="xref" href="alleg009.html#release_screen" title="Shortcut of release_bitmap(screen);">release_screen</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_color_depth" title="Sets the global pixel color depth.">set_color_depth</a>,
<a class="xref" href="alleg008.html#set_display_switch_callback" title="Installs a switching notification callback.">set_display_switch_callback</a>,
<a class="xref" href="alleg008.html#set_display_switch_mode" title="Tells Allegro how the program handles background switching.">set_display_switch_mode</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg018.html#textout_centre_ex" title="Writes a centered string on a bitmap.">textout_centre_ex</a>,
<a class="xref" href="alleg018.html#textprintf_centre_ex" title="Formatted centered output of a string.">textprintf_centre_ex</a>.</blockquote>
<div class="al-api"><b>Example <a name="exstream">exstream</a></b></div><br>
   This program shows how to use the audio stream functions to
   transfer large blocks of sample data to the sound card. In
   this case, the sample data is generated during runtime,
   and the resulting sound reminds of a car engine when you
   are accelerating.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg001.html#AUDIOSTREAM" title="Stores an audiostream.">AUDIOSTREAM</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg013.html#clear_to_color" title="Clears the bitmap to the specified color.">clear_to_color</a>,
<a class="xref" href="alleg011.html#desktop_palette" title="The palette used by the Atari ST low resolution desktop.">desktop_palette</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg028.html#free_audio_stream_buffer" title="Tells the audio stream player new data can be played.">free_audio_stream_buffer</a>,
<a class="xref" href="alleg028.html#get_audio_stream_buffer" title="Tells you if you need to fill the audiostream or not.">get_audio_stream_buffer</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg024.html#install_sound" title="Initialises the sound module.">install_sound</a>,
<a class="xref" href="alleg005.html#install_timer" title="Installs the Allegro timer interrupt handler.">install_timer</a>,
<a class="xref" href="alleg006.html#keypressed" title="Tells if there are keypresses waiting in the input buffer.">keypressed</a>,
<a class="xref" href="alleg012.html#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg028.html#play_audio_stream" title="Creates a new audio stream and starts playing it.">play_audio_stream</a>,
<a class="xref" href="alleg006.html#readkey" title="Returns the next character from the keyboard buffer.">readkey</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="alleg028.html#stop_audio_stream" title="Destroys an audio stream when it is no longer required.">stop_audio_stream</a>,
<a class="xref" href="alleg018.html#textprintf_centre_ex" title="Formatted centered output of a string.">textprintf_centre_ex</a>,
<a class="xref" href="alleg026.html#voice_start" title="Activates a voice.">voice_start</a>,
<a class="xref" href="alleg026.html#voice_stop" title="Stops a voice.">voice_stop</a>.</blockquote>
<div class="al-api"><b>Example <a name="expackf">expackf</a></b></div><br>
   This program demonstrates the use of the packfile functions, with some
   simple tests.
   
<p>
   The first test uses the standard packfile functions to transfer a
   bitmap file into a block of memory, then reads the bitmap out of the
   block of memory, using a custom packfile vtable.
   
<p>
   The second test reads in a bitmap with another custom packfile
   vtable, which uses libc's file stream functions.
   
<p>
   The third test demonstrates seeking with a custom vtable.
   
<p>
   The fourth test reads two bitmaps, and dumps them back into a
   single file, using a custom vtable again.




<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg044.html#ASSERT" title="Debugging helper macro to assert.">ASSERT</a>,
<a class="xref" href="alleg001.html#BITMAP" title="Stores the contents of a bitmap.">BITMAP</a>,
<a class="xref" href="alleg000.html#END_OF_MAIN" title="Macro to put after your main() function.">END_OF_MAIN</a>,
<a class="xref" href="alleg001.html#PACKFILE" title="Packfile structure, similar to the libc FILE structure.">PACKFILE</a>,
<a class="xref" href="alleg001.html#PACKFILE_VTABLE" title="Packfile vtable structure, for custom packfiles.">PACKFILE_VTABLE</a>,
<a class="xref" href="alleg009.html#SCREEN_H" title="Global define to obtain the size of the screen.">SCREEN_H</a>,
<a class="xref" href="alleg009.html#SCREEN_W" title="Global define to obtain the size of the screen.">SCREEN_W</a>,
<a class="xref" href="alleg035.html#alert" title="Displays a popup alert box.">alert</a>,
<a class="xref" href="alleg000.html#allegro_error" title="Stores the last Allegro error message.">allegro_error</a>,
<a class="xref" href="alleg000.html#allegro_init" title="Macro to initialise the Allegro library.">allegro_init</a>,
<a class="xref" href="alleg000.html#allegro_message" title="Used mainly to show error messages to users.">allegro_message</a>,
<a class="xref" href="alleg014.html#blit" title="Copies a rectangular area from one bitmap to another.">blit</a>,
<a class="xref" href="alleg013.html#clear_bitmap" title="Clears the bitmap to color 0.">clear_bitmap</a>,
<a class="xref" href="alleg009.html#destroy_bitmap" title="Destroys any type of created bitmap.">destroy_bitmap</a>,
<a class="xref" href="alleg030.html#file_size_ex" title="Returns the size of a file in bytes.">file_size_ex</a>,
<a class="xref" href="alleg018.html#font" title="A simple 8x8 fixed size font.">font</a>,
<a class="xref" href="alleg006.html#install_keyboard" title="Installs the Allegro keyboard interrupt handler.">install_keyboard</a>,
<a class="xref" href="alleg006.html#key" title="Array of flags indicating key state.">key</a>,
<a class="xref" href="alleg010.html#load_bmp_pf" title="Packfile version of load_bmp.">load_bmp_pf</a>,
<a class="xref" href="alleg010.html#load_pcx" title="Loads a PCX bitmap from a file.">load_pcx</a>,
<a class="xref" href="alleg010.html#load_pcx_pf" title="Packfile version of load_pcx.">load_pcx_pf</a>,
<a class="xref" href="alleg010.html#load_tga_pf" title="Packfile version of load_tga.">load_tga_pf</a>,
<a class="xref" href="alleg030.html#pack_fclose" title="Closes a stream previously opened.">pack_fclose</a>,
<a class="xref" href="alleg030.html#pack_fopen" title="Opens a file according to mode.">pack_fopen</a>,
<a class="xref" href="alleg030.html#pack_fopen_vtable" title="">pack_fopen_vtable</a>,
<a class="xref" href="alleg030.html#pack_fread" title="Reads n bytes from the stream.">pack_fread</a>,
<a class="xref" href="alleg030.html#pack_fseek" title="Seeks inside a stream.">pack_fseek</a>,
<a class="xref" href="alleg006.html#readkey" title="Returns the next character from the keyboard buffer.">readkey</a>,
<a class="xref" href="alleg010.html#save_bmp_pf" title="Packfile version of save_bmp.">save_bmp_pf</a>,
<a class="xref" href="alleg010.html#save_tga_pf" title="Packfile version of save_tga.">save_tga_pf</a>,
<a class="xref" href="alleg009.html#screen" title="Global pointer to the screen hardware video memory.">screen</a>,
<a class="xref" href="alleg008.html#set_color_depth" title="Sets the global pixel color depth.">set_color_depth</a>,
<a class="xref" href="alleg008.html#set_gfx_mode" title="Sets a graphic video mode.">set_gfx_mode</a>,
<a class="xref" href="alleg018.html#text_height" title="Returns the height of a font in pixels.">text_height</a>,
<a class="xref" href="alleg018.html#textprintf_centre_ex" title="Formatted centered output of a string.">textprintf_centre_ex</a>,
<a class="xref" href="alleg018.html#textprintf_ex" title="Formatted output of a string.">textprintf_ex</a>.</blockquote>
<hr><div class="al-back-to-contents"><a href="allegro.html">Back to contents</a></div>

</body>
</html>