-/***********************************************************
-* Rocks'n'Diamonds -- McDuffin Strikes Back! *
-*----------------------------------------------------------*
-* (c) 1995-2002 Artsoft Entertainment *
-* Holger Schemel *
-* Detmolder Strasse 189 *
-* 33604 Bielefeld *
-* Germany *
-* e-mail: info@artsoft.org *
-*----------------------------------------------------------*
-* conf_chr.c *
-***********************************************************/
/* ----- this file was automatically generated -- do not edit by hand ----- */
-/***********************************************************
-* Rocks'n'Diamonds -- McDuffin Strikes Back! *
-*----------------------------------------------------------*
-* (c) 1995-2002 Artsoft Entertainment *
-* Holger Schemel *
-* Detmolder Strasse 189 *
-* 33604 Bielefeld *
-* Germany *
-* e-mail: info@artsoft.org *
-*----------------------------------------------------------*
-* conf_chr.h *
-***********************************************************/
/* ----- this file was automatically generated -- do not edit by hand ----- */
-/***********************************************************
-* Rocks'n'Diamonds -- McDuffin Strikes Back! *
-*----------------------------------------------------------*
-* (c) 1995-2002 Artsoft Entertainment *
-* Holger Schemel *
-* Detmolder Strasse 189 *
-* 33604 Bielefeld *
-* Germany *
-* e-mail: info@artsoft.org *
-*----------------------------------------------------------*
-* conf_cus.c *
-***********************************************************/
/* ----- this file was automatically generated -- do not edit by hand ----- */
-/***********************************************************
-* Rocks'n'Diamonds -- McDuffin Strikes Back! *
-*----------------------------------------------------------*
-* (c) 1995-2002 Artsoft Entertainment *
-* Holger Schemel *
-* Detmolder Strasse 189 *
-* 33604 Bielefeld *
-* Germany *
-* e-mail: info@artsoft.org *
-*----------------------------------------------------------*
-* conf_cus.h *
-***********************************************************/
/* ----- this file was automatically generated -- do not edit by hand ----- */
-/***********************************************************
-* Rocks'n'Diamonds -- McDuffin Strikes Back! *
-*----------------------------------------------------------*
-* (c) 1995-2002 Artsoft Entertainment *
-* Holger Schemel *
-* Detmolder Strasse 189 *
-* 33604 Bielefeld *
-* Germany *
-* e-mail: info@artsoft.org *
-*----------------------------------------------------------*
-* conf_e2g.c *
-***********************************************************/
/* ----- this file was automatically generated -- do not edit by hand ----- */
IMG_INVISIBLE_STEELWALL_VERTICAL
},
{
- EL_ARROW_BLUE_LEFT, -1, -1,
- IMG_ARROW_BLUE_LEFT
+ EL_ARROW_LEFT, -1, -1,
+ IMG_ARROW_LEFT
},
{
- EL_ARROW_BLUE_RIGHT, -1, -1,
- IMG_ARROW_BLUE_RIGHT
+ EL_ARROW_RIGHT, -1, -1,
+ IMG_ARROW_RIGHT
},
{
- EL_ARROW_BLUE_UP, -1, -1,
- IMG_ARROW_BLUE_UP
+ EL_ARROW_UP, -1, -1,
+ IMG_ARROW_UP
},
{
- EL_ARROW_BLUE_DOWN, -1, -1,
- IMG_ARROW_BLUE_DOWN
- },
- {
- EL_ARROW_RED_LEFT, -1, -1,
- IMG_ARROW_RED_LEFT
- },
- {
- EL_ARROW_RED_RIGHT, -1, -1,
- IMG_ARROW_RED_RIGHT
- },
- {
- EL_ARROW_RED_UP, -1, -1,
- IMG_ARROW_RED_UP
- },
- {
- EL_ARROW_RED_DOWN, -1, -1,
- IMG_ARROW_RED_DOWN
+ EL_ARROW_DOWN, -1, -1,
+ IMG_ARROW_DOWN
},
{
EL_DOOR_WHITE, -1, -1,
-/***********************************************************
-* Rocks'n'Diamonds -- McDuffin Strikes Back! *
-*----------------------------------------------------------*
-* (c) 1995-2002 Artsoft Entertainment *
-* Holger Schemel *
-* Detmolder Strasse 189 *
-* 33604 Bielefeld *
-* Germany *
-* e-mail: info@artsoft.org *
-*----------------------------------------------------------*
-* conf_esg.c *
-***********************************************************/
/* ----- this file was automatically generated -- do not edit by hand ----- */
{ ".step_delay", "1", TYPE_INTEGER },
{ ".direction", ARG_UNDEFINED, TYPE_STRING },
{ ".position", ARG_UNDEFINED, TYPE_STRING },
+ { ".draw_xoffset", "0", TYPE_INTEGER },
+ { ".draw_yoffset", "0", TYPE_INTEGER },
{ ".name", ARG_UNDEFINED, TYPE_STRING },
{ NULL, NULL, 0 }
{ "invisible_steelwall_vertical.EDITOR.xpos", "11" },
{ "invisible_steelwall_vertical.EDITOR.ypos", "13" },
- { "arrow_blue.left", "RocksDC.pcx" },
- { "arrow_blue.left.xpos", "8" },
- { "arrow_blue.left.ypos", "8" },
- { "arrow_blue.left.frames", "1" },
- { "arrow_blue.right", "RocksDC.pcx" },
- { "arrow_blue.right.xpos", "9" },
- { "arrow_blue.right.ypos", "8" },
- { "arrow_blue.right.frames", "1" },
- { "arrow_blue.up", "RocksDC.pcx" },
- { "arrow_blue.up.xpos", "10" },
- { "arrow_blue.up.ypos", "8" },
- { "arrow_blue.up.frames", "1" },
- { "arrow_blue.down", "RocksDC.pcx" },
- { "arrow_blue.down.xpos", "11" },
- { "arrow_blue.down.ypos", "8" },
- { "arrow_blue.down.frames", "1" },
-
- { "arrow_red.left", "RocksDC.pcx" },
- { "arrow_red.left.xpos", "8" },
- { "arrow_red.left.ypos", "9" },
- { "arrow_red.left.frames", "1" },
- { "arrow_red.right", "RocksDC.pcx" },
- { "arrow_red.right.xpos", "9" },
- { "arrow_red.right.ypos", "9" },
- { "arrow_red.right.frames", "1" },
- { "arrow_red.up", "RocksDC.pcx" },
- { "arrow_red.up.xpos", "10" },
- { "arrow_red.up.ypos", "9" },
- { "arrow_red.up.frames", "1" },
- { "arrow_red.down", "RocksDC.pcx" },
- { "arrow_red.down.xpos", "11" },
- { "arrow_red.down.ypos", "9" },
- { "arrow_red.down.frames", "1" },
-
- { "ball_red", "RocksElements.pcx" },
- { "ball_red.xpos", "12" },
- { "ball_red.ypos", "8" },
- { "ball_red.frames", "1" },
- { "ball_blue", "RocksElements.pcx" },
- { "ball_blue.xpos", "13" },
- { "ball_blue.ypos", "8" },
- { "ball_blue.frames", "1" },
- { "ball_yellow", "RocksElements.pcx" },
- { "ball_yellow.xpos", "14" },
- { "ball_yellow.ypos", "8" },
- { "ball_yellow.frames", "1" },
- { "ball_gray", "RocksElements.pcx" },
- { "ball_gray.xpos", "15" },
- { "ball_gray.ypos", "8" },
- { "ball_gray.frames", "1" },
-
- { "scrollbar_blue", "RocksDC.pcx" },
- { "scrollbar_blue.xpos", "8" },
- { "scrollbar_blue.ypos", "10" },
- { "scrollbar_blue.frames", "1" },
- { "scrollbar_red", "RocksDC.pcx" },
- { "scrollbar_red.xpos", "9" },
- { "scrollbar_red.ypos", "10" },
- { "scrollbar_red.frames", "1" },
- { "scrollbar_green", "RocksDC.pcx" },
- { "scrollbar_green.xpos", "10" },
- { "scrollbar_green.ypos", "10" },
- { "scrollbar_green.frames", "1" },
- { "scrollbar_yellow", "RocksDC.pcx" },
- { "scrollbar_yellow.xpos", "11" },
- { "scrollbar_yellow.ypos", "10" },
- { "scrollbar_yellow.frames", "1" },
+ { "arrow_left", "RocksDC.pcx" },
+ { "arrow_left.xpos", "8" },
+ { "arrow_left.ypos", "8" },
+ { "arrow_left.frames", "1" },
+ { "arrow_right", "RocksDC.pcx" },
+ { "arrow_right.xpos", "9" },
+ { "arrow_right.ypos", "8" },
+ { "arrow_right.frames", "1" },
+ { "arrow_up", "RocksDC.pcx" },
+ { "arrow_up.xpos", "10" },
+ { "arrow_up.ypos", "8" },
+ { "arrow_up.frames", "1" },
+ { "arrow_down", "RocksDC.pcx" },
+ { "arrow_down.xpos", "11" },
+ { "arrow_down.ypos", "8" },
+ { "arrow_down.frames", "1" },
#include "conf_chr.c" /* include auto-generated data structure definitions */
#include "conf_cus.c" /* include auto-generated data structure definitions */
{ "toon_20.direction", "down" },
{ "toon_20.position", "any" },
- { "global.num_toons", "20" },
+ { "menu.calibrate_red", "RocksElements.pcx" },
+ { "menu.calibrate_red.xpos", "12" },
+ { "menu.calibrate_red.ypos", "8" },
+ { "menu.calibrate_red.frames", "1" },
+ { "menu.calibrate_blue", "RocksElements.pcx" },
+ { "menu.calibrate_blue.xpos", "13" },
+ { "menu.calibrate_blue.ypos", "8" },
+ { "menu.calibrate_blue.frames", "1" },
+ { "menu.calibrate_yellow", "RocksElements.pcx" },
+ { "menu.calibrate_yellow.xpos", "14" },
+ { "menu.calibrate_yellow.ypos", "8" },
+ { "menu.calibrate_yellow.frames", "1" },
+
+ { "menu.button", "RocksElements.pcx" },
+ { "menu.button.xpos", "13" },
+ { "menu.button.ypos", "8" },
+ { "menu.button.frames", "1" },
+ { "menu.button.active", "RocksElements.pcx" },
+ { "menu.button.active.xpos", "12" },
+ { "menu.button.active.ypos", "8" },
+ { "menu.button.active.frames", "1" },
+
+ { "menu.button_left", "RocksDC.pcx" },
+ { "menu.button_left.xpos", "8" },
+ { "menu.button_left.ypos", "8" },
+ { "menu.button_left.frames", "1" },
+ { "menu.button_right", "RocksDC.pcx" },
+ { "menu.button_right.xpos", "9" },
+ { "menu.button_right.ypos", "8" },
+ { "menu.button_right.frames", "1" },
+ { "menu.button_up", "RocksDC.pcx" },
+ { "menu.button_up.xpos", "10" },
+ { "menu.button_up.ypos", "8" },
+ { "menu.button_up.frames", "1" },
+ { "menu.button_down", "RocksDC.pcx" },
+ { "menu.button_down.xpos", "11" },
+ { "menu.button_down.ypos", "8" },
+ { "menu.button_down.frames", "1" },
+ { "menu.button_left.active", "RocksDC.pcx" },
+ { "menu.button_left.active.xpos", "8" },
+ { "menu.button_left.active.ypos", "9" },
+ { "menu.button_left.active.frames", "1" },
+ { "menu.button_right.active", "RocksDC.pcx" },
+ { "menu.button_right.active.xpos", "9" },
+ { "menu.button_right.active.ypos", "9" },
+ { "menu.button_right.active.frames", "1" },
+ { "menu.button_up.active", "RocksDC.pcx" },
+ { "menu.button_up.active.xpos", "10" },
+ { "menu.button_up.active.ypos", "9" },
+ { "menu.button_up.active.frames", "1" },
+ { "menu.button_down.active", "RocksDC.pcx" },
+ { "menu.button_down.active.xpos", "11" },
+ { "menu.button_down.active.ypos", "9" },
+ { "menu.button_down.active.frames", "1" },
+
+ { "menu.scrollbar", "RocksDC.pcx" },
+ { "menu.scrollbar.xpos", "8" },
+ { "menu.scrollbar.ypos", "10" },
+ { "menu.scrollbar.frames", "1" },
+ { "menu.scrollbar.active", "RocksDC.pcx" },
+ { "menu.scrollbar.active.xpos", "9" },
+ { "menu.scrollbar.active.ypos", "10" },
+ { "menu.scrollbar.active.frames", "1" },
+
+ { "font.initial_1", "RocksFontSmall.pcx" },
+ { "font.initial_1.x", "0" },
+ { "font.initial_1.y", "0" },
+ { "font.initial_1.width", "14" },
+ { "font.initial_1.height", "14" },
+ { "font.initial_2", "RocksFontSmall.pcx" },
+ { "font.initial_2.x", "0" },
+ { "font.initial_2.y", "56" },
+ { "font.initial_2.width", "14" },
+ { "font.initial_2.height", "14" },
+ { "font.initial_3", "RocksFontSmall.pcx" },
+ { "font.initial_3.x", "0" },
+ { "font.initial_3.y", "112" },
+ { "font.initial_3.width", "14" },
+ { "font.initial_3.height", "14" },
+ { "font.initial_4", "RocksFontSmall.pcx" },
+ { "font.initial_4.x", "0" },
+ { "font.initial_4.y", "168" },
+ { "font.initial_4.width", "14" },
+ { "font.initial_4.height", "14" },
+
+ { "font.big_1", "RocksFontBig.pcx" },
+ { "font.big_1.x", "0" },
+ { "font.big_1.y", "0" },
+ { "font.big_1.width", "32" },
+ { "font.big_1.height", "32" },
+ { "font.big_2", "RocksFontBig.pcx" },
+ { "font.big_2.x", "0" },
+ { "font.big_2.y", "128" },
+ { "font.big_2.width", "32" },
+ { "font.big_2.height", "32" },
+ { "font.big_3", "RocksFontBig.pcx" },
+ { "font.big_3.x", "0" },
+ { "font.big_3.y", "256" },
+ { "font.big_3.width", "32" },
+ { "font.big_3.height", "32" },
+ { "font.big_4", "RocksFontBig.pcx" },
+ { "font.big_4.x", "0" },
+ { "font.big_4.y", "384" },
+ { "font.big_4.width", "32" },
+ { "font.big_4.height", "32" },
+
+ { "font.medium_1", "RocksFontMedium.pcx" },
+ { "font.medium_1.x", "0" },
+ { "font.medium_1.y", "0" },
+ { "font.medium_1.width", "16" },
+ { "font.medium_1.height", "32" },
+ { "font.medium_2", "RocksFontMedium.pcx" },
+ { "font.medium_2.x", "0" },
+ { "font.medium_2.y", "128" },
+ { "font.medium_2.width", "16" },
+ { "font.medium_2.height", "32" },
+ { "font.medium_3", "RocksFontMedium.pcx" },
+ { "font.medium_3.x", "0" },
+ { "font.medium_3.y", "256" },
+ { "font.medium_3.width", "16" },
+ { "font.medium_3.height", "32" },
+ { "font.medium_4", "RocksFontMedium.pcx" },
+ { "font.medium_4.x", "0" },
+ { "font.medium_4.y", "384" },
+ { "font.medium_4.width", "16" },
+ { "font.medium_4.height", "32" },
+
+ { "font.small_1", "RocksFontSmall.pcx" },
+ { "font.small_1.x", "0" },
+ { "font.small_1.y", "0" },
+ { "font.small_1.width", "14" },
+ { "font.small_1.height", "14" },
+ { "font.small_2", "RocksFontSmall.pcx" },
+ { "font.small_2.x", "0" },
+ { "font.small_2.y", "56" },
+ { "font.small_2.width", "14" },
+ { "font.small_2.height", "14" },
+ { "font.small_3", "RocksFontSmall.pcx" },
+ { "font.small_3.x", "0" },
+ { "font.small_3.y", "112" },
+ { "font.small_3.width", "14" },
+ { "font.small_3.height", "14" },
+ { "font.small_4", "RocksFontSmall.pcx" },
+ { "font.small_4.x", "0" },
+ { "font.small_4.y", "168" },
+ { "font.small_4.width", "14" },
+ { "font.small_4.height", "14" },
+
+ { "font.tape", "RocksFontSmall.pcx" },
+ { "font.tape.x", "0" },
+ { "font.tape.y", "224" },
+ { "font.tape.width", "11" },
+ { "font.tape.height", "14" },
+
+ { "font.game", "RocksFontEM.pcx" },
+ { "font.game.x", "0" },
+ { "font.game.y", "160" },
+ { "font.game.width", "16" },
+ { "font.game.height", "16" },
+
+ { "font.narrow", "RocksFontSmall.pcx" },
+ { "font.narrow.x", "0" },
+ { "font.narrow.y", "280" },
+ { "font.narrow.width", "10" },
+ { "font.narrow.height", "14" },
{ "global.border", "RocksScreen.pcx" },
{ "global.door", "RocksDoor.pcx" },
- { "menu.main.hide_static_text", "false" },
-
- { "font.big", "RocksFontBig.pcx" },
- { "font.medium", "RocksFontMedium.pcx" },
- { "font.small", "RocksFontSmall.pcx" },
- { "font.em", "RocksFontEM.pcx" },
-
- { "background.default", UNDEFINED_FILENAME },
- { "background.door", UNDEFINED_FILENAME },
+ { "background", UNDEFINED_FILENAME },
{ "background.main", UNDEFINED_FILENAME },
- { "background.level_series", UNDEFINED_FILENAME },
- { "background.hall_of_fame", UNDEFINED_FILENAME },
- { "background.editor_settings_level", UNDEFINED_FILENAME },
- { "background.editor_settings_element", UNDEFINED_FILENAME },
+ { "background.levels", UNDEFINED_FILENAME },
+ { "background.scores", UNDEFINED_FILENAME },
+ { "background.editor", UNDEFINED_FILENAME },
{ "background.info", UNDEFINED_FILENAME },
{ "background.setup", UNDEFINED_FILENAME },
+ { "background.door", UNDEFINED_FILENAME },
{ "info.font_em_1", "RocksFontEM.pcx" },
{ "info.font_em_1.xpos", "0" },
{ "info.font_em_5.frames", "4" },
{ "info.font_em_5.delay", "10" },
+ /* the following directives are not associated with an image,
+ but make sense to be defined in "graphicsinfo.conf", too */
+
+ { "global.num_toons", "20" },
+
+ { "menu.main.hide_static_text", "false" },
+
{ NULL, NULL }
};
-/***********************************************************
-* Rocks'n'Diamonds -- McDuffin Strikes Back! *
-*----------------------------------------------------------*
-* (c) 1995-2002 Artsoft Entertainment *
-* Holger Schemel *
-* Detmolder Strasse 189 *
-* 33604 Bielefeld *
-* Germany *
-* e-mail: info@artsoft.org *
-*----------------------------------------------------------*
-* conf_gfx.h *
-***********************************************************/
/* ----- this file was automatically generated -- do not edit by hand ----- */
#define IMG_INVISIBLE_STEELWALL_BOTTOMRIGHT_EDITOR 552
#define IMG_INVISIBLE_STEELWALL_HORIZONTAL_EDITOR 553
#define IMG_INVISIBLE_STEELWALL_VERTICAL_EDITOR 554
-#define IMG_ARROW_BLUE_LEFT 555
-#define IMG_ARROW_BLUE_RIGHT 556
-#define IMG_ARROW_BLUE_UP 557
-#define IMG_ARROW_BLUE_DOWN 558
-#define IMG_ARROW_RED_LEFT 559
-#define IMG_ARROW_RED_RIGHT 560
-#define IMG_ARROW_RED_UP 561
-#define IMG_ARROW_RED_DOWN 562
-#define IMG_BALL_RED 563
-#define IMG_BALL_BLUE 564
-#define IMG_BALL_YELLOW 565
-#define IMG_BALL_GRAY 566
-#define IMG_SCROLLBAR_BLUE 567
-#define IMG_SCROLLBAR_RED 568
-#define IMG_SCROLLBAR_GREEN 569
-#define IMG_SCROLLBAR_YELLOW 570
-#define IMG_CHAR_SPACE 571
-#define IMG_CHAR_EXCLAM 572
-#define IMG_CHAR_QUOTEDBL 573
-#define IMG_CHAR_NUMBERSIGN 574
-#define IMG_CHAR_DOLLAR 575
-#define IMG_CHAR_PROCENT 576
-#define IMG_CHAR_AMPERSAND 577
-#define IMG_CHAR_APOSTROPHE 578
-#define IMG_CHAR_PARENLEFT 579
-#define IMG_CHAR_PARENRIGHT 580
-#define IMG_CHAR_ASTERISK 581
-#define IMG_CHAR_PLUS 582
-#define IMG_CHAR_COMMA 583
-#define IMG_CHAR_MINUS 584
-#define IMG_CHAR_PERIOD 585
-#define IMG_CHAR_SLASH 586
-#define IMG_CHAR_0 587
-#define IMG_CHAR_1 588
-#define IMG_CHAR_2 589
-#define IMG_CHAR_3 590
-#define IMG_CHAR_4 591
-#define IMG_CHAR_5 592
-#define IMG_CHAR_6 593
-#define IMG_CHAR_7 594
-#define IMG_CHAR_8 595
-#define IMG_CHAR_9 596
-#define IMG_CHAR_COLON 597
-#define IMG_CHAR_SEMICOLON 598
-#define IMG_CHAR_LESS 599
-#define IMG_CHAR_EQUAL 600
-#define IMG_CHAR_GREATER 601
-#define IMG_CHAR_QUESTION 602
-#define IMG_CHAR_AT 603
-#define IMG_CHAR_A 604
-#define IMG_CHAR_B 605
-#define IMG_CHAR_C 606
-#define IMG_CHAR_D 607
-#define IMG_CHAR_E 608
-#define IMG_CHAR_F 609
-#define IMG_CHAR_G 610
-#define IMG_CHAR_H 611
-#define IMG_CHAR_I 612
-#define IMG_CHAR_J 613
-#define IMG_CHAR_K 614
-#define IMG_CHAR_L 615
-#define IMG_CHAR_M 616
-#define IMG_CHAR_N 617
-#define IMG_CHAR_O 618
-#define IMG_CHAR_P 619
-#define IMG_CHAR_Q 620
-#define IMG_CHAR_R 621
-#define IMG_CHAR_S 622
-#define IMG_CHAR_T 623
-#define IMG_CHAR_U 624
-#define IMG_CHAR_V 625
-#define IMG_CHAR_W 626
-#define IMG_CHAR_X 627
-#define IMG_CHAR_Y 628
-#define IMG_CHAR_Z 629
-#define IMG_CHAR_AE 630
-#define IMG_CHAR_OE 631
-#define IMG_CHAR_UE 632
-#define IMG_CHAR_COPYRIGHT 633
-#define IMG_CHAR_UNDERSCORE 634
-#define IMG_CHAR_EMPTY 635
-#define IMG_CHAR_DEGREE 636
-#define IMG_CHAR_TM 637
-#define IMG_CHAR_CURSOR 638
-#define IMG_CUSTOM_1 639
-#define IMG_CUSTOM_2 640
-#define IMG_CUSTOM_3 641
-#define IMG_CUSTOM_4 642
-#define IMG_CUSTOM_5 643
-#define IMG_CUSTOM_6 644
-#define IMG_CUSTOM_7 645
-#define IMG_CUSTOM_8 646
-#define IMG_CUSTOM_9 647
-#define IMG_CUSTOM_10 648
-#define IMG_CUSTOM_11 649
-#define IMG_CUSTOM_12 650
-#define IMG_CUSTOM_13 651
-#define IMG_CUSTOM_14 652
-#define IMG_CUSTOM_15 653
-#define IMG_CUSTOM_16 654
-#define IMG_CUSTOM_17 655
-#define IMG_CUSTOM_18 656
-#define IMG_CUSTOM_19 657
-#define IMG_CUSTOM_20 658
-#define IMG_CUSTOM_21 659
-#define IMG_CUSTOM_22 660
-#define IMG_CUSTOM_23 661
-#define IMG_CUSTOM_24 662
-#define IMG_CUSTOM_25 663
-#define IMG_CUSTOM_26 664
-#define IMG_CUSTOM_27 665
-#define IMG_CUSTOM_28 666
-#define IMG_CUSTOM_29 667
-#define IMG_CUSTOM_30 668
-#define IMG_CUSTOM_31 669
-#define IMG_CUSTOM_32 670
-#define IMG_CUSTOM_33 671
-#define IMG_CUSTOM_34 672
-#define IMG_CUSTOM_35 673
-#define IMG_CUSTOM_36 674
-#define IMG_CUSTOM_37 675
-#define IMG_CUSTOM_38 676
-#define IMG_CUSTOM_39 677
-#define IMG_CUSTOM_40 678
-#define IMG_CUSTOM_41 679
-#define IMG_CUSTOM_42 680
-#define IMG_CUSTOM_43 681
-#define IMG_CUSTOM_44 682
-#define IMG_CUSTOM_45 683
-#define IMG_CUSTOM_46 684
-#define IMG_CUSTOM_47 685
-#define IMG_CUSTOM_48 686
-#define IMG_CUSTOM_49 687
-#define IMG_CUSTOM_50 688
-#define IMG_CUSTOM_51 689
-#define IMG_CUSTOM_52 690
-#define IMG_CUSTOM_53 691
-#define IMG_CUSTOM_54 692
-#define IMG_CUSTOM_55 693
-#define IMG_CUSTOM_56 694
-#define IMG_CUSTOM_57 695
-#define IMG_CUSTOM_58 696
-#define IMG_CUSTOM_59 697
-#define IMG_CUSTOM_60 698
-#define IMG_CUSTOM_61 699
-#define IMG_CUSTOM_62 700
-#define IMG_CUSTOM_63 701
-#define IMG_CUSTOM_64 702
-#define IMG_CUSTOM_65 703
-#define IMG_CUSTOM_66 704
-#define IMG_CUSTOM_67 705
-#define IMG_CUSTOM_68 706
-#define IMG_CUSTOM_69 707
-#define IMG_CUSTOM_70 708
-#define IMG_CUSTOM_71 709
-#define IMG_CUSTOM_72 710
-#define IMG_CUSTOM_73 711
-#define IMG_CUSTOM_74 712
-#define IMG_CUSTOM_75 713
-#define IMG_CUSTOM_76 714
-#define IMG_CUSTOM_77 715
-#define IMG_CUSTOM_78 716
-#define IMG_CUSTOM_79 717
-#define IMG_CUSTOM_80 718
-#define IMG_CUSTOM_81 719
-#define IMG_CUSTOM_82 720
-#define IMG_CUSTOM_83 721
-#define IMG_CUSTOM_84 722
-#define IMG_CUSTOM_85 723
-#define IMG_CUSTOM_86 724
-#define IMG_CUSTOM_87 725
-#define IMG_CUSTOM_88 726
-#define IMG_CUSTOM_89 727
-#define IMG_CUSTOM_90 728
-#define IMG_CUSTOM_91 729
-#define IMG_CUSTOM_92 730
-#define IMG_CUSTOM_93 731
-#define IMG_CUSTOM_94 732
-#define IMG_CUSTOM_95 733
-#define IMG_CUSTOM_96 734
-#define IMG_CUSTOM_97 735
-#define IMG_CUSTOM_98 736
-#define IMG_CUSTOM_99 737
-#define IMG_CUSTOM_100 738
-#define IMG_CUSTOM_101 739
-#define IMG_CUSTOM_102 740
-#define IMG_CUSTOM_103 741
-#define IMG_CUSTOM_104 742
-#define IMG_CUSTOM_105 743
-#define IMG_CUSTOM_106 744
-#define IMG_CUSTOM_107 745
-#define IMG_CUSTOM_108 746
-#define IMG_CUSTOM_109 747
-#define IMG_CUSTOM_110 748
-#define IMG_CUSTOM_111 749
-#define IMG_CUSTOM_112 750
-#define IMG_CUSTOM_113 751
-#define IMG_CUSTOM_114 752
-#define IMG_CUSTOM_115 753
-#define IMG_CUSTOM_116 754
-#define IMG_CUSTOM_117 755
-#define IMG_CUSTOM_118 756
-#define IMG_CUSTOM_119 757
-#define IMG_CUSTOM_120 758
-#define IMG_CUSTOM_121 759
-#define IMG_CUSTOM_122 760
-#define IMG_CUSTOM_123 761
-#define IMG_CUSTOM_124 762
-#define IMG_CUSTOM_125 763
-#define IMG_CUSTOM_126 764
-#define IMG_CUSTOM_127 765
-#define IMG_CUSTOM_128 766
-#define IMG_TOON_1 767
-#define IMG_TOON_2 768
-#define IMG_TOON_3 769
-#define IMG_TOON_4 770
-#define IMG_TOON_5 771
-#define IMG_TOON_6 772
-#define IMG_TOON_7 773
-#define IMG_TOON_8 774
-#define IMG_TOON_9 775
-#define IMG_TOON_10 776
-#define IMG_TOON_11 777
-#define IMG_TOON_12 778
-#define IMG_TOON_13 779
-#define IMG_TOON_14 780
-#define IMG_TOON_15 781
-#define IMG_TOON_16 782
-#define IMG_TOON_17 783
-#define IMG_TOON_18 784
-#define IMG_TOON_19 785
-#define IMG_TOON_20 786
-#define IMG_GLOBAL_BORDER 787
-#define IMG_GLOBAL_DOOR 788
-#define IMG_FONT_BIG 789
-#define IMG_FONT_MEDIUM 790
-#define IMG_FONT_SMALL 791
-#define IMG_FONT_EM 792
-#define IMG_BACKGROUND_DEFAULT 793
-#define IMG_BACKGROUND_DOOR 794
-#define IMG_BACKGROUND_MAIN 795
-#define IMG_BACKGROUND_LEVEL_SERIES 796
-#define IMG_BACKGROUND_HALL_OF_FAME 797
-#define IMG_BACKGROUND_EDITOR_SETTINGS_LEVEL 798
-#define IMG_BACKGROUND_EDITOR_SETTINGS_ELEMENT 799
-#define IMG_BACKGROUND_INFO 800
-#define IMG_BACKGROUND_SETUP 801
-#define IMG_INFO_FONT_EM_1 802
-#define IMG_INFO_FONT_EM_2 803
-#define IMG_INFO_FONT_EM_3 804
-#define IMG_INFO_FONT_EM_4 805
-#define IMG_INFO_FONT_EM_5 806
+#define IMG_ARROW_LEFT 555
+#define IMG_ARROW_RIGHT 556
+#define IMG_ARROW_UP 557
+#define IMG_ARROW_DOWN 558
+#define IMG_CHAR_SPACE 559
+#define IMG_CHAR_EXCLAM 560
+#define IMG_CHAR_QUOTEDBL 561
+#define IMG_CHAR_NUMBERSIGN 562
+#define IMG_CHAR_DOLLAR 563
+#define IMG_CHAR_PROCENT 564
+#define IMG_CHAR_AMPERSAND 565
+#define IMG_CHAR_APOSTROPHE 566
+#define IMG_CHAR_PARENLEFT 567
+#define IMG_CHAR_PARENRIGHT 568
+#define IMG_CHAR_ASTERISK 569
+#define IMG_CHAR_PLUS 570
+#define IMG_CHAR_COMMA 571
+#define IMG_CHAR_MINUS 572
+#define IMG_CHAR_PERIOD 573
+#define IMG_CHAR_SLASH 574
+#define IMG_CHAR_0 575
+#define IMG_CHAR_1 576
+#define IMG_CHAR_2 577
+#define IMG_CHAR_3 578
+#define IMG_CHAR_4 579
+#define IMG_CHAR_5 580
+#define IMG_CHAR_6 581
+#define IMG_CHAR_7 582
+#define IMG_CHAR_8 583
+#define IMG_CHAR_9 584
+#define IMG_CHAR_COLON 585
+#define IMG_CHAR_SEMICOLON 586
+#define IMG_CHAR_LESS 587
+#define IMG_CHAR_EQUAL 588
+#define IMG_CHAR_GREATER 589
+#define IMG_CHAR_QUESTION 590
+#define IMG_CHAR_AT 591
+#define IMG_CHAR_A 592
+#define IMG_CHAR_B 593
+#define IMG_CHAR_C 594
+#define IMG_CHAR_D 595
+#define IMG_CHAR_E 596
+#define IMG_CHAR_F 597
+#define IMG_CHAR_G 598
+#define IMG_CHAR_H 599
+#define IMG_CHAR_I 600
+#define IMG_CHAR_J 601
+#define IMG_CHAR_K 602
+#define IMG_CHAR_L 603
+#define IMG_CHAR_M 604
+#define IMG_CHAR_N 605
+#define IMG_CHAR_O 606
+#define IMG_CHAR_P 607
+#define IMG_CHAR_Q 608
+#define IMG_CHAR_R 609
+#define IMG_CHAR_S 610
+#define IMG_CHAR_T 611
+#define IMG_CHAR_U 612
+#define IMG_CHAR_V 613
+#define IMG_CHAR_W 614
+#define IMG_CHAR_X 615
+#define IMG_CHAR_Y 616
+#define IMG_CHAR_Z 617
+#define IMG_CHAR_AE 618
+#define IMG_CHAR_OE 619
+#define IMG_CHAR_UE 620
+#define IMG_CHAR_COPYRIGHT 621
+#define IMG_CHAR_UNDERSCORE 622
+#define IMG_CHAR_EMPTY 623
+#define IMG_CHAR_DEGREE 624
+#define IMG_CHAR_TM 625
+#define IMG_CHAR_CURSOR 626
+#define IMG_CUSTOM_1 627
+#define IMG_CUSTOM_2 628
+#define IMG_CUSTOM_3 629
+#define IMG_CUSTOM_4 630
+#define IMG_CUSTOM_5 631
+#define IMG_CUSTOM_6 632
+#define IMG_CUSTOM_7 633
+#define IMG_CUSTOM_8 634
+#define IMG_CUSTOM_9 635
+#define IMG_CUSTOM_10 636
+#define IMG_CUSTOM_11 637
+#define IMG_CUSTOM_12 638
+#define IMG_CUSTOM_13 639
+#define IMG_CUSTOM_14 640
+#define IMG_CUSTOM_15 641
+#define IMG_CUSTOM_16 642
+#define IMG_CUSTOM_17 643
+#define IMG_CUSTOM_18 644
+#define IMG_CUSTOM_19 645
+#define IMG_CUSTOM_20 646
+#define IMG_CUSTOM_21 647
+#define IMG_CUSTOM_22 648
+#define IMG_CUSTOM_23 649
+#define IMG_CUSTOM_24 650
+#define IMG_CUSTOM_25 651
+#define IMG_CUSTOM_26 652
+#define IMG_CUSTOM_27 653
+#define IMG_CUSTOM_28 654
+#define IMG_CUSTOM_29 655
+#define IMG_CUSTOM_30 656
+#define IMG_CUSTOM_31 657
+#define IMG_CUSTOM_32 658
+#define IMG_CUSTOM_33 659
+#define IMG_CUSTOM_34 660
+#define IMG_CUSTOM_35 661
+#define IMG_CUSTOM_36 662
+#define IMG_CUSTOM_37 663
+#define IMG_CUSTOM_38 664
+#define IMG_CUSTOM_39 665
+#define IMG_CUSTOM_40 666
+#define IMG_CUSTOM_41 667
+#define IMG_CUSTOM_42 668
+#define IMG_CUSTOM_43 669
+#define IMG_CUSTOM_44 670
+#define IMG_CUSTOM_45 671
+#define IMG_CUSTOM_46 672
+#define IMG_CUSTOM_47 673
+#define IMG_CUSTOM_48 674
+#define IMG_CUSTOM_49 675
+#define IMG_CUSTOM_50 676
+#define IMG_CUSTOM_51 677
+#define IMG_CUSTOM_52 678
+#define IMG_CUSTOM_53 679
+#define IMG_CUSTOM_54 680
+#define IMG_CUSTOM_55 681
+#define IMG_CUSTOM_56 682
+#define IMG_CUSTOM_57 683
+#define IMG_CUSTOM_58 684
+#define IMG_CUSTOM_59 685
+#define IMG_CUSTOM_60 686
+#define IMG_CUSTOM_61 687
+#define IMG_CUSTOM_62 688
+#define IMG_CUSTOM_63 689
+#define IMG_CUSTOM_64 690
+#define IMG_CUSTOM_65 691
+#define IMG_CUSTOM_66 692
+#define IMG_CUSTOM_67 693
+#define IMG_CUSTOM_68 694
+#define IMG_CUSTOM_69 695
+#define IMG_CUSTOM_70 696
+#define IMG_CUSTOM_71 697
+#define IMG_CUSTOM_72 698
+#define IMG_CUSTOM_73 699
+#define IMG_CUSTOM_74 700
+#define IMG_CUSTOM_75 701
+#define IMG_CUSTOM_76 702
+#define IMG_CUSTOM_77 703
+#define IMG_CUSTOM_78 704
+#define IMG_CUSTOM_79 705
+#define IMG_CUSTOM_80 706
+#define IMG_CUSTOM_81 707
+#define IMG_CUSTOM_82 708
+#define IMG_CUSTOM_83 709
+#define IMG_CUSTOM_84 710
+#define IMG_CUSTOM_85 711
+#define IMG_CUSTOM_86 712
+#define IMG_CUSTOM_87 713
+#define IMG_CUSTOM_88 714
+#define IMG_CUSTOM_89 715
+#define IMG_CUSTOM_90 716
+#define IMG_CUSTOM_91 717
+#define IMG_CUSTOM_92 718
+#define IMG_CUSTOM_93 719
+#define IMG_CUSTOM_94 720
+#define IMG_CUSTOM_95 721
+#define IMG_CUSTOM_96 722
+#define IMG_CUSTOM_97 723
+#define IMG_CUSTOM_98 724
+#define IMG_CUSTOM_99 725
+#define IMG_CUSTOM_100 726
+#define IMG_CUSTOM_101 727
+#define IMG_CUSTOM_102 728
+#define IMG_CUSTOM_103 729
+#define IMG_CUSTOM_104 730
+#define IMG_CUSTOM_105 731
+#define IMG_CUSTOM_106 732
+#define IMG_CUSTOM_107 733
+#define IMG_CUSTOM_108 734
+#define IMG_CUSTOM_109 735
+#define IMG_CUSTOM_110 736
+#define IMG_CUSTOM_111 737
+#define IMG_CUSTOM_112 738
+#define IMG_CUSTOM_113 739
+#define IMG_CUSTOM_114 740
+#define IMG_CUSTOM_115 741
+#define IMG_CUSTOM_116 742
+#define IMG_CUSTOM_117 743
+#define IMG_CUSTOM_118 744
+#define IMG_CUSTOM_119 745
+#define IMG_CUSTOM_120 746
+#define IMG_CUSTOM_121 747
+#define IMG_CUSTOM_122 748
+#define IMG_CUSTOM_123 749
+#define IMG_CUSTOM_124 750
+#define IMG_CUSTOM_125 751
+#define IMG_CUSTOM_126 752
+#define IMG_CUSTOM_127 753
+#define IMG_CUSTOM_128 754
+#define IMG_TOON_1 755
+#define IMG_TOON_2 756
+#define IMG_TOON_3 757
+#define IMG_TOON_4 758
+#define IMG_TOON_5 759
+#define IMG_TOON_6 760
+#define IMG_TOON_7 761
+#define IMG_TOON_8 762
+#define IMG_TOON_9 763
+#define IMG_TOON_10 764
+#define IMG_TOON_11 765
+#define IMG_TOON_12 766
+#define IMG_TOON_13 767
+#define IMG_TOON_14 768
+#define IMG_TOON_15 769
+#define IMG_TOON_16 770
+#define IMG_TOON_17 771
+#define IMG_TOON_18 772
+#define IMG_TOON_19 773
+#define IMG_TOON_20 774
+#define IMG_MENU_CALIBRATE_RED 775
+#define IMG_MENU_CALIBRATE_BLUE 776
+#define IMG_MENU_CALIBRATE_YELLOW 777
+#define IMG_MENU_BUTTON 778
+#define IMG_MENU_BUTTON_ACTIVE 779
+#define IMG_MENU_BUTTON_LEFT 780
+#define IMG_MENU_BUTTON_RIGHT 781
+#define IMG_MENU_BUTTON_UP 782
+#define IMG_MENU_BUTTON_DOWN 783
+#define IMG_MENU_BUTTON_LEFT_ACTIVE 784
+#define IMG_MENU_BUTTON_RIGHT_ACTIVE 785
+#define IMG_MENU_BUTTON_UP_ACTIVE 786
+#define IMG_MENU_BUTTON_DOWN_ACTIVE 787
+#define IMG_MENU_SCROLLBAR 788
+#define IMG_MENU_SCROLLBAR_ACTIVE 789
+#define IMG_FONT_INITIAL_1 790
+#define IMG_FONT_INITIAL_2 791
+#define IMG_FONT_INITIAL_3 792
+#define IMG_FONT_INITIAL_4 793
+#define IMG_FONT_BIG_1 794
+#define IMG_FONT_BIG_2 795
+#define IMG_FONT_BIG_3 796
+#define IMG_FONT_BIG_4 797
+#define IMG_FONT_MEDIUM_1 798
+#define IMG_FONT_MEDIUM_2 799
+#define IMG_FONT_MEDIUM_3 800
+#define IMG_FONT_MEDIUM_4 801
+#define IMG_FONT_SMALL_1 802
+#define IMG_FONT_SMALL_2 803
+#define IMG_FONT_SMALL_3 804
+#define IMG_FONT_SMALL_4 805
+#define IMG_FONT_TAPE 806
+#define IMG_FONT_GAME 807
+#define IMG_FONT_NARROW 808
+#define IMG_GLOBAL_BORDER 809
+#define IMG_GLOBAL_DOOR 810
+#define IMG_BACKGROUND 811
+#define IMG_BACKGROUND_MAIN 812
+#define IMG_BACKGROUND_LEVELS 813
+#define IMG_BACKGROUND_SCORES 814
+#define IMG_BACKGROUND_EDITOR 815
+#define IMG_BACKGROUND_INFO 816
+#define IMG_BACKGROUND_SETUP 817
+#define IMG_BACKGROUND_DOOR 818
+#define IMG_INFO_FONT_EM_1 819
+#define IMG_INFO_FONT_EM_2 820
+#define IMG_INFO_FONT_EM_3 821
+#define IMG_INFO_FONT_EM_4 822
+#define IMG_INFO_FONT_EM_5 823
-#define NUM_IMAGE_FILES 807
+#define NUM_IMAGE_FILES 824
#endif /* CONF_GFX_H */
-/***********************************************************
-* Rocks'n'Diamonds -- McDuffin Strikes Back! *
-*----------------------------------------------------------*
-* (c) 1995-2002 Artsoft Entertainment *
-* Holger Schemel *
-* Detmolder Strasse 189 *
-* 33604 Bielefeld *
-* Germany *
-* e-mail: info@artsoft.org *
-*----------------------------------------------------------*
-* conf_snd.h *
-***********************************************************/
/* ----- this file was automatically generated -- do not edit by hand ----- */
-#define COMPILE_DATE_STRING "[2003-02-17 00:43]"
+#define COMPILE_DATE_STRING "[2003-02-18 21:01]"
#define INFOTEXT_YPOS (SY + SYSIZE - MINI_TILEX + 2)
#define INFOTEXT_XSIZE SXSIZE
#define INFOTEXT_YSIZE MINI_TILEX
-#define MAX_INFOTEXT_LEN (SXSIZE / FONT2_XSIZE)
static struct
{
char *text;
} control_info[ED_NUM_CTRL_BUTTONS] =
{
- { 's', "draw single items" },
- { 'd', "draw connected items" },
- { 'l', "draw lines" },
- { 'a', "draw arcs" },
- { 'r', "draw outline rectangles" },
- { 'R', "draw filled rectangles" },
- { '\0', "wrap (rotate) level up" },
- { 't', "enter text elements" },
- { 'f', "flood fill" },
- { '\0', "wrap (rotate) level left" },
- { '?', "properties of drawing element" },
- { '\0', "wrap (rotate) level right" },
- { '\0', "random element placement" },
- { 'b', "grab brush" },
- { '\0', "wrap (rotate) level down" },
- { ',', "pick drawing element" },
- { 'U', "undo last operation" },
- { 'I', "level properties" },
- { 'S', "save level" },
- { 'C', "clear level" },
- { 'T', "test level" },
- { 'E', "exit level editor" }
+ { 's', "draw single items" },
+ { 'd', "draw connected items" },
+ { 'l', "draw lines" },
+ { 'a', "draw arcs" },
+ { 'r', "draw outline rectangles" },
+ { 'R', "draw filled rectangles" },
+ { '\0', "wrap (rotate) level up" },
+ { 't', "enter text elements" },
+ { 'f', "flood fill" },
+ { '\0', "wrap (rotate) level left" },
+ { '?', "properties of drawing element" },
+ { '\0', "wrap (rotate) level right" },
+ { '\0', "random element placement" },
+ { 'b', "grab brush" },
+ { '\0', "wrap (rotate) level down" },
+ { ',', "pick drawing element" },
+ { 'U', "undo last operation" },
+ { 'I', "level properties" },
+ { 'S', "save level" },
+ { 'C', "clear level" },
+ { 'T', "test level" },
+ { 'E', "exit level editor" }
};
/* values for random placement */
static int edit_mode;
-static int counter_xsize = DXSIZE + FONT2_XSIZE - 2 * ED_GADGET_DISTANCE;
+static int element_shift = 0;
-int element_shift = 0;
-
-int editor_el_boulderdash[] =
+static int editor_el_boulderdash[] =
{
EL_CHAR('B'),
EL_CHAR('O'),
EL_BD_FIREFLY_DOWN,
EL_EMPTY,
};
-int num_editor_el_boulderdash = SIZEOF_ARRAY_INT(editor_el_boulderdash);
+static int num_editor_el_boulderdash = SIZEOF_ARRAY_INT(editor_el_boulderdash);
-int editor_el_emerald_mine[] =
+static int editor_el_emerald_mine[] =
{
EL_CHAR('E'),
EL_CHAR('M'),
EL_EM_GATE3_GRAY,
EL_EM_GATE4_GRAY,
};
-int num_editor_el_emerald_mine = SIZEOF_ARRAY_INT(editor_el_emerald_mine);
+static int num_editor_el_emerald_mine = SIZEOF_ARRAY_INT(editor_el_emerald_mine);
-int editor_el_more[] =
+static int editor_el_more[] =
{
EL_CHAR('M'),
EL_CHAR('O'),
EL_GATE3_GRAY,
EL_GATE4_GRAY,
- EL_ARROW_BLUE_LEFT,
- EL_ARROW_BLUE_RIGHT,
- EL_ARROW_BLUE_UP,
- EL_ARROW_BLUE_DOWN,
+ EL_ARROW_LEFT,
+ EL_ARROW_RIGHT,
+ EL_ARROW_UP,
+ EL_ARROW_DOWN,
EL_AMOEBA_FULL,
EL_EMERALD_YELLOW,
EL_EMC_WALL6,
EL_EMC_WALL7,
};
-int num_editor_el_more = SIZEOF_ARRAY_INT(editor_el_more);
+static int num_editor_el_more = SIZEOF_ARRAY_INT(editor_el_more);
-int editor_el_sokoban[] =
+static int editor_el_sokoban[] =
{
EL_CHAR('S'),
EL_CHAR('O'),
EL_SOKOBAN_FIELD_FULL,
EL_STEELWALL,
};
-int num_editor_el_sokoban = SIZEOF_ARRAY_INT(editor_el_sokoban);
+static int num_editor_el_sokoban = SIZEOF_ARRAY_INT(editor_el_sokoban);
-int editor_el_supaplex[] =
+static int editor_el_supaplex[] =
{
EL_CHAR('S'),
EL_CHAR('U'),
EL_SP_CHIP_UPPER,
EL_SP_CHIP_LOWER,
};
-int num_editor_el_supaplex = SIZEOF_ARRAY_INT(editor_el_supaplex);
+static int num_editor_el_supaplex = SIZEOF_ARRAY_INT(editor_el_supaplex);
-int editor_el_diamond_caves[] =
+static int editor_el_diamond_caves[] =
{
EL_CHAR('D'),
EL_CHAR('I'),
EL_EXTRA_TIME,
EL_EMPTY,
};
-int num_editor_el_diamond_caves = SIZEOF_ARRAY_INT(editor_el_diamond_caves);
+static int num_editor_el_diamond_caves = SIZEOF_ARRAY_INT(editor_el_diamond_caves);
-int editor_el_dx_boulderdash[] =
+static int editor_el_dx_boulderdash[] =
{
EL_CHAR('D'),
EL_CHAR('X'),
EL_EMPTY,
EL_EMPTY
};
-int num_editor_el_dx_boulderdash = SIZEOF_ARRAY_INT(editor_el_dx_boulderdash);
+static int num_editor_el_dx_boulderdash = SIZEOF_ARRAY_INT(editor_el_dx_boulderdash);
-int editor_el_chars[] =
+static int editor_el_chars[] =
{
EL_CHAR('T'),
EL_CHAR('E'),
EL_CHAR('´'),
EL_CHAR('|')
};
-int num_editor_el_chars = SIZEOF_ARRAY_INT(editor_el_chars);
+static int num_editor_el_chars = SIZEOF_ARRAY_INT(editor_el_chars);
-int editor_el_custom[] =
+static int editor_el_custom[] =
{
EL_CHAR('C'),
EL_CHAR('U'),
EL_CUSTOM_START + 126,
EL_CUSTOM_START + 127
};
-int num_editor_el_custom = SIZEOF_ARRAY_INT(editor_el_custom);
+static int num_editor_el_custom = SIZEOF_ARRAY_INT(editor_el_custom);
-int *editor_elements = NULL; /* dynamically allocated */
-int num_editor_elements = 0; /* dynamically determined */
+static int *editor_elements = NULL; /* dynamically allocated */
+static int num_editor_elements = 0; /* dynamically determined */
-struct
+static struct
{
boolean *setup_value;
int *element_list;
initialization_needed = FALSE;
}
+static int getCounterGadgetWidth()
+{
+ return (DXSIZE + getFontWidth(FONT_DEFAULT_SMALL) - 2 * ED_GADGET_DISTANCE);
+}
+
+static int getMaxInfoTextLength()
+{
+ return (SXSIZE / getFontWidth(FONT_DEFAULT_SMALL));
+}
+
static char *getElementInfoText(int element)
{
char *info_text = NULL;
static void CreateCounterButtons()
{
+ int max_infotext_len = getMaxInfoTextLength();
int i;
for (i=0; i<ED_NUM_COUNTERBUTTONS; i++)
int gd_x, gd_x1, gd_x2, gd_y;
int x_size, y_size;
unsigned long event_mask;
- char infotext[MAX_INFOTEXT_LEN + 1];
+ char infotext[max_infotext_len + 1];
event_mask = GD_EVENT_PRESSED | GD_EVENT_REPEATED;
if (j == 0)
{
- int font_type = FC_YELLOW;
+ int font_type = FONT_DEFAULT_SMALL;
int gd_width = ED_WIN_COUNT_XSIZE;
id = counterbutton_info[i].gadget_id_text;
if (i == ED_COUNTER_ID_SELECT_LEVEL)
{
- font_type = FC_SPECIAL3;
+ font_type = FONT_SPECIAL_NARROW;
xpos += 2 * ED_GADGET_DISTANCE;
ypos -= ED_GADGET_DISTANCE;
static void CreateTextInputGadgets()
{
+ int max_infotext_len = getMaxInfoTextLength();
int i;
for (i=0; i<ED_NUM_TEXTINPUT; i++)
int gd_x, gd_y;
struct GadgetInfo *gi;
unsigned long event_mask;
- char infotext[1024];
+ char infotext[MAX_OUTPUT_LINESIZE + 1];
int id = textinput_info[i].gadget_id;
event_mask = GD_EVENT_TEXT_RETURN | GD_EVENT_TEXT_LEAVING;
gd_y = DOOR_GFX_PAGEY1 + ED_WIN_COUNT_YPOS;
sprintf(infotext, "Enter %s", textinput_info[i].infotext);
- infotext[MAX_INFOTEXT_LEN] = '\0';
+ infotext[max_infotext_len] = '\0';
gi = CreateGadget(GDI_CUSTOM_ID, id,
GDI_CUSTOM_TYPE_ID, i,
GDI_TYPE, GD_TYPE_TEXTINPUT_ALPHANUMERIC,
GDI_TEXT_VALUE, textinput_info[i].value,
GDI_TEXT_SIZE, textinput_info[i].size,
- GDI_TEXT_FONT, FC_YELLOW,
+ GDI_TEXT_FONT, FONT_DEFAULT_SMALL,
GDI_DESIGN_UNPRESSED, gd_bitmap, gd_x, gd_y,
GDI_DESIGN_PRESSED, gd_bitmap, gd_x, gd_y,
GDI_BORDER_SIZE, ED_BORDER_SIZE,
DrawEditModeWindow();
- /*
- FadeToFront();
- */
-
-
OpenDoor(DOOR_OPEN_1);
-
- /*
- OpenDoor(DOOR_OPEN_1 | DOOR_OPEN_2);
- */
}
static void AdjustDrawingAreaGadgets()
static void DrawLevelInfoWindow()
{
- char infotext[1024];
+ char infotext[MAX_OUTPUT_LINESIZE + 1];
+ int max_infotext_len = getMaxInfoTextLength();
int xoffset_above = 0;
int yoffset_above = -(MINI_TILEX + ED_GADGET_DISTANCE);
- int xoffset_right = counter_xsize;
+ int xoffset_right = getCounterGadgetWidth();
int yoffset_right = ED_BORDER_SIZE;
int xoffset_right2 = ED_CHECKBUTTON_XSIZE + 2 * ED_GADGET_DISTANCE;
int yoffset_right2 = ED_BORDER_SIZE;
- int font_color = FC_GREEN;
+ int font_color = FONT(FS_SMALL, FC_GREEN);
int i, x, y;
- SetMainBackgroundImage(IMG_BACKGROUND_EDITOR_SETTINGS_LEVEL);
+ SetMainBackgroundImage(IMG_BACKGROUND_EDITOR);
ClearWindow();
UnmapLevelEditorWindowGadgets();
DrawText(SX + ED_SETTINGS2_XPOS, SY + ED_SETTINGS_YPOS,
- "Level Settings", FS_BIG, FC_YELLOW);
+ "Level Settings", FONT_DEFAULT_BIG);
DrawText(SX + ED_SETTINGS2_XPOS, SY + ED_SETTINGS2_YPOS,
- "Editor Settings", FS_BIG, FC_YELLOW);
+ "Editor Settings", FONT_DEFAULT_BIG);
/* draw counter gadgets */
for (i=ED_COUNTER_ID_LEVEL_FIRST; i<=ED_COUNTER_ID_LEVEL_LAST; i++)
y = counterbutton_info[i].y + yoffset_above;
sprintf(infotext, "%s:", counterbutton_info[i].infotext_above);
- infotext[MAX_INFOTEXT_LEN] = '\0';
+ infotext[max_infotext_len] = '\0';
DrawTextF(x, y, font_color, infotext);
}
y = counterbutton_info[i].y + yoffset_right;
sprintf(infotext, "%s", counterbutton_info[i].infotext_right);
- infotext[MAX_INFOTEXT_LEN] = '\0';
+ infotext[max_infotext_len] = '\0';
DrawTextF(x, y, font_color, infotext);
}
y = textinput_info[i].y + yoffset_above;
sprintf(infotext, "%s:", textinput_info[i].infotext);
- infotext[MAX_INFOTEXT_LEN] = '\0';
+ infotext[max_infotext_len] = '\0';
DrawTextF(x, y, font_color, infotext);
ModifyEditorTextInput(i, textinput_info[i].value);
int area_y = ED_AREA_ELEM_CONTENT_YPOS / MINI_TILEY;
int area_sx = SX + ED_AREA_ELEM_CONTENT_XPOS;
int area_sy = SY + ED_AREA_ELEM_CONTENT_YPOS;
- int font_color = FC_GREEN;
+ int font_color = FONT(FS_SMALL, FC_GREEN);
ElementContent[0][0][0] = level.amoeba_content;
DrawElementBorder(area_sx, area_sy, MINI_TILEX, MINI_TILEY);
DrawMiniElement(area_x, area_y, ElementContent[0][0][0]);
- DrawText(area_sx + TILEX, area_sy + 1, "Content of amoeba",
- FS_SMALL, font_color);
+ DrawText(area_sx + TILEX, area_sy + 1, "Content of amoeba", font_color);
MapDrawingArea(GADGET_ID_AMOEBA_CONTENT);
}
int area_y = ED_AREA_ELEM_CONTENT_YPOS / MINI_TILEY;
int area_sx = SX + ED_AREA_ELEM_CONTENT_XPOS;
int area_sy = SY + ED_AREA_ELEM_CONTENT_YPOS;
- int xoffset_right = counter_xsize;
+ int xoffset_right = getCounterGadgetWidth();
int yoffset_right = ED_BORDER_SIZE;
- int font_color = FC_GREEN;
+ int font_color = FONT(FS_SMALL, FC_GREEN);
int i, x, y;
for (i=0; i<MAX_ELEMENT_CONTENTS; i++)
3 * MINI_TILEX, 3 * MINI_TILEY);
DrawText(area_sx + (5 * 4 - 1) * MINI_TILEX, area_sy + 0 * MINI_TILEY + 1,
- "Content", FS_SMALL, font_color);
+ "Content", font_color);
DrawText(area_sx + (5 * 4 - 1) * MINI_TILEX, area_sy + 1 * MINI_TILEY + 1,
- "when", FS_SMALL, font_color);
+ "when", font_color);
DrawText(area_sx + (5 * 4 - 1) * MINI_TILEX, area_sy + 2 * MINI_TILEY + 1,
- "smashed", FS_SMALL, font_color);
+ "smashed", font_color);
for (i=0; i<level.num_yam_contents; i++)
{
int counter_id = ED_COUNTER_ID_ELEM_SCORE;
int num_elements_in_level;
float percentage;
- int xoffset_right = counter_xsize;
+ int xoffset_right = getCounterGadgetWidth();
int yoffset_right = ED_BORDER_SIZE;
int xoffset_right2 = ED_CHECKBUTTON_XSIZE + 2 * ED_GADGET_DISTANCE;
int yoffset_right2 = ED_BORDER_SIZE;
int xstart = 2;
int ystart = 4;
- int font_color = FC_GREEN;
+ int font_color = FONT(FS_SMALL, FC_GREEN);
int i, x, y;
static struct
{
{ -1, NULL, NULL }
};
- SetMainBackgroundImage(IMG_BACKGROUND_EDITOR_SETTINGS_ELEMENT);
+ SetMainBackgroundImage(IMG_BACKGROUND_EDITOR);
ClearWindow();
UnmapLevelEditorWindowGadgets();
DrawText(SX + ED_SETTINGS2_XPOS, SY + ED_SETTINGS_YPOS,
- "Element Settings", FS_BIG, FC_YELLOW);
+ "Element Settings", FONT_DEFAULT_BIG);
DrawElementBorder(SX + xstart * MINI_TILEX,
SY + ystart * MINI_TILEY + MINI_TILEY / 2,
percentage = num_elements_in_level * 100.0 / (lev_fieldx * lev_fieldy);
DrawTextF(ED_SETTINGS_XPOS, 5 * TILEY, font_color, "In this level:");
- DrawTextF(ED_SETTINGS_XPOS + 15 * FONT2_XSIZE, 5 * TILEY, FC_YELLOW,
- "%d (%.2f%%)", num_elements_in_level, percentage);
+ DrawTextF(ED_SETTINGS_XPOS + 15 * getFontWidth(font_color), 5 * TILEY,
+ FONT(FS_SMALL, FC_YELLOW), "%d (%.2f%%)", num_elements_in_level,
+ percentage);
/* check if there are elements where a score can be chosen for */
for (i=0; elements_with_counter[i].element != -1; i++)
void HandleEditorGadgetInfoText(void *ptr)
{
struct GadgetInfo *gi = (struct GadgetInfo *)ptr;
- char infotext[MAX_INFOTEXT_LEN + 1];
- char shortcut[MAX_INFOTEXT_LEN + 1];
+ char infotext[MAX_OUTPUT_LINESIZE + 1];
+ char shortcut[MAX_OUTPUT_LINESIZE + 1];
+ int max_infotext_len = getMaxInfoTextLength();
if (game_status != LEVELED)
return;
if (gi == NULL || gi->info_text == NULL)
return;
- strncpy(infotext, gi->info_text, MAX_INFOTEXT_LEN);
- infotext[MAX_INFOTEXT_LEN] = '\0';
+ strncpy(infotext, gi->info_text, max_infotext_len);
+ infotext[max_infotext_len] = '\0';
if (gi->custom_id < ED_NUM_CTRL_BUTTONS)
{
sprintf(shortcut, " ('%s%c')",
(key >= 'A' && key <= 'Z' ? "Shift-" : ""), key);
- if (strlen(infotext) + strlen(shortcut) <= MAX_INFOTEXT_LEN)
+ if (strlen(infotext) + strlen(shortcut) <= max_infotext_len)
strcat(infotext, shortcut);
}
}
- DrawText(INFOTEXT_XPOS, INFOTEXT_YPOS, infotext, FS_SMALL, FC_YELLOW);
+ DrawText(INFOTEXT_XPOS, INFOTEXT_YPOS, infotext, FONT_DEFAULT_SMALL);
}
static void HandleDrawingAreaInfo(struct GadgetInfo *gi)
}
if (drawing_function == GADGET_ID_PICK_ELEMENT)
- DrawTextF(INFOTEXT_XPOS - SX, INFOTEXT_YPOS - SY, FC_YELLOW,
+ DrawTextF(INFOTEXT_XPOS - SX, INFOTEXT_YPOS - SY, FONT_DEFAULT_SMALL,
"%s: %d, %d", infotext, lx, ly);
else
- DrawTextF(INFOTEXT_XPOS - SX, INFOTEXT_YPOS - SY, FC_YELLOW,
+ DrawTextF(INFOTEXT_XPOS - SX, INFOTEXT_YPOS - SY, FONT_DEFAULT_SMALL,
"%s: %d, %d", infotext,
ABS(lx - start_lx) + 1, ABS(ly - start_ly) + 1);
}
else if (drawing_function == GADGET_ID_PICK_ELEMENT)
- DrawTextF(INFOTEXT_XPOS - SX, INFOTEXT_YPOS - SY, FC_YELLOW,
+ DrawTextF(INFOTEXT_XPOS - SX, INFOTEXT_YPOS - SY, FONT_DEFAULT_SMALL,
"%s", getElementInfoText(Feld[lx][ly]));
else
- DrawTextF(INFOTEXT_XPOS - SX, INFOTEXT_YPOS - SY, FC_YELLOW,
+ DrawTextF(INFOTEXT_XPOS - SX, INFOTEXT_YPOS - SY, FONT_DEFAULT_SMALL,
"Level position: %d, %d", lx, ly);
}
}
}
else if (id == GADGET_ID_AMOEBA_CONTENT)
- DrawTextF(INFOTEXT_XPOS - SX, INFOTEXT_YPOS - SY, FC_YELLOW,
+ DrawTextF(INFOTEXT_XPOS - SX, INFOTEXT_YPOS - SY, FONT_DEFAULT_SMALL,
"Amoeba content");
else if (id == GADGET_ID_RANDOM_BACKGROUND)
- DrawTextF(INFOTEXT_XPOS - SX, INFOTEXT_YPOS - SY, FC_YELLOW,
+ DrawTextF(INFOTEXT_XPOS - SX, INFOTEXT_YPOS - SY, FONT_DEFAULT_SMALL,
"Random placement background");
else
- DrawTextF(INFOTEXT_XPOS - SX, INFOTEXT_YPOS - SY, FC_YELLOW,
+ DrawTextF(INFOTEXT_XPOS - SX, INFOTEXT_YPOS - SY, FONT_DEFAULT_SMALL,
"Content area %d position: %d, %d",
id - GADGET_ID_ELEM_CONTENT_0 + 1, sx, sy);
}
el2edimg(EL_KEY1 + j));
DrawText(DX + XX_EMERALDS, DY + YY_EMERALDS,
- int2str(local_player->gems_still_needed, 3), FS_SMALL, FC_YELLOW);
+ int2str(local_player->gems_still_needed, 3), FONT_DEFAULT_SMALL);
DrawText(DX + XX_DYNAMITE, DY + YY_DYNAMITE,
- int2str(local_player->dynamite, 3), FS_SMALL, FC_YELLOW);
+ int2str(local_player->dynamite, 3), FONT_DEFAULT_SMALL);
DrawText(DX + XX_SCORE, DY + YY_SCORE,
- int2str(local_player->score, 5), FS_SMALL, FC_YELLOW);
+ int2str(local_player->score, 5), FONT_DEFAULT_SMALL);
DrawText(DX + XX_TIME, DY + YY_TIME,
- int2str(TimeLeft, 3), FS_SMALL, FC_YELLOW);
+ int2str(TimeLeft, 3), FONT_DEFAULT_SMALL);
}
if (level_nr < 100)
DrawText(DX + XX_LEVEL, DY + YY_LEVEL,
- int2str(level_nr, 2), FS_SMALL, FC_YELLOW);
+ int2str(level_nr, 2), FONT_DEFAULT_SMALL);
else
{
DrawTextExt(drawto, DX + XX_EMERALDS, DY + YY_EMERALDS,
- int2str(level_nr, 3), FS_SMALL, FC_SPECIAL3, FONT_OPAQUE);
+ int2str(level_nr, 3), FONT_SPECIAL_NARROW, FONT_OPAQUE);
BlitBitmap(drawto, drawto,
DX + XX_EMERALDS, DY + YY_EMERALDS + 1,
- FONT5_XSIZE * 3, FONT5_YSIZE - 1,
+ getFontWidth(FONT_SPECIAL_NARROW) * 3,
+ getFontHeight(FONT_SPECIAL_NARROW) - 1,
DX + XX_LEVEL - 1, DY + YY_LEVEL + 1);
}
TimeLeft -= 10;
else
TimeLeft--;
- DrawText(DX_TIME, DY_TIME, int2str(TimeLeft, 3), FS_SMALL, FC_YELLOW);
+ DrawText(DX_TIME, DY_TIME, int2str(TimeLeft, 3), FONT_DEFAULT_SMALL);
BackToFront();
if (!tape.playing)
TimePlayed += 10;
else
TimePlayed++;
- DrawText(DX_TIME, DY_TIME, int2str(TimePlayed, 3), FS_SMALL, FC_YELLOW);
+ DrawText(DX_TIME, DY_TIME, int2str(TimePlayed, 3), FONT_DEFAULT_SMALL);
BackToFront();
if (!tape.playing)
if (TimeLeft <= 10 && setup.time_limit)
PlaySoundStereo(SND_GAME_RUNNING_OUT_OF_TIME, SOUND_MAX_RIGHT);
- DrawText(DX_TIME, DY_TIME, int2str(TimeLeft, 3), FS_SMALL, FC_YELLOW);
+ DrawText(DX_TIME, DY_TIME, int2str(TimeLeft, 3), FONT_DEFAULT_SMALL);
if (!TimeLeft && setup.time_limit)
for (i=0; i<MAX_PLAYERS; i++)
KillHero(&stored_player[i]);
}
else if (level.time == 0 && !AllPlayersGone) /* level without time limit */
- DrawText(DX_TIME, DY_TIME, int2str(TimePlayed, 3), FS_SMALL, FC_YELLOW);
+ DrawText(DX_TIME, DY_TIME, int2str(TimePlayed, 3), FONT_DEFAULT_SMALL);
}
DrawAllPlayers();
RaiseScoreElement(element);
DrawText(DX_EMERALDS, DY_EMERALDS,
int2str(local_player->gems_still_needed, 3),
- FS_SMALL, FC_YELLOW);
+ FONT_DEFAULT_SMALL);
PlaySoundLevelElementAction(x, y, element, ACTION_COLLECTING);
break;
if (level.time > 0)
{
TimeLeft += 10;
- DrawText(DX_TIME, DY_TIME, int2str(TimeLeft, 3), FS_SMALL, FC_YELLOW);
+ DrawText(DX_TIME, DY_TIME, int2str(TimeLeft, 3), FONT_DEFAULT_SMALL);
}
PlaySoundStereo(SND_EXTRA_TIME_COLLECTING, SOUND_MAX_RIGHT);
break;
player->dynamite++;
RaiseScoreElement(EL_DYNAMITE);
DrawText(DX_DYNAMITE, DY_DYNAMITE,
- int2str(local_player->dynamite, 3),
- FS_SMALL, FC_YELLOW);
+ int2str(local_player->dynamite, 3), FONT_DEFAULT_SMALL);
PlaySoundLevelElementAction(x, y, element, ACTION_COLLECTING);
break;
case EL_TIME_ORB_FULL:
Feld[x][y] = EL_TIME_ORB_EMPTY;
TimeLeft += 10;
- DrawText(DX_TIME, DY_TIME, int2str(TimeLeft, 3), FS_SMALL, FC_YELLOW);
+ DrawText(DX_TIME, DY_TIME, int2str(TimeLeft, 3), FONT_DEFAULT_SMALL);
DrawLevelField(x, y);
PlaySoundStereo(SND_TIME_ORB_FULL_COLLECTING, SOUND_MAX_RIGHT);
return MF_ACTION;
player->dynamite--;
DrawText(DX_DYNAMITE, DY_DYNAMITE, int2str(local_player->dynamite, 3),
- FS_SMALL, FC_YELLOW);
+ FONT_DEFAULT_SMALL);
if (IN_SCR_FIELD(SCREENX(jx), SCREENY(jy)))
{
if (game.emulation == EMU_SUPAPLEX)
{
local_player->score += value;
DrawText(DX_SCORE, DY_SCORE, int2str(local_player->score, 5),
- FS_SMALL, FC_YELLOW);
+ FONT_DEFAULT_SMALL);
}
void RaiseScoreElement(int element)
#include "conf_e2g.c" /* include auto-generated data structure definitions */
#include "conf_esg.c" /* include auto-generated data structure definitions */
+#define CONFIG_TOKEN_FONT_INITIAL "font.initial"
-static Bitmap *bitmap_font_initial = NULL;
+struct FontInfo font_info_initial[NUM_INITIAL_FONTS];
static void InitGlobal();
static void InitSetup();
static void InitGfx();
static void InitGfxBackground();
static void InitGadgets();
+static void InitFontGraphicInfo();
static void InitElementSmallImages();
static void InitElementGraphicInfo();
static void InitElementSpecialGraphicInfo();
InitGraphicInfo(); /* graphic properties mapping */
InitElementSmallImages(); /* create editor and preview images */
+ InitFontGraphicInfo(); /* initialize text drawing functions */
- InitFontInfo(bitmap_font_initial,
- graphic_info[IMG_FONT_BIG].bitmap,
- graphic_info[IMG_FONT_MEDIUM].bitmap,
- graphic_info[IMG_FONT_SMALL].bitmap,
- graphic_info[IMG_FONT_EM].bitmap);
-
- SetMainBackgroundImage(IMG_BACKGROUND_DEFAULT);
+ SetMainBackgroundImage(IMG_BACKGROUND);
SetDoorBackgroundImage(IMG_BACKGROUND_DOOR);
InitGadgets();
void InitGfx()
{
- char *config_token_font_initial = "font.small";
char *filename_font_initial = NULL;
- int i;
+ Bitmap *bitmap_font_initial = NULL;
+ int i, j;
- /* determine filename for initial font (for displaying startup messages) */
+ /* determine settings for initial font (for displaying startup messages) */
for (i=0; image_config[i].token != NULL; i++)
- if (strcmp(image_config[i].token, config_token_font_initial) == 0)
- filename_font_initial = image_config[i].value;
+ {
+ for (j=0; j < NUM_INITIAL_FONTS; j++)
+ {
+ char font_token[128];
+ int len_font_token;
+
+ sprintf(font_token, "%s_%d", CONFIG_TOKEN_FONT_INITIAL, j + 1);
+ len_font_token = strlen(font_token);
+
+ if (strcmp(image_config[i].token, font_token) == 0)
+ filename_font_initial = image_config[i].value;
+ else if (strlen(image_config[i].token) > len_font_token &&
+ strncmp(image_config[i].token, font_token, len_font_token) == 0)
+ {
+ if (strcmp(&image_config[i].token[len_font_token], ".x") == 0)
+ font_info_initial[j].src_x = atoi(image_config[i].value);
+ else if (strcmp(&image_config[i].token[len_font_token], ".y") == 0)
+ font_info_initial[j].src_y = atoi(image_config[i].value);
+ else if (strcmp(&image_config[i].token[len_font_token], ".width") == 0)
+ font_info_initial[j].width = atoi(image_config[i].value);
+ else if (strcmp(&image_config[i].token[len_font_token],".height") == 0)
+ font_info_initial[j].height = atoi(image_config[i].value);
+ }
+ }
+ }
if (filename_font_initial == NULL) /* should not happen */
- Error(ERR_EXIT, "cannot get filename for '%s'", config_token_font_initial);
+ Error(ERR_EXIT, "cannot get filename for '%s'", CONFIG_TOKEN_FONT_INITIAL);
/* initialize screen properties */
InitGfxFieldInfo(SX, SY, SXSIZE, SYSIZE,
bitmap_font_initial = LoadCustomImage(filename_font_initial);
- InitFontInfo(bitmap_font_initial, NULL, NULL, NULL, NULL);
+ for (j=0; j < NUM_INITIAL_FONTS; j++)
+ font_info_initial[j].bitmap = bitmap_font_initial;
+
+ InitFontGraphicInfo();
DrawInitText(WINDOW_TITLE_STRING, 20, FC_YELLOW);
DrawInitText(WINDOW_SUBTITLE_STRING, 50, FC_RED);
for (i=0; element_to_special_graphic[i].element > -1; i++)
CreateImageWithSmallImages(element_to_special_graphic[i].graphic);
+ /* !!! CHECK FOR ELEMENT-ONLY GRAPHICS !!! */
/* initialize images from dynamic configuration */
for (i=0; i < num_property_mappings; i++)
CreateImageWithSmallImages(property_mapping[i].artwork_index);
}
+void InitFontGraphicInfo()
+{
+ static struct FontInfo font_info[NUM_IMG_FONTS];
+ int num_fonts = NUM_IMG_FONTS;
+ int i;
+
+ if (graphic_info == NULL) /* still at startup phase */
+ num_fonts = NUM_INITIAL_FONTS;
+
+ for (i=0; i < num_fonts; i++)
+ {
+ if (i < NUM_INITIAL_FONTS)
+ font_info[i] = font_info_initial[i];
+ else
+ {
+ /* copy font relevant information from graphics information */
+ font_info[i].bitmap = graphic_info[FIRST_IMG_FONT + i].bitmap;
+ font_info[i].src_x = graphic_info[FIRST_IMG_FONT + i].src_x;
+ font_info[i].src_y = graphic_info[FIRST_IMG_FONT + i].src_y;
+ font_info[i].width = graphic_info[FIRST_IMG_FONT + i].width;
+ font_info[i].height = graphic_info[FIRST_IMG_FONT + i].height;
+ font_info[i].draw_x = graphic_info[FIRST_IMG_FONT + i].draw_x;
+ font_info[i].draw_y = graphic_info[FIRST_IMG_FONT + i].draw_y;
+ }
+ }
+
+ InitFontInfo(font_info, num_fonts);
+}
+
void InitElementGraphicInfo()
{
struct PropertyMapping *property_mapping = getImageListPropertyMapping();
/* this is only used for toon animations */
graphic_info[graphic].step_offset = parameter[GFX_ARG_STEP_OFFSET];
graphic_info[graphic].step_delay = parameter[GFX_ARG_STEP_DELAY];
+
+ /* this is only used for drawing font characters */
+ graphic_info[graphic].draw_x = parameter[GFX_ARG_DRAW_XOFFSET];
+ graphic_info[graphic].draw_y = parameter[GFX_ARG_DRAW_YOFFSET];
}
static void InitGraphicInfo()
FreeAllImages();
FreeTileClipmasks();
- if (bitmap_font_initial)
- FreeBitmap(bitmap_font_initial);
-
CloseVideoDisplay();
ClosePlatformDependantStuff();
char cursor_string[3];
char text[MAX_GADGET_TEXTSIZE + 1];
int font_type = gi->text.font_type;
- int font_width = getFontWidth(FS_SMALL, font_type);
+ int font_width = getFontWidth(font_type);
int border = gi->border.size;
strcpy(text, gi->text.value);
strcat(text, " ");
/* gadget text value */
DrawTextExt(drawto,
gi->x + border, gi->y + border, text,
- FS_SMALL, font_type, FONT_OPAQUE);
+ font_type, FONT_OPAQUE);
cursor_letter = gi->text.value[gi->text.cursor_position];
cursor_string[0] = '~';
DrawTextExt(drawto,
gi->x + border + gi->text.cursor_position * font_width,
gi->y + border, cursor_string,
- FS_SMALL, font_type, FONT_OPAQUE);
+ font_type, FONT_OPAQUE);
}
break;
if (gi->type & GD_TYPE_TEXTINPUT)
{
- int font_width = getFontWidth(FS_SMALL, gi->text.font_type);
- int font_height = getFontHeight(FS_SMALL, gi->text.font_type);
+ int font_width = getFontWidth(gi->text.font_type);
+ int font_height = getFontHeight(gi->text.font_type);
gi->width = 2 * gi->border.size + (gi->text.size + 1) * font_width;
gi->height = 2 * gi->border.size + font_height;
/* if mouse button pressed inside activated text gadget, set cursor */
gi->text.cursor_position =
(mx - gi->x - gi->border.size) /
- getFontWidth(FS_SMALL, gi->text.font_type);
+ getFontWidth(gi->text.font_type);
if (gi->text.cursor_position < 0)
gi->text.cursor_position = 0;
struct VideoSystemInfo video;
struct AudioSystemInfo audio;
struct GfxInfo gfx;
-struct FontInfo font;
struct AnimInfo anim;
struct ArtworkInfo artwork;
struct JoystickInfo joystick;
int first_sound_channel;
};
+struct FontInfo
+{
+ Bitmap *bitmap;
+ int src_x, src_y; /* start position of animation frames */
+ int width, height; /* width/height of each animation frame */
+ int draw_x, draw_y; /* offset for drawing font characters */
+
+#if defined(TARGET_X11_NATIVE_PERFORMANCE_WORKAROUND)
+ Pixmap *clip_mask; /* single-char-only clip mask array for X11 */
+#endif
+};
+
struct GfxInfo
{
int sx, sy;
int background_bitmap_mask;
boolean menu_main_hide_static_text;
-};
-struct FontInfo
-{
- Bitmap *bitmap_initial;
- Bitmap *bitmap_big;
- Bitmap *bitmap_medium;
- Bitmap *bitmap_small;
- Bitmap *bitmap_tile;
+ int num_fonts;
+ struct FontInfo *font;
};
struct AnimInfo
extern struct VideoSystemInfo video;
extern struct AudioSystemInfo audio;
extern struct GfxInfo gfx;
-extern struct FontInfo font;
extern struct AnimInfo anim;
extern struct ArtworkInfo artwork;
extern struct JoystickInfo joystick;
#include <stdarg.h>
#include "text.h"
+#include "misc.h"
/* ========================================================================= */
/* font functions */
/* ========================================================================= */
-#define NUM_FONTS 2
-#define NUM_FONT_COLORS 4
#define NUM_FONT_CHARS (FONT_LINES_PER_FONT * FONT_CHARS_PER_LINE)
#if defined(TARGET_X11_NATIVE_PERFORMANCE_WORKAROUND)
-static GC tile_clip_gc = None;
-static Pixmap tile_clipmask[NUM_FONTS][NUM_FONT_COLORS][NUM_FONT_CHARS];
-
-static struct
-{
- Bitmap **bitmap;
- int xsize, ysize;
-} font_info[NUM_FONTS] =
-{
- { &font.bitmap_big, FONT1_XSIZE, FONT1_YSIZE },
- { &font.bitmap_medium, FONT6_XSIZE, FONT6_YSIZE }
-};
+static GC font_clip_gc = None;
static void InitFontClipmasks()
{
static boolean clipmasks_initialized = FALSE;
- boolean fonts_initialized = TRUE;
XGCValues clip_gc_values;
unsigned long clip_gc_valuemask;
GC copy_clipmask_gc;
- int i, j, k;
-
- for (i=0; i<NUM_FONTS; i++)
- if (*font_info[i].bitmap == NULL)
- fonts_initialized = FALSE;
+ int i, j;
- if (!fonts_initialized)
+ if (gfx.num_fonts == 0 || gfx.font[0].bitmap == NULL)
return;
- if (clipmasks_initialized)
- for (i=0; i<NUM_FONTS; i++)
- for (j=0; j<NUM_FONT_COLORS; j++)
- for (k=0; k<NUM_FONT_CHARS; k++)
- XFreePixmap(display, tile_clipmask[i][j][k]);
+ if (!clipmasks_initialized)
+ {
+ for (i=0; i < gfx.num_fonts; i++)
+ gfx.font[i].clip_mask = NULL;
+
+ clipmasks_initialized = TRUE;
+ }
- if (tile_clip_gc)
- XFreeGC(display, tile_clip_gc);
- tile_clip_gc = None;
+ for (i=0; i < gfx.num_fonts; i++)
+ {
+ if (gfx.font[i].clip_mask)
+ for (j=0; j < NUM_FONT_CHARS; j++)
+ XFreePixmap(display, gfx.font[i].clip_mask[j]);
+ free(gfx.font[i].clip_mask);
+
+ gfx.font[i].clip_mask = NULL;
+ }
+
+ if (font_clip_gc)
+ XFreeGC(display, font_clip_gc);
+ font_clip_gc = None;
/* This stuff is needed because X11 (XSetClipOrigin(), to be precise) is
often very slow when preparing a masked XCopyArea() for big Pixmaps.
clip_gc_values.graphics_exposures = False;
clip_gc_valuemask = GCGraphicsExposures;
- tile_clip_gc = XCreateGC(display, window->drawable,
+ font_clip_gc = XCreateGC(display, window->drawable,
clip_gc_valuemask, &clip_gc_values);
/* create graphic context structures needed for clipping */
clip_gc_values.graphics_exposures = False;
clip_gc_valuemask = GCGraphicsExposures;
- copy_clipmask_gc = XCreateGC(display, (*font_info[0].bitmap)->clip_mask,
+ copy_clipmask_gc = XCreateGC(display, gfx.font[0].bitmap->clip_mask,
clip_gc_valuemask, &clip_gc_values);
/* create only those clipping Pixmaps we really need */
- for (i=0; i<NUM_FONTS; i++)
- for (j=0; j<NUM_FONT_COLORS; j++)
- for (k=0; k<NUM_FONT_CHARS; k++)
+ for (i=0; i < gfx.num_fonts; i++)
{
- Bitmap *src_bitmap = *font_info[i].bitmap;
- Pixmap src_pixmap = src_bitmap->clip_mask;
- int xpos = k % FONT_CHARS_PER_LINE;
- int ypos = k / FONT_CHARS_PER_LINE;
- int xsize = font_info[i].xsize;
- int ysize = font_info[i].ysize;
- int src_x = xsize * xpos;
- int src_y = ysize * (ypos + j * FONT_LINES_PER_FONT);
-
- tile_clipmask[i][j][k] =
- XCreatePixmap(display, window->drawable, xsize, ysize, 1);
-
- XCopyArea(display, src_pixmap, tile_clipmask[i][j][k], copy_clipmask_gc,
- src_x, src_y, xsize, ysize, 0, 0);
+ if (gfx.font[i].bitmap == NULL)
+ continue;
+
+ gfx.font[i].clip_mask = checked_calloc(NUM_FONT_CHARS * sizeof(Pixmap));
+
+ for (j=0; j < NUM_FONT_CHARS; j++)
+ {
+ Bitmap *src_bitmap = gfx.font[i].bitmap;
+ Pixmap src_pixmap = src_bitmap->clip_mask;
+ int xpos = j % FONT_CHARS_PER_LINE;
+ int ypos = j / FONT_CHARS_PER_LINE;
+ int width = gfx.font[i].width;
+ int height = gfx.font[i].height;
+ int src_x = gfx.font[i].src_x + xpos * width;
+ int src_y = gfx.font[i].src_y + ypos * height;
+
+ gfx.font[i].clip_mask[j] =
+ XCreatePixmap(display, window->drawable, width, height, 1);
+
+ XCopyArea(display, src_pixmap, gfx.font[i].clip_mask[j],
+ copy_clipmask_gc, src_x, src_y, width, height, 0, 0);
+ }
}
XFreeGC(display, copy_clipmask_gc);
-
- clipmasks_initialized = TRUE;
}
#endif /* TARGET_X11_NATIVE_PERFORMANCE_WORKAROUND */
-void InitFontInfo(Bitmap *bitmap_initial,
- Bitmap *bitmap_big, Bitmap *bitmap_medium,
- Bitmap *bitmap_small, Bitmap *bitmap_tile)
+void InitFontInfo(struct FontInfo *font_info, int num_fonts)
{
- font.bitmap_initial = bitmap_initial;
- font.bitmap_big = bitmap_big;
- font.bitmap_medium = bitmap_medium;
- font.bitmap_small = bitmap_small;
- font.bitmap_tile = bitmap_tile;
+ gfx.num_fonts = num_fonts;
+ gfx.font = font_info;
#if defined(TARGET_X11_NATIVE_PERFORMANCE_WORKAROUND)
InitFontClipmasks();
#endif
}
-int getFontWidth(int font_size, int font_type)
+int getFontWidth(int font_nr)
{
- return (font_type == FC_SPECIAL1 ? FONT3_XSIZE :
- font_type == FC_SPECIAL2 ? FONT4_XSIZE :
- font_type == FC_SPECIAL3 ? FONT5_XSIZE :
- font_size == FS_BIG ? FONT1_XSIZE :
- font_size == FS_MEDIUM ? FONT6_XSIZE :
- font_size == FS_SMALL ? FONT2_XSIZE :
- FONT2_XSIZE);
+ return gfx.font[font_nr].width;
}
-int getFontHeight(int font_size, int font_type)
+int getFontHeight(int font_nr)
{
- return (font_type == FC_SPECIAL1 ? FONT3_YSIZE :
- font_type == FC_SPECIAL2 ? FONT4_YSIZE :
- font_type == FC_SPECIAL3 ? FONT5_YSIZE :
- font_size == FS_BIG ? FONT1_YSIZE :
- font_size == FS_MEDIUM ? FONT6_YSIZE :
- font_size == FS_SMALL ? FONT2_YSIZE :
- FONT2_YSIZE);
+ return gfx.font[font_nr].height;
}
-void DrawInitText(char *text, int ypos, int color)
+void DrawInitText(char *text, int ypos, int font_nr)
{
- if (window && font.bitmap_initial)
+ if (window && gfx.num_fonts > 0 && gfx.font[font_nr].bitmap != NULL)
{
- ClearRectangle(window, 0, ypos, video.width, FONT2_YSIZE);
- DrawTextExt(window, (video.width - strlen(text) * FONT2_XSIZE)/2,
- ypos, text, FS_INITIAL, color, FONT_OPAQUE);
+ int text_width = strlen(text) * gfx.font[font_nr].width;
+
+ ClearRectangle(window, 0, ypos, video.width, gfx.font[font_nr].height);
+ DrawTextExt(window, (video.width - text_width) / 2, ypos, text, font_nr,
+ FONT_OPAQUE);
FlushDisplay();
}
}
-void DrawTextFCentered(int y, int font_type, char *format, ...)
+void DrawTextFCentered(int y, int font, char *format, ...)
{
char buffer[MAX_OUTPUT_LINESIZE + 1];
- int font_width = getFontWidth(FS_SMALL, font_type);
va_list ap;
va_start(ap, format);
vsprintf(buffer, format, ap);
va_end(ap);
- DrawText(gfx.sx + (gfx.sxsize - strlen(buffer) * font_width) / 2,
- gfx.sy + y, buffer, FS_SMALL, font_type);
+ if (strlen(buffer) > MAX_OUTPUT_LINESIZE)
+ Error(ERR_EXIT, "string too long in DrawTextFCentered() -- aborting");
+
+ DrawText(gfx.sx + (gfx.sxsize - strlen(buffer) * gfx.font[font].width) / 2,
+ gfx.sy + y, buffer, font);
}
-void DrawTextF(int x, int y, int font_type, char *format, ...)
+void DrawTextF(int x, int y, int font, char *format, ...)
{
char buffer[MAX_OUTPUT_LINESIZE + 1];
va_list ap;
vsprintf(buffer, format, ap);
va_end(ap);
- DrawText(gfx.sx + x, gfx.sy + y, buffer, FS_SMALL, font_type);
+ if (strlen(buffer) > MAX_OUTPUT_LINESIZE)
+ Error(ERR_EXIT, "string too long in DrawTextF() -- aborting");
+
+ DrawText(gfx.sx + x, gfx.sy + y, buffer, font);
}
-void DrawText(int x, int y, char *text, int font_size, int font_type)
+void DrawText(int x, int y, char *text, int font)
{
int mask_mode = FONT_OPAQUE;
if (DrawingOnBackground(x, y))
mask_mode = FONT_MASKED;
- DrawTextExt(drawto, x, y, text, font_size, font_type, mask_mode);
+ DrawTextExt(drawto, x, y, text, font, mask_mode);
if (x < gfx.dx)
redraw_mask |= REDRAW_FIELD;
redraw_mask |= REDRAW_DOOR_1;
}
-void DrawTextExt(DrawBuffer *bitmap, int x, int y, char *text,
- int font_size, int font_type, int mask_mode)
+void DrawTextExt(DrawBuffer *dst_bitmap, int dst_x, int dst_y, char *text,
+ int font_nr, int mask_mode)
{
- Bitmap *font_bitmap;
- int font_width, font_height, font_starty;
+ struct FontInfo *font = &gfx.font[font_nr];
boolean print_inverse = FALSE;
- if (font_size != FS_BIG && font_size != FS_MEDIUM && font_size != FS_SMALL)
- font_size = FS_INITIAL;
- if (font_type < FC_RED || font_type > FC_SPECIAL3)
- font_type = FC_RED;
-
- font_width = getFontWidth(font_size, font_type);
- font_height = getFontHeight(font_size, font_type);
-
- font_bitmap = (font_type == FC_SPECIAL2 ? font.bitmap_tile :
- font_size == FS_BIG ? font.bitmap_big :
- font_size == FS_MEDIUM ? font.bitmap_medium :
- font_size == FS_SMALL ? font.bitmap_small :
- font.bitmap_initial);
-
- if (font_bitmap == NULL)
+ if (font->bitmap == NULL)
return;
- if (font_type == FC_SPECIAL2)
- font_starty = (font_size == FS_BIG ? 0 : FONT1_YSIZE) * 5;
- else
- font_starty = (font_type * (font_size == FS_BIG ? FONT1_YSIZE :
- font_size == FS_MEDIUM ? FONT6_YSIZE :
- font_size == FS_SMALL ? FONT2_YSIZE :
- FONT2_YSIZE) *
- FONT_LINES_PER_FONT);
-
- if (font_type == FC_SPECIAL3)
- font_starty -= FONT2_YSIZE * FONT_LINES_PER_FONT;
+ /* add offset for drawing font characters */
+ dst_x += font->draw_x;
+ dst_y += font->draw_y;
while (*text)
{
char c = *text++;
- if (c == '~' && font_size == FS_SMALL)
+ if (c == '~')
{
print_inverse = TRUE;
continue;
if ((c >= 32 && c <= 95) || c == '°' || c == '´' || c == '|')
{
- int src_x = ((c - 32) % FONT_CHARS_PER_LINE) * font_width;
- int src_y = ((c - 32) / FONT_CHARS_PER_LINE) * font_height + font_starty;
- int dest_x = x, dest_y = y;
+ int src_x= font->src_x + ((c - 32) % FONT_CHARS_PER_LINE) * font->width;
+ int src_y= font->src_y + ((c - 32) / FONT_CHARS_PER_LINE) * font->height;
if (c == '°' || c == '´' || c == '|') /* map '°' and 'TM' signs */
{
- if (font_type == FC_SPECIAL2)
- {
- src_x = (c == '°' ? 1 : c == '´' ? 2 : 3) * font_width;
- src_y = 4 * font_height;
- }
- else
- {
- src_x = FONT_CHARS_PER_LINE * font_width;
- src_y = (c == '°' ? 1 : c == '´' ? 2 : 3) * font_height +font_starty;
- }
+ src_x = font->src_x + FONT_CHARS_PER_LINE * font->width;
+ src_y = font->src_y + (c == '°' ? 1 : c == '´' ? 2 : 3) * font->height;
}
if (print_inverse) /* special mode for text gadgets */
{
/* first step: draw solid colored rectangle (use "cursor" character) */
- BlitBitmap(font_bitmap, bitmap, FONT_CHARS_PER_LINE * font_width,
- 3 * font_height + font_starty,
- font_width, font_height, x, y);
+ BlitBitmap(font->bitmap, dst_bitmap,
+ font->src_x + FONT_CHARS_PER_LINE * font->width,
+ font->src_y + 3 * font->height,
+ font->width, font->height, dst_x, dst_y);
/* second step: draw masked black rectangle (use "space" character) */
- SetClipOrigin(font_bitmap, font_bitmap->stored_clip_gc,
- dest_x - src_x, dest_y - src_y);
- BlitBitmapMasked(font_bitmap, bitmap,
- 0, 0, font_width, font_height, dest_x, dest_y);
+ SetClipOrigin(font->bitmap, font->bitmap->stored_clip_gc,
+ dst_x - src_x, dst_y - src_y);
+ BlitBitmapMasked(font->bitmap, dst_bitmap,
+ 0, 0, font->width, font->height, dst_x, dst_y);
}
else if (mask_mode == FONT_MASKED)
{
/* clear font character background */
- ClearRectangleOnBackground(bitmap, dest_x, dest_y,
- font_width, font_height);
+ ClearRectangleOnBackground(dst_bitmap, dst_x, dst_y,
+ font->width, font->height);
#if defined(TARGET_X11_NATIVE_PERFORMANCE_WORKAROUND)
- /* use special font tile clipmasks, if available */
- if (font_size == FS_BIG || font_size == FS_MEDIUM)
+ /* use special font tile clipmasks */
{
- int font_nr = (font_size == FS_BIG ? 0 : 1);
int font_char = (c >= 32 && c <= 95 ? c - 32 : 0);
- SetClipMask(font_bitmap, tile_clip_gc,
- tile_clipmask[font_nr][font_type][font_char]);
- SetClipOrigin(font_bitmap, tile_clip_gc, dest_x, dest_y);
- }
- else
- {
- SetClipOrigin(font_bitmap, font_bitmap->stored_clip_gc,
- dest_x - src_x, dest_y - src_y);
+ SetClipMask(font->bitmap, font_clip_gc,
+ font->clip_mask[font_char]);
+ SetClipOrigin(font->bitmap, font_clip_gc, dst_x, dst_y);
}
#else
- SetClipOrigin(font_bitmap, font_bitmap->stored_clip_gc,
- dest_x - src_x, dest_y - src_y);
+ SetClipOrigin(font->bitmap, font->bitmap->stored_clip_gc,
+ dst_x - src_x, dst_y - src_y);
#endif
- BlitBitmapMasked(font_bitmap, bitmap, src_x, src_y,
- font_width, font_height, dest_x, dest_y);
+ BlitBitmapMasked(font->bitmap, dst_bitmap, src_x, src_y,
+ font->width, font->height, dst_x, dst_y);
}
else /* normal, non-masked font blitting */
{
- BlitBitmap(font_bitmap, bitmap, src_x, src_y,
- font_width, font_height, dest_x, dest_y);
+ BlitBitmap(font->bitmap, dst_bitmap, src_x, src_y,
+ font->width, font->height, dst_x, dst_y);
}
}
- x += font_width;
+ dst_x += font->width;
}
}
#define FS_BIG 1
#define FS_MEDIUM 2
#define FS_SMALL 3
-#define FS_TILE 4
/* font colors */
#define FC_RED 0
#define FC_BLUE 1
#define FC_GREEN 2
#define FC_YELLOW 3
-#define FC_SPECIAL1 4
-#define FC_SPECIAL2 5
-#define FC_SPECIAL3 6
-/* font graphics definitions */
-#define FONT1_XSIZE 32
-#define FONT1_YSIZE 32
-#define FONT2_XSIZE 14
-#define FONT2_YSIZE 14
-#define FONT3_XSIZE 11
-#define FONT3_YSIZE 14
-#define FONT4_XSIZE 16
-#define FONT4_YSIZE 16
-#define FONT5_XSIZE 10
-#define FONT5_YSIZE 14
-#define FONT6_XSIZE 16
-#define FONT6_YSIZE 32
+/* special fonts */
+#define FC_SPECIAL_TAPE 4
+#define FC_SPECIAL_GAME 5
+#define FC_SPECIAL_NARROW 6
+
+#define FONT(fs, fc) (( (fs) == FS_INITIAL ? \
+ IMG_FONT_INITIAL_1 + (fc) : \
+ (fs) == FS_BIG ? \
+ IMG_FONT_BIG_1 + (fc) : \
+ (fs) == FS_MEDIUM ? \
+ IMG_FONT_MEDIUM_1 + (fc) : \
+ (fs) == FS_SMALL ? \
+ IMG_FONT_SMALL_1 + (fc) : \
+ IMG_FONT_SMALL_1 \
+ ) - FIRST_IMG_FONT)
+
+#define FONT_DEFAULT_BIG FONT(FS_BIG, FC_YELLOW)
+#define FONT_DEFAULT_SMALL FONT(FS_SMALL, FC_YELLOW)
+#define FONT_SPECIAL_TAPE FONT(FS_SMALL, FC_SPECIAL_TAPE)
+#define FONT_SPECIAL_GAME FONT(FS_SMALL, FC_SPECIAL_GAME)
+#define FONT_SPECIAL_NARROW FONT(FS_SMALL, FC_SPECIAL_NARROW)
#define FONT_CHARS_PER_LINE 16
#define FONT_LINES_PER_FONT 4
#define FONT_MASKED 1
/* text output definitions */
-#define MAX_OUTPUT_LINESIZE 256
+#define MAX_OUTPUT_LINESIZE 1024
/* font structure definitions */
-
+#if 1
+void InitFontInfo(struct FontInfo *, int);
+int getFontWidth(int);
+int getFontHeight(int);
+void DrawInitText(char *, int, int);
+void DrawTextF(int, int, int, char *, ...);
+void DrawTextFCentered(int, int, char *, ...);
+void DrawText(int, int, char *, int);
+void DrawTextExt(DrawBuffer *, int, int, char *, int, int);
+#else
void InitFontInfo(Bitmap *, Bitmap *, Bitmap *, Bitmap *, Bitmap *);
int getFontWidth(int, int);
int getFontHeight(int, int);
void DrawTextFCentered(int, int, char *, ...);
void DrawText(int, int, char *, int, int);
void DrawTextExt(DrawBuffer *, int, int, char *, int, int, int);
+#endif
#endif /* TEXT_H */
"-",
"-"
},
- {
- "arrow_red_left",
- "-",
- "-"
- },
- {
- "arrow_red_right",
- "-",
- "-"
- },
- {
- "arrow_red_up",
- "-",
- "-"
- },
- {
- "arrow_red_down",
- "-",
- "-"
- },
{
NULL,
#define EL_MOLE 110
#define EL_PENGUIN 111
#define EL_SATELLITE 112
-#define EL_ARROW_BLUE_LEFT 113
-#define EL_ARROW_BLUE_RIGHT 114
-#define EL_ARROW_BLUE_UP 115
-#define EL_ARROW_BLUE_DOWN 116
+#define EL_ARROW_LEFT 113
+#define EL_ARROW_RIGHT 114
+#define EL_ARROW_UP 115
+#define EL_ARROW_DOWN 116
#define EL_PIG 117
#define EL_DRAGON 118
#define EL_DYNABOMB_ACTIVE (EL_FIRST_DUMMY + 13)
#define EL_SHIELD_NORMAL_ACTIVE (EL_FIRST_DUMMY + 14)
#define EL_SHIELD_DEADLY_ACTIVE (EL_FIRST_DUMMY + 15)
-#define EL_ARROW_RED_LEFT (EL_FIRST_DUMMY + 16)
-#define EL_ARROW_RED_RIGHT (EL_FIRST_DUMMY + 17)
-#define EL_ARROW_RED_UP (EL_FIRST_DUMMY + 18)
-#define EL_ARROW_RED_DOWN (EL_FIRST_DUMMY + 19)
-#define MAX_NUM_ELEMENTS (EL_FIRST_DUMMY + 20)
+#define MAX_NUM_ELEMENTS (EL_FIRST_DUMMY + 16)
/* values for graphics/sounds action types */
#define GFX_ARG_STEP_DELAY 21
#define GFX_ARG_DIRECTION 22
#define GFX_ARG_POSITION 23
-#define GFX_ARG_NAME 24
+#define GFX_ARG_DRAW_XOFFSET 24
+#define GFX_ARG_DRAW_YOFFSET 25
+#define GFX_ARG_NAME 26
-#define NUM_GFX_ARGS 25
+#define NUM_GFX_ARGS 27
/* values for sound configuration suffixes */
#define NUM_SND_ARGS 1
+/* values for font configuration */
+
+#define FIRST_IMG_FONT IMG_FONT_INITIAL_1
+#define LAST_IMG_FONT IMG_FONT_NARROW
+
+#define NUM_IMG_FONTS (LAST_IMG_FONT - \
+ FIRST_IMG_FONT + 1)
+#define NUM_INITIAL_FONTS 4
+
+
/* values for game_status */
#define EXITGAME 0
#define MAINMENU 1
int anim_delay; /* important: delay of 1 means "no delay"! */
int anim_mode;
boolean anim_global_sync;
+
int step_offset; /* optional step offset of toon animations */
int step_delay; /* optional step delay of toon animations */
+ int draw_x, draw_y; /* optional offset for drawing fonts chars */
+
#if defined(TARGET_X11_NATIVE_PERFORMANCE_WORKAROUND)
Pixmap clip_mask; /* single-graphic-only clip mask for X11 */
GC clip_gc; /* single-graphic-only clip gc for X11 */
}
if (color == FC_RED)
- graphic = (graphic == IMG_ARROW_BLUE_LEFT ? IMG_ARROW_RED_LEFT :
- graphic == IMG_ARROW_BLUE_RIGHT ? IMG_ARROW_RED_RIGHT :
- IMG_BALL_RED);
+ graphic = (graphic == IMG_MENU_BUTTON_LEFT ? IMG_MENU_BUTTON_LEFT_ACTIVE :
+ graphic == IMG_MENU_BUTTON_RIGHT ? IMG_MENU_BUTTON_RIGHT_ACTIVE:
+ IMG_MENU_BUTTON_ACTIVE);
ypos += MENU_SCREEN_START_YPOS;
PlaySoundLoop(sound);
}
-void DrawTextStatic(int x, int y, char *text, int font_size, int font_type)
+void DrawTextStatic(int x, int y, char *text, int font_nr)
{
if (game_status == MAINMENU && gfx.menu_main_hide_static_text)
return;
- DrawText(x, y, text, font_size, font_type);
+ DrawText(x, y, text, font_nr);
}
void DrawHeadline()
{
- int x1 = SX + (SXSIZE - strlen(PROGRAM_TITLE_STRING) * FONT1_XSIZE) / 2;
- int x2 = SX + (SXSIZE - strlen(WINDOW_SUBTITLE_STRING) * FONT2_XSIZE) / 2;
+ int font1_xsize = getFontWidth(FONT(FS_BIG, FC_YELLOW));
+ int font2_xsize = getFontWidth(FONT(FS_SMALL, FC_RED));
+ int x1 = SX + (SXSIZE - strlen(PROGRAM_TITLE_STRING) * font1_xsize) / 2;
+ int x2 = SX + (SXSIZE - strlen(WINDOW_SUBTITLE_STRING) * font2_xsize) / 2;
- DrawTextStatic(x1, SY + 8, PROGRAM_TITLE_STRING, FS_BIG, FC_YELLOW);
- DrawTextStatic(x2, SY + 46, WINDOW_SUBTITLE_STRING, FS_SMALL, FC_RED);
+ DrawTextStatic(x1, SY + 8, PROGRAM_TITLE_STRING, FONT(FS_BIG, FC_YELLOW));
+ DrawTextStatic(x2, SY + 46, WINDOW_SUBTITLE_STRING, FONT(FS_SMALL, FC_RED));
}
static void ToggleFullscreenIfNeeded()
void DrawMainMenu()
{
static LevelDirTree *leveldir_last_valid = NULL;
- int i;
char *name_text = (!options.network && setup.team_mode ? "Team:" : "Name:");
+ int name_width = getFontWidth(FONT(FS_BIG, FC_GREEN)) * strlen("Name:");
+ int i;
UnmapAllGadgets();
FadeSounds();
DrawHeadline();
- DrawTextStatic(SX + 32, SY + 2*32, name_text, FS_BIG, FC_GREEN);
- DrawText(SX + 6*32, SY + 2*32, setup.player_name, FS_BIG, FC_RED);
- DrawTextStatic(SX + 32, SY + 3*32, "Level:", FS_BIG, FC_GREEN);
- DrawText(SX + 11*32, SY + 3*32, int2str(level_nr,3), FS_BIG,
- (leveldir_current->readonly ? FC_RED : FC_YELLOW));
- DrawTextStatic(SX + 32, SY + 4*32, "Hall Of Fame", FS_BIG, FC_GREEN);
- DrawTextStatic(SX + 32, SY + 5*32, "Level Creator", FS_BIG, FC_GREEN);
- DrawTextStatic(SY + 32, SY + 6*32, "Info Screen", FS_BIG, FC_GREEN);
- DrawTextStatic(SX + 32, SY + 7*32, "Start Game", FS_BIG, FC_GREEN);
- DrawTextStatic(SX + 32, SY + 8*32, "Setup", FS_BIG, FC_GREEN);
- DrawTextStatic(SX + 32, SY + 9*32, "Quit", FS_BIG, FC_GREEN);
+ DrawTextStatic(SX + 32, SY + 2*32, name_text, FONT(FS_BIG, FC_GREEN));
+ DrawText(SX + 32 + name_width, SY + 2*32, setup.player_name,
+ FONT(FS_BIG, FC_RED));
+ DrawTextStatic(SX + 32, SY + 3*32, "Level:", FONT(FS_BIG, FC_GREEN));
+ DrawText(SX + 11 * 32, SY + 3*32, int2str(level_nr,3), FONT(FS_BIG,
+ (leveldir_current->readonly ? FC_RED : FC_YELLOW)));
+ DrawTextStatic(SX + 32, SY + 4*32, "Hall Of Fame", FONT(FS_BIG,FC_GREEN));
+ DrawTextStatic(SX + 32, SY + 5*32, "Level Creator",FONT(FS_BIG,FC_GREEN));
+ DrawTextStatic(SY + 32, SY + 6*32, "Info Screen", FONT(FS_BIG, FC_GREEN));
+ DrawTextStatic(SX + 32, SY + 7*32, "Start Game", FONT(FS_BIG, FC_GREEN));
+ DrawTextStatic(SX + 32, SY + 8*32, "Setup", FONT(FS_BIG, FC_GREEN));
+ DrawTextStatic(SX + 32, SY + 9*32, "Quit", FONT(FS_BIG, FC_GREEN));
DrawMicroLevel(MICROLEV_XPOS, MICROLEV_YPOS, TRUE);
- DrawTextF(7*32 + 6, 3*32 + 9, FC_RED, "%d-%d",
+ DrawTextF(7*32 + 6, 3*32 + 9, FONT(FS_SMALL, FC_RED), "%d-%d",
leveldir_current->first_level,
leveldir_current->last_level);
if (leveldir_current->readonly)
{
- DrawTextF(15*32 + 6, 3*32 + 9 - 7, FC_RED, "READ");
- DrawTextF(15*32 + 6, 3*32 + 9 + 7, FC_RED, "ONLY");
+ DrawTextF(15*32 + 6, 3*32 + 9 - 7, FONT(FS_SMALL, FC_RED), "READ");
+ DrawTextF(15*32 + 6, 3*32 + 9 + 7, FONT(FS_SMALL, FC_RED), "ONLY");
}
for(i=0; i<8; i++)
- initCursor(i, (i == 1 || i == 6 ? IMG_ARROW_BLUE_RIGHT : IMG_BALL_BLUE));
+ initCursor(i, (i == 1 || i == 6 ? IMG_MENU_BUTTON_RIGHT :IMG_MENU_BUTTON));
#if 0
- DrawGraphic(10, 3, IMG_ARROW_BLUE_LEFT, 0);
- DrawGraphic(14, 3, IMG_ARROW_BLUE_RIGHT, 0);
+ DrawGraphic(10, 3, IMG_MENU_BUTTON_LEFT, 0);
+ DrawGraphic(14, 3, IMG_MENU_BUTTON_RIGHT, 0);
#else
- drawCursorXY(10, 1, IMG_ARROW_BLUE_LEFT);
- drawCursorXY(14, 1, IMG_ARROW_BLUE_RIGHT);
+ drawCursorXY(10, 1, IMG_MENU_BUTTON_LEFT);
+ drawCursorXY(14, 1, IMG_MENU_BUTTON_RIGHT);
#endif
DrawTextStatic(SX + 56, SY + 326, "A Game by Artsoft Entertainment",
- FS_SMALL, FC_RED);
+ FONT(FS_SMALL, FC_RED));
if (leveldir_current->name)
{
int len = strlen(leveldir_current->name);
- int lxpos = SX + (SXSIZE - len * FONT4_XSIZE) / 2;
+ int lxpos = SX + (SXSIZE - len * getFontWidth(FONT_SPECIAL_GAME)) / 2;
int lypos = SY + 352;
- DrawText(lxpos, lypos, leveldir_current->name, FS_SMALL, FC_SPECIAL2);
+ DrawText(lxpos, lypos, leveldir_current->name, FONT_SPECIAL_GAME);
}
FadeToFront();
level_nr = new_level_nr;
DrawText(SX + 11 * 32, SY + 3 * 32, int2str(level_nr, 3),
- FS_BIG, font_color);
+ FONT(FS_BIG, font_color));
LoadLevel(level_nr);
DrawMicroLevel(MICROLEV_XPOS, MICROLEV_YPOS, TRUE);
ClearWindow();
DrawHeadline();
- DrawTextFCentered(100, FC_GREEN, "The game elements:");
+ DrawTextFCentered(100, FONT(FS_SMALL, FC_GREEN), "The game elements:");
for(i=start; i < start + MAX_HELPSCREEN_ELS && i < num_helpscreen_els; i++)
{
DrawText(xstart,
ystart + (i - start) * ystep + (*helpscreen_eltext[i][1] ? 0 : 8),
- helpscreen_eltext[i][0], FS_SMALL, FC_YELLOW);
+ helpscreen_eltext[i][0], FONT_DEFAULT_SMALL);
DrawText(xstart, ystart + (i - start) * ystep + 16,
- helpscreen_eltext[i][1], FS_SMALL, FC_YELLOW);
+ helpscreen_eltext[i][1], FONT_DEFAULT_SMALL);
}
- DrawTextFCentered(ybottom, FC_BLUE, "Press any key or button for next page");
+ DrawTextFCentered(ybottom, FONT(FS_SMALL, FC_BLUE),
+ "Press any key or button for next page");
}
void DrawHelpScreenMusicText(int num)
ClearWindow();
DrawHeadline();
- DrawTextFCentered(100, FC_GREEN, "The game background music loops:");
+ DrawTextFCentered(100, FONT(FS_SMALL, FC_GREEN),
+ "The game background music loops:");
- DrawTextFCentered(ystart + 0 * ystep, FC_YELLOW,
+ DrawTextFCentered(ystart + 0 * ystep, FONT(FS_SMALL, FC_YELLOW),
"Excerpt from");
- DrawTextFCentered(ystart + 1 * ystep, FC_RED, "\"%s\"",
- helpscreen_music[num][0]);
- DrawTextFCentered(ystart + 2 * ystep, FC_YELLOW,
+ DrawTextFCentered(ystart + 1 * ystep, FONT(FS_SMALL, FC_RED),
+ "\"%s\"", helpscreen_music[num][0]);
+ DrawTextFCentered(ystart + 2 * ystep, FONT(FS_SMALL, FC_YELLOW),
"by");
- DrawTextFCentered(ystart + 3 * ystep, FC_RED,
+ DrawTextFCentered(ystart + 3 * ystep, FONT(FS_SMALL, FC_RED),
"%s", helpscreen_music[num][1]);
- DrawTextFCentered(ystart + 4 * ystep, FC_YELLOW,
+ DrawTextFCentered(ystart + 4 * ystep, FONT(FS_SMALL, FC_YELLOW),
"from the album");
- DrawTextFCentered(ystart + 5 * ystep, FC_RED, "\"%s\"",
- helpscreen_music[num][2]);
+ DrawTextFCentered(ystart + 5 * ystep, FONT(FS_SMALL, FC_RED),
+ "\"%s\"", helpscreen_music[num][2]);
- DrawTextFCentered(ybottom, FC_BLUE, "Press any key or button for next page");
+ DrawTextFCentered(ybottom, FONT(FS_SMALL, FC_BLUE),
+ "Press any key or button for next page");
#if 0
PlaySoundLoop(background_loop[num]);
ClearWindow();
DrawHeadline();
- DrawTextFCentered(100, FC_GREEN,
+ DrawTextFCentered(100, FONT(FS_SMALL, FC_GREEN),
"Credits:");
- DrawTextFCentered(ystart + 0 * ystep, FC_YELLOW,
+ DrawTextFCentered(ystart + 0 * ystep, FONT(FS_SMALL, FC_YELLOW),
"DOS port of the game:");
- DrawTextFCentered(ystart + 1 * ystep, FC_RED,
+ DrawTextFCentered(ystart + 1 * ystep, FONT(FS_SMALL, FC_RED),
"Guido Schulz");
- DrawTextFCentered(ystart + 2 * ystep, FC_YELLOW,
+ DrawTextFCentered(ystart + 2 * ystep, FONT(FS_SMALL, FC_YELLOW),
"Additional toons:");
- DrawTextFCentered(ystart + 3 * ystep, FC_RED,
+ DrawTextFCentered(ystart + 3 * ystep, FONT(FS_SMALL, FC_RED),
"Karl Hörnell");
- DrawTextFCentered(ystart + 5 * ystep, FC_YELLOW,
+ DrawTextFCentered(ystart + 5 * ystep, FONT(FS_SMALL, FC_YELLOW),
"...and many thanks to all contributors");
- DrawTextFCentered(ystart + 6 * ystep, FC_YELLOW,
+ DrawTextFCentered(ystart + 6 * ystep, FONT(FS_SMALL, FC_YELLOW),
"of new levels!");
- DrawTextFCentered(ybottom, FC_BLUE, "Press any key or button for next page");
+ DrawTextFCentered(ybottom, FONT(FS_SMALL, FC_BLUE),
+ "Press any key or button for next page");
}
void DrawHelpScreenContactText()
ClearWindow();
DrawHeadline();
- DrawTextFCentered(100, FC_GREEN, "Program information:");
+ DrawTextFCentered(100, FONT(FS_SMALL, FC_GREEN), "Program information:");
- DrawTextFCentered(ystart + 0 * ystep, FC_YELLOW,
+ DrawTextFCentered(ystart + 0 * ystep, FONT(FS_SMALL, FC_YELLOW),
"This game is Freeware!");
- DrawTextFCentered(ystart + 1 * ystep, FC_YELLOW,
+ DrawTextFCentered(ystart + 1 * ystep, FONT(FS_SMALL, FC_YELLOW),
"If you like it, send e-mail to:");
- DrawTextFCentered(ystart + 2 * ystep, FC_RED,
+ DrawTextFCentered(ystart + 2 * ystep, FONT(FS_SMALL, FC_RED),
"info@artsoft.org");
- DrawTextFCentered(ystart + 3 * ystep, FC_YELLOW,
+ DrawTextFCentered(ystart + 3 * ystep, FONT(FS_SMALL, FC_YELLOW),
"or SnailMail to:");
- DrawTextFCentered(ystart + 4 * ystep + 0, FC_RED,
+ DrawTextFCentered(ystart + 4 * ystep + 0, FONT(FS_SMALL, FC_RED),
"Holger Schemel");
- DrawTextFCentered(ystart + 4 * ystep + 20, FC_RED,
+ DrawTextFCentered(ystart + 4 * ystep + 20, FONT(FS_SMALL, FC_RED),
"Detmolder Strasse 189");
- DrawTextFCentered(ystart + 4 * ystep + 40, FC_RED,
+ DrawTextFCentered(ystart + 4 * ystep + 40, FONT(FS_SMALL, FC_RED),
"33604 Bielefeld");
- DrawTextFCentered(ystart + 4 * ystep + 60, FC_RED,
+ DrawTextFCentered(ystart + 4 * ystep + 60, FONT(FS_SMALL, FC_RED),
"Germany");
- DrawTextFCentered(ystart + 7 * ystep, FC_YELLOW,
+ DrawTextFCentered(ystart + 7 * ystep, FONT(FS_SMALL, FC_YELLOW),
"If you have created new levels,");
- DrawTextFCentered(ystart + 8 * ystep, FC_YELLOW,
+ DrawTextFCentered(ystart + 8 * ystep, FONT(FS_SMALL, FC_YELLOW),
"send them to me to include them!");
- DrawTextFCentered(ystart + 9 * ystep, FC_YELLOW,
+ DrawTextFCentered(ystart + 9 * ystep, FONT(FS_SMALL, FC_YELLOW),
":-)");
- DrawTextFCentered(ybottom, FC_BLUE, "Press any key or button for main menu");
+ DrawTextFCentered(ybottom, FONT(FS_SMALL, FC_BLUE),
+ "Press any key or button for main menu");
}
void DrawHelpScreen()
void HandleTypeName(int newxpos, Key key)
{
static int xpos = 0, ypos = 2;
+ int font_width = getFontWidth(FONT_DEFAULT_BIG);
+ int name_width = getFontWidth(FONT(FS_BIG, FC_GREEN)) * strlen("Name:");
+ int startx = SX + 32 + name_width;
+ int starty = SY + ypos * 32;
if (newxpos)
{
xpos = newxpos;
- DrawText(SX + 6 * 32, SY + ypos * 32, setup.player_name,
- FS_BIG, FC_YELLOW);
- drawCursorXY(xpos + 6, ypos - 2, IMG_BALL_RED);
+
+ DrawText(startx, starty, setup.player_name, FONT_DEFAULT_BIG);
+ DrawText(startx + xpos * font_width, starty, "_", FONT_DEFAULT_BIG);
return;
}
setup.player_name[xpos + 1] = 0;
xpos++;
- DrawText(SX + 6 * 32, SY + ypos * 32, setup.player_name,
- FS_BIG, FC_YELLOW);
- drawCursorXY(xpos + 6, ypos - 2, IMG_BALL_RED);
+ DrawText(startx, starty, setup.player_name, FONT_DEFAULT_BIG);
+ DrawText(startx + xpos * font_width, starty, "_", FONT_DEFAULT_BIG);
}
else if ((key == KSYM_Delete || key == KSYM_BackSpace) && xpos > 0)
{
xpos--;
setup.player_name[xpos] = 0;
- DrawBackground(SX + (xpos + 6) * 32, SY + ypos * 32, 2 * TILEX, TILEY);
- drawCursorXY(xpos + 6, ypos - 2, IMG_BALL_RED);
+ DrawText(startx + xpos * font_width, starty, "_ ", FONT_DEFAULT_BIG);
}
else if (key == KSYM_Return && xpos > 0)
{
- DrawText(SX + 6 * 32, SY + ypos * 32, setup.player_name, FS_BIG, FC_RED);
- DrawBackground(SX + (xpos + 6) * 32, SY + ypos * 32, TILEX, TILEY);
+ DrawText(startx, starty, setup.player_name, FONT(FS_BIG, FC_RED));
+ DrawText(startx + xpos * font_width, starty, " ", FONT_DEFAULT_BIG);
SaveSetup();
game_status = MAINMENU;
ti->type == TREE_TYPE_SOUNDS_DIR ? "Custom Sounds" :
ti->type == TREE_TYPE_MUSIC_DIR ? "Custom Music" : "");
- DrawText(SX + offset, SY + offset, title_string, FS_BIG,
- (ti->type == TREE_TYPE_LEVEL_DIR ? FC_GREEN : FC_YELLOW));
+ DrawText(SX + offset, SY + offset, title_string, FONT(FS_BIG,
+ (ti->type == TREE_TYPE_LEVEL_DIR ? FC_GREEN : FC_YELLOW)));
for(i=0; i<num_page_entries; i++)
{
strncpy(buffer, node->name , max_buffer_len);
buffer[max_buffer_len] = '\0';
- DrawText(SX + 32, SY + ypos * 32, buffer, FS_MEDIUM, node->color);
+ DrawText(SX + 32, SY + ypos * 32, buffer, FONT(FS_MEDIUM, node->color));
if (node->parent_link)
- initCursor(i, IMG_ARROW_BLUE_LEFT);
+ initCursor(i, IMG_MENU_BUTTON_LEFT);
else if (node->level_group)
- initCursor(i, IMG_ARROW_BLUE_RIGHT);
+ initCursor(i, IMG_MENU_BUTTON_RIGHT);
else
- initCursor(i, IMG_BALL_BLUE);
+ initCursor(i, IMG_MENU_BUTTON);
}
if (first_entry > 0)
int ypos = 1;
DrawBackground(SX, SY + ypos * 32, TILEX, TILEY);
- DrawGraphicThruMask(0, ypos, IMG_ARROW_BLUE_UP, 0);
+ DrawGraphicThruMask(0, ypos, IMG_MENU_BUTTON_UP, 0);
}
if (first_entry + num_page_entries < num_entries)
int ypos = MAX_MENU_ENTRIES_ON_SCREEN + 1;
DrawBackground(SX, SY + ypos * 32, TILEX, TILEY);
- DrawGraphicThruMask(0, ypos, IMG_ARROW_BLUE_DOWN, 0);
+ DrawGraphicThruMask(0, ypos, IMG_MENU_BUTTON_DOWN, 0);
}
}
DrawBackground(SX + 32, SY + 32, SXSIZE - 64, 32);
if (node->parent_link)
- DrawTextFCentered(40, FC_RED, "leave group \"%s\"", node->class_desc);
+ DrawTextFCentered(40, FONT(FS_SMALL, FC_RED), "leave group \"%s\"",
+ node->class_desc);
else if (node->level_group)
- DrawTextFCentered(40, FC_RED, "enter group \"%s\"", node->class_desc);
+ DrawTextFCentered(40, FONT(FS_SMALL, FC_RED), "enter group \"%s\"",
+ node->class_desc);
else if (ti->type == TREE_TYPE_LEVEL_DIR)
- DrawTextFCentered(40, FC_RED, "%3d levels (%s)",
+ DrawTextFCentered(40, FONT(FS_SMALL, FC_RED), "%3d levels (%s)",
node->levels, node->class_desc);
/* let BackToFront() redraw only what is needed */
void DrawChooseLevel()
{
- SetMainBackgroundImage(IMG_BACKGROUND_LEVEL_SERIES);
+ SetMainBackgroundImage(IMG_BACKGROUND_LEVELS);
DrawChooseTree(&leveldir_current);
}
{
int i;
- SetMainBackgroundImage(IMG_BACKGROUND_HALL_OF_FAME);
+ SetMainBackgroundImage(IMG_BACKGROUND_SCORES);
ClearWindow();
- DrawText(SX + 80, SY + 8, "Hall Of Fame", FS_BIG, FC_YELLOW);
- DrawTextFCentered(46, FC_RED, "HighScores of Level %d", level_nr);
+ DrawText(SX + 80, SY + 8, "Hall Of Fame", FONT_DEFAULT_BIG);
+ DrawTextFCentered(46, FONT(FS_SMALL, FC_RED), "HighScores of Level %d",
+ level_nr);
for(i=0; i<MAX_MENU_ENTRIES_ON_SCREEN; i++)
{
int2str(highscore[i].Score, 5), FS_BIG, color);
#else
DrawText(SX, SY + 64 + i * 32, "..................................",
- FS_MEDIUM, FC_YELLOW);
+ FONT(FS_MEDIUM, FC_YELLOW));
DrawText(SX, SY + 64 + i * 32, int2str(entry + 1, 3),
- FS_MEDIUM, FC_YELLOW);
- DrawText(SX + 64, SY + 64 + i * 32, highscore[entry].Name, FS_BIG, color);
+ FONT(FS_MEDIUM, FC_YELLOW));
+ DrawText(SX + 64, SY + 64 + i * 32, highscore[entry].Name,
+ FONT(FS_BIG, color));
DrawText(SX + 14 * 32 + 16, SY + 64 + i * 32,
- int2str(highscore[entry].Score, 5), FS_MEDIUM, color);
+ int2str(highscore[entry].Score, 5),
+ FONT(FS_MEDIUM, color));
#endif
}
}
font_color = FC_BLUE;
DrawText(SX + xpos * 32, SY + ypos * 32,
- (xpos == 3 ? " " : " "), FS_BIG, FC_YELLOW);
- DrawText(SX + xpos * 32, SY + ypos * 32, value_string, font_size,font_color);
+ (xpos == 3 ? " " : " "), FONT_DEFAULT_BIG);
+ DrawText(SX + xpos * 32, SY + ypos * 32, value_string,
+ FONT(font_size, font_color));
}
static void changeSetupValue(int pos)
title_string = "Setup Shortcuts";
}
- DrawText(SX + 16, SY + 16, title_string, FS_BIG, FC_YELLOW);
+ DrawText(SX + 16, SY + 16, title_string, FONT_DEFAULT_BIG);
num_setup_info = 0;
for(i=0; setup_info[i].type != 0 && i < MAX_MENU_ENTRIES_ON_SCREEN; i++)
if (setup_info[i].type & TYPE_STRING)
font_size = FS_MEDIUM;
- DrawText(SX + 32, SY + ypos * 32, setup_info[i].text, font_size, FC_GREEN);
+ DrawText(SX + 32, SY + ypos * 32, setup_info[i].text,
+ FONT(font_size, FC_GREEN));
if (setup_info[i].type & TYPE_ENTER_MENU)
- initCursor(i, IMG_ARROW_BLUE_RIGHT);
+ initCursor(i, IMG_MENU_BUTTON_RIGHT);
else if (setup_info[i].type & TYPE_LEAVE_MENU)
- initCursor(i, IMG_ARROW_BLUE_LEFT);
+ initCursor(i, IMG_MENU_BUTTON_LEFT);
else if (setup_info[i].type & ~TYPE_SKIP_ENTRY)
- initCursor(i, IMG_BALL_BLUE);
+ initCursor(i, IMG_MENU_BUTTON);
if (setup_info[i].type & TYPE_VALUE)
drawSetupValue(i);
{
ClearWindow();
- DrawText(SX+16, SY+16, "Setup Input", FS_BIG, FC_YELLOW);
+ DrawText(SX+16, SY+16, "Setup Input", FONT_DEFAULT_BIG);
- initCursor(0, IMG_BALL_BLUE);
- initCursor(1, IMG_BALL_BLUE);
- initCursor(2, IMG_ARROW_BLUE_RIGHT);
- initCursor(13, IMG_ARROW_BLUE_LEFT);
+ initCursor(0, IMG_MENU_BUTTON);
+ initCursor(1, IMG_MENU_BUTTON);
+ initCursor(2, IMG_MENU_BUTTON_RIGHT);
+ initCursor(13, IMG_MENU_BUTTON_LEFT);
- drawCursorXY(10, 0, IMG_ARROW_BLUE_LEFT);
- drawCursorXY(12, 0, IMG_ARROW_BLUE_RIGHT);
+ drawCursorXY(10, 0, IMG_MENU_BUTTON_LEFT);
+ drawCursorXY(12, 0, IMG_MENU_BUTTON_RIGHT);
- DrawText(SX+32, SY+2*32, "Player:", FS_BIG, FC_GREEN);
- DrawText(SX+32, SY+3*32, "Device:", FS_BIG, FC_GREEN);
- DrawText(SX+32, SY+15*32, "Back", FS_BIG, FC_GREEN);
+ DrawText(SX+32, SY+2*32, "Player:", FONT(FS_BIG, FC_GREEN));
+ DrawText(SX+32, SY+3*32, "Device:", FONT(FS_BIG, FC_GREEN));
+ DrawText(SX+32, SY+15*32, "Back", FONT(FS_BIG, FC_GREEN));
#if 0
DeactivateJoystickForCalibration();
- DrawTextFCentered(SYSIZE - 20, FC_BLUE,
+ DrawTextFCentered(SYSIZE - 20, FONT(FS_SMALL, FC_BLUE),
"Joysticks deactivated on this screen");
#endif
custom_key = setup.input[player_nr].key;
- DrawText(SX+11*32, SY+2*32, int2str(player_nr + 1, 1), FS_BIG, FC_RED);
+ DrawText(SX+11*32, SY+2*32, int2str(player_nr + 1, 1), FONT(FS_BIG, FC_RED));
DrawGraphicThruMask(8, 2, PLAYER_NR_GFX(IMG_PLAYER1, player_nr), 0);
if (setup.input[player_nr].use_joystick)
DrawText(SX+8*32, SY+3*32,
joystick_name[getJoystickNrFromDeviceName(device_name)],
- FS_BIG, FC_YELLOW);
- DrawText(SX+32, SY+4*32, "Calibrate", FS_BIG, FC_GREEN);
+ FONT_DEFAULT_BIG);
+ DrawText(SX+32, SY+4*32, "Calibrate", FONT(FS_BIG, FC_GREEN));
}
else
{
- DrawText(SX+8*32, SY+3*32, "Keyboard ", FS_BIG, FC_YELLOW);
- DrawText(SX+32, SY+4*32, "Customize", FS_BIG, FC_GREEN);
+ DrawText(SX+8*32, SY+3*32, "Keyboard ", FONT(FS_BIG, FC_YELLOW));
+ DrawText(SX+32, SY+4*32, "Customize", FONT(FS_BIG, FC_GREEN));
}
- DrawText(SX+32, SY+5*32, "Actual Settings:", FS_BIG, FC_GREEN);
- drawCursorXY(1, 4, IMG_ARROW_BLUE_LEFT);
- drawCursorXY(1, 5, IMG_ARROW_BLUE_RIGHT);
- drawCursorXY(1, 6, IMG_ARROW_BLUE_UP);
- drawCursorXY(1, 7, IMG_ARROW_BLUE_DOWN);
- DrawText(SX+2*32, SY+6*32, ":", FS_BIG, FC_BLUE);
- DrawText(SX+2*32, SY+7*32, ":", FS_BIG, FC_BLUE);
- DrawText(SX+2*32, SY+8*32, ":", FS_BIG, FC_BLUE);
- DrawText(SX+2*32, SY+9*32, ":", FS_BIG, FC_BLUE);
- DrawText(SX+32, SY+10*32, "Snap Field:", FS_BIG, FC_BLUE);
- DrawText(SX+32, SY+12*32, "Place Bomb:", FS_BIG, FC_BLUE);
+ DrawText(SX+32, SY+5*32, "Actual Settings:", FONT(FS_BIG, FC_GREEN));
+ drawCursorXY(1, 4, IMG_MENU_BUTTON_LEFT);
+ drawCursorXY(1, 5, IMG_MENU_BUTTON_RIGHT);
+ drawCursorXY(1, 6, IMG_MENU_BUTTON_UP);
+ drawCursorXY(1, 7, IMG_MENU_BUTTON_DOWN);
+ DrawText(SX+2*32, SY+6*32, ":", FONT(FS_BIG, FC_BLUE));
+ DrawText(SX+2*32, SY+7*32, ":", FONT(FS_BIG, FC_BLUE));
+ DrawText(SX+2*32, SY+8*32, ":", FONT(FS_BIG, FC_BLUE));
+ DrawText(SX+2*32, SY+9*32, ":", FONT(FS_BIG, FC_BLUE));
+ DrawText(SX+32, SY+10*32, "Snap Field:", FONT(FS_BIG, FC_BLUE));
+ DrawText(SX+32, SY+12*32, "Place Bomb:", FONT(FS_BIG, FC_BLUE));
for (i=0; i<6; i++)
{
int ypos = 6 + i + (i > 3 ? i-3 : 0);
DrawText(SX + 3*32, SY + ypos*32,
- " ", FS_BIG, FC_YELLOW);
+ " ", FONT_DEFAULT_BIG);
DrawText(SX + 3*32, SY + ypos*32,
(setup.input[player_nr].use_joystick ?
custom[i].text :
- getKeyNameFromKey(*custom[i].key)),
- FS_BIG, FC_YELLOW);
+ getKeyNameFromKey(*custom[i].key)), FONT_DEFAULT_BIG);
}
}
custom_key = setup.input[player_nr].key;
ClearWindow();
- DrawText(SX + 16, SY + 16, "Keyboard Input", FS_BIG, FC_YELLOW);
+ DrawText(SX + 16, SY + 16, "Keyboard Input", FONT_DEFAULT_BIG);
BackToFront();
InitAnimation();
step_nr = 0;
DrawText(SX, SY + (2+2*step_nr)*32,
- customize_step[step_nr].text, FS_BIG, FC_RED);
+ customize_step[step_nr].text,
+ FONT(FS_BIG, FC_RED));
DrawText(SX, SY + (2+2*step_nr+1)*32,
- "Key:", FS_BIG, FC_RED);
+ "Key:", FONT(FS_BIG, FC_RED));
DrawText(SX + 4*32, SY + (2+2*step_nr+1)*32,
getKeyNameFromKey(*customize_step[step_nr].key),
- FS_BIG, FC_BLUE);
+ FONT(FS_BIG, FC_BLUE));
while(!finished)
{
/* got new key binding */
*customize_step[step_nr].key = key;
DrawText(SX + 4*32, SY + (2+2*step_nr+1)*32,
- " ", FS_BIG, FC_YELLOW);
+ " ", FONT_DEFAULT_BIG);
DrawText(SX + 4*32, SY + (2+2*step_nr+1)*32,
- getKeyNameFromKey(key), FS_BIG, FC_YELLOW);
+ getKeyNameFromKey(key), FONT_DEFAULT_BIG);
step_nr++;
/* un-highlight last query */
DrawText(SX, SY+(2+2*(step_nr-1))*32,
- customize_step[step_nr-1].text, FS_BIG, FC_GREEN);
+ customize_step[step_nr-1].text, FONT(FS_BIG, FC_GREEN));
DrawText(SX, SY+(2+2*(step_nr-1)+1)*32,
- "Key:", FS_BIG, FC_GREEN);
+ "Key:", FONT(FS_BIG, FC_GREEN));
/* press 'Enter' to leave */
if (step_nr == 6)
{
DrawText(SX + 16, SY + 15*32+16,
- "Press Enter", FS_BIG, FC_YELLOW);
+ "Press Enter", FONT_DEFAULT_BIG);
break;
}
/* query next key binding */
DrawText(SX, SY+(2+2*step_nr)*32,
- customize_step[step_nr].text, FS_BIG, FC_RED);
+ customize_step[step_nr].text, FONT(FS_BIG, FC_RED));
DrawText(SX, SY+(2+2*step_nr+1)*32,
- "Key:", FS_BIG, FC_RED);
+ "Key:", FONT(FS_BIG, FC_RED));
DrawText(SX + 4*32, SY+(2+2*step_nr+1)*32,
getKeyNameFromKey(*customize_step[step_nr].key),
- FS_BIG, FC_BLUE);
+ FONT(FS_BIG, FC_BLUE));
}
break;
ClearWindow();
- for(y=0; y<3; y++)
+ for(y=0; y < 3; y++)
{
- for(x=0; x<3; x++)
+ for(x=0; x < 3; x++)
{
+ DrawGraphic(xpos + x - 1, ypos + y - 1, IMG_MENU_CALIBRATE_BLUE, 0);
check[x][y] = FALSE;
- DrawGraphic(xpos + x - 1, ypos + y - 1, IMG_BALL_BLUE, 0);
}
}
- DrawText(SX, SY + 6 * 32, " ROTATE JOYSTICK ", FS_BIG, FC_YELLOW);
- DrawText(SX, SY + 7 * 32, "IN ALL DIRECTIONS", FS_BIG, FC_YELLOW);
- DrawText(SX + 16, SY + 9 * 32, " IF ALL BALLS ", FS_BIG, FC_YELLOW);
- DrawText(SX, SY + 10 * 32, " ARE YELLOW, ", FS_BIG, FC_YELLOW);
- DrawText(SX, SY + 11 * 32, " CENTER JOYSTICK ", FS_BIG, FC_YELLOW);
- DrawText(SX, SY + 12 * 32, " AND ", FS_BIG, FC_YELLOW);
- DrawText(SX, SY + 13 * 32, "PRESS ANY BUTTON!", FS_BIG, FC_YELLOW);
+ DrawText(SX, SY + 6 * 32, " ROTATE JOYSTICK ", FONT(FS_BIG,FC_YELLOW));
+ DrawText(SX, SY + 7 * 32, "IN ALL DIRECTIONS", FONT(FS_BIG,FC_YELLOW));
+ DrawText(SX + 16, SY + 9 * 32, " IF ALL BALLS ", FONT(FS_BIG,FC_YELLOW));
+ DrawText(SX, SY + 10 * 32, " ARE YELLOW, ", FONT(FS_BIG,FC_YELLOW));
+ DrawText(SX, SY + 11 * 32, " CENTER JOYSTICK ", FONT(FS_BIG,FC_YELLOW));
+ DrawText(SX, SY + 12 * 32, " AND ", FONT(FS_BIG,FC_YELLOW));
+ DrawText(SX, SY + 13 * 32, "PRESS ANY BUTTON!", FONT(FS_BIG,FC_YELLOW));
joy_value = Joystick(player_nr);
last_x = (joy_value & JOY_LEFT ? -1 : joy_value & JOY_RIGHT ? +1 : 0);
new_joystick_xmiddle = joy_x;
new_joystick_ymiddle = joy_y;
- DrawGraphic(xpos + last_x, ypos + last_y, IMG_BALL_RED, 0);
+ DrawGraphic(xpos + last_x, ypos + last_y, IMG_MENU_CALIBRATE_RED, 0);
BackToFront();
while(Joystick(player_nr) & JOY_BUTTON); /* wait for released button */
if (x != last_x || y != last_y)
{
- DrawGraphic(xpos + last_x, ypos + last_y, IMG_BALL_YELLOW, 0);
- DrawGraphic(xpos + x, ypos + y, IMG_BALL_RED, 0);
+ DrawGraphic(xpos + last_x, ypos + last_y, IMG_MENU_CALIBRATE_YELLOW, 0);
+ DrawGraphic(xpos + x, ypos + y, IMG_MENU_CALIBRATE_RED, 0);
last_x = x;
last_y = y;
{
ClearWindow();
- DrawText(SX + 16, SY + 6*32, " JOYSTICK NOT ", FS_BIG, FC_YELLOW);
- DrawText(SX, SY + 7*32, " AVAILABLE ", FS_BIG, FC_YELLOW);
+ DrawText(SX + 16, SY + 6*32, " JOYSTICK NOT ", FONT(FS_BIG,FC_YELLOW));
+ DrawText(SX, SY + 7*32, " AVAILABLE ", FONT(FS_BIG,FC_YELLOW));
BackToFront();
Delay(2000); /* show error message for two seconds */
}
} scrollbutton_info[NUM_SCREEN_SCROLLBUTTONS] =
{
{
- IMG_ARROW_BLUE_UP, IMG_ARROW_RED_UP,
+ IMG_MENU_BUTTON_UP, IMG_MENU_BUTTON_UP_ACTIVE,
SC_SCROLL_UP_XPOS, SC_SCROLL_UP_YPOS,
SCREEN_CTRL_ID_SCROLL_UP,
"scroll up"
},
{
- IMG_ARROW_BLUE_DOWN, IMG_ARROW_RED_DOWN,
+ IMG_MENU_BUTTON_DOWN, IMG_MENU_BUTTON_DOWN_ACTIVE,
SC_SCROLL_DOWN_XPOS, SC_SCROLL_DOWN_YPOS,
SCREEN_CTRL_ID_SCROLL_DOWN,
"scroll down"
#if defined(TARGET_X11_NATIVE_PERFORMANCE_WORKAROUND)
&scrollbar_bitmap[0], &scrollbar_bitmap[1],
#else
- IMG_SCROLLBAR_BLUE, IMG_SCROLLBAR_RED,
+ IMG_MENU_SCROLLBAR, IMG_SCROLLBAR_RED,
#endif
SX + SC_SCROLL_VERTICAL_XPOS, SY + SC_SCROLL_VERTICAL_YPOS,
SC_SCROLL_VERTICAL_XSIZE, SC_SCROLL_VERTICAL_YSIZE,
#if defined(TARGET_X11_NATIVE_PERFORMANCE_WORKAROUND)
int i;
- for (i=0; i<4; i++)
+ for (i=0; i<2; i++)
{
scrollbar_bitmap[i] = CreateBitmap(TILEX, TILEY, DEFAULT_DEPTH);
/* copy pointers to clip mask and GC */
scrollbar_bitmap[i]->clip_mask =
- graphic_info[IMG_SCROLLBAR_BLUE + i].clip_mask;
+ graphic_info[IMG_MENU_SCROLLBAR + i].clip_mask;
scrollbar_bitmap[i]->stored_clip_gc =
- graphic_info[IMG_SCROLLBAR_BLUE + i].clip_gc;
+ graphic_info[IMG_MENU_SCROLLBAR + i].clip_gc;
- BlitBitmap(graphic_info[IMG_SCROLLBAR_BLUE + i].bitmap,
+ BlitBitmap(graphic_info[IMG_MENU_SCROLLBAR + i].bitmap,
scrollbar_bitmap[i],
- graphic_info[IMG_SCROLLBAR_BLUE + i].src_x,
- graphic_info[IMG_SCROLLBAR_BLUE + i].src_y,
+ graphic_info[IMG_MENU_SCROLLBAR + i].src_x,
+ graphic_info[IMG_MENU_SCROLLBAR + i].src_y,
TILEX, TILEY, 0, 0);
}
#endif
int monat = (value/100) % 100;
int jahr = (value/10000);
- DrawText(VX+VIDEO_DATE_XPOS,VY+VIDEO_DATE_YPOS,
- int2str(tag,2),FS_SMALL,FC_SPECIAL1);
- DrawText(VX+VIDEO_DATE_XPOS+27,VY+VIDEO_DATE_YPOS,
- monatsname[monat],FS_SMALL,FC_SPECIAL1);
- DrawText(VX+VIDEO_DATE_XPOS+64,VY+VIDEO_DATE_YPOS,
- int2str(jahr,2),FS_SMALL,FC_SPECIAL1);
+ DrawText(VX + VIDEO_DATE_XPOS, VY + VIDEO_DATE_YPOS,
+ int2str(tag, 2), FONT_SPECIAL_TAPE);
+ DrawText(VX + VIDEO_DATE_XPOS + 27, VY + VIDEO_DATE_YPOS,
+ monatsname[monat], FONT_SPECIAL_TAPE);
+ DrawText(VX + VIDEO_DATE_XPOS + 64, VY + VIDEO_DATE_YPOS,
+ int2str(jahr, 2), FONT_SPECIAL_TAPE);
}
if (state & VIDEO_STATE_TIME_ON)
int min = value / 60;
int sec = value % 60;
- DrawText(VX+VIDEO_TIME_XPOS,VY+VIDEO_TIME_YPOS,
- int2str(min,2),FS_SMALL,FC_SPECIAL1);
- DrawText(VX+VIDEO_TIME_XPOS+27,VY+VIDEO_TIME_YPOS,
- int2str(sec,2),FS_SMALL,FC_SPECIAL1);
+ DrawText(VX + VIDEO_TIME_XPOS, VY + VIDEO_TIME_YPOS,
+ int2str(min, 2), FONT_SPECIAL_TAPE);
+ DrawText(VX + VIDEO_TIME_XPOS + 27, VY + VIDEO_TIME_YPOS,
+ int2str(sec, 2), FONT_SPECIAL_TAPE);
}
if (state & VIDEO_STATE_DATE)
MICROLEV_XPOS, MICROLEV_YPOS, MICROLEV_XSIZE, MICROLEV_YSIZE,
MICROLEV_XPOS, MICROLEV_YPOS);
BlitBitmap(backbuffer, window,
- SX, MICROLABEL_YPOS, SXSIZE, FONT4_YSIZE,
+ SX, MICROLABEL_YPOS, SXSIZE, getFontHeight(FONT_SPECIAL_GAME),
SX, MICROLABEL_YPOS);
redraw_mask &= ~REDRAW_MICROLEVEL;
}
info1[0] = '\0';
sprintf(text, "%.1f fps%s", global.frames_per_second, info1);
- DrawTextExt(window, SX, SY, text, FS_SMALL, FC_YELLOW, FONT_OPAQUE);
+ DrawTextExt(window, SX, SY, text, FONT_DEFAULT_SMALL, FONT_OPAQUE);
}
FlushDisplay();
SetMainBackgroundBitmap(graphic == IMG_UNDEFINED ? NULL :
graphic_info[graphic].bitmap ?
graphic_info[graphic].bitmap :
- graphic_info[IMG_BACKGROUND_DEFAULT].bitmap);
+ graphic_info[IMG_BACKGROUND].bitmap);
}
void SetDoorBackgroundImage(int graphic)
SetDoorBackgroundBitmap(graphic == IMG_UNDEFINED ? NULL :
graphic_info[graphic].bitmap ?
graphic_info[graphic].bitmap :
- graphic_info[IMG_BACKGROUND_DEFAULT].bitmap);
+ graphic_info[IMG_BACKGROUND].bitmap);
}
void DrawBackground(int dest_x, int dest_y, int width, int height)
#define MICROLABEL_IMPORTED_FROM 4
#define MICROLABEL_LEVEL_IMPORT_INFO 5
-#define MAX_MICROLABEL_SIZE (SXSIZE / FONT4_XSIZE)
-
static void DrawMicroLevelLabelExt(int mode)
{
- char label_text[MAX_MICROLABEL_SIZE + 1];
+ char label_text[MAX_OUTPUT_LINESIZE + 1];
+ int max_len_label_text = SXSIZE / getFontWidth(FONT_SPECIAL_GAME);
- DrawBackground(SX, MICROLABEL_YPOS, SXSIZE, FONT4_YSIZE);
+ DrawBackground(SX, MICROLABEL_YPOS, SXSIZE,getFontHeight(FONT_SPECIAL_GAME));
strncpy(label_text, (mode == MICROLABEL_LEVEL_NAME ? level.name :
mode == MICROLABEL_CREATED_BY ? "created by" :
mode == MICROLABEL_IMPORTED_FROM ? "imported from" :
mode == MICROLABEL_LEVEL_IMPORT_INFO ?
leveldir_current->imported_from : ""),
- MAX_MICROLABEL_SIZE);
- label_text[MAX_MICROLABEL_SIZE] = '\0';
+ max_len_label_text);
+ label_text[max_len_label_text] = '\0';
if (strlen(label_text) > 0)
{
- int lxpos = SX + (SXSIZE - strlen(label_text) * FONT4_XSIZE) / 2;
+ int text_width = strlen(label_text) * getFontWidth(FONT_SPECIAL_GAME);
+ int lxpos = SX + (SXSIZE - text_width) / 2;
int lypos = MICROLABEL_YPOS;
- DrawText(lxpos, lypos, label_text, FS_SMALL, FC_SPECIAL2);
+ DrawText(lxpos, lypos, label_text, FONT_SPECIAL_GAME);
}
redraw_mask |= REDRAW_MICROLEVEL;
text_line[tl] = 0;
DrawText(DX + 50 - (tl * 14)/2, DY + 8 + ty * 16,
- text_line, FS_SMALL, FC_YELLOW);
+ text_line, FONT_DEFAULT_SMALL);
text += tl + (tc == ' ' ? 1 : 0);
}