From: Holger Schemel Date: Sat, 4 Jan 2003 00:27:19 +0000 (+0100) Subject: rnd-20030104-1-src X-Git-Tag: 3.0.0^2~192 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=fa26d82a378cebf6b519c566c3f33739ebba7823;p=rocksndiamonds.git rnd-20030104-1-src --- diff --git a/CHANGES b/CHANGES index 9107d377..c9ccb06d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +Pre-Release Version 2.2.0rc2 [?? ??? ????] +------------------------------------------ + - added support for stereo WAV sound files + Pre-Release Version 2.2.0rc1 [31 DEC 2002] ------------------------------------------ - level series artwork now configurable via level series config file diff --git a/Makefile b/Makefile index 8e6fad25..cb3e37f4 100644 --- a/Makefile +++ b/Makefile @@ -91,7 +91,7 @@ auto-conf: ./Scripts/create_element_defs.pl --graphics > src/conf_gfx.h ./Scripts/create_element_defs.pl --sounds > src/conf_snd.h ./Scripts/create_element_defs.pl --chars > src/conf_chr.c - ./Scripts/create_element_defs.pl --generic > src/conf_gen.c + ./Scripts/create_element_defs.pl --custom > src/conf_cus.c ./Scripts/create_element_defs.pl --el2gfx > src/conf_e2g.c run: diff --git a/src/Makefile b/src/Makefile index 16d13cf4..12baa00a 100644 --- a/src/Makefile +++ b/src/Makefile @@ -179,7 +179,7 @@ conf_gfx.h: conf_gfx.c ../Scripts/create_element_defs.pl --graphics > conf_gfx.h ../Scripts/create_element_defs.pl --el2gfx > conf_e2g.c ../Scripts/create_element_defs.pl --chars > conf_chr.c - ../Scripts/create_element_defs.pl --generic > conf_gen.c + ../Scripts/create_element_defs.pl --custom > conf_cus.c conf_snd.h: conf_snd.c ../Scripts/create_element_defs.pl --sounds > conf_snd.h diff --git a/src/conf_cus.c b/src/conf_cus.c new file mode 100644 index 00000000..bca72f2f --- /dev/null +++ b/src/conf_cus.c @@ -0,0 +1,662 @@ +/*********************************************************** +* 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 ----- */ + +#ifndef CONF_CUS_C +#define CONF_CUS_C + +/* values for graphics configuration (custom elements) */ + + { "custom_0", "RocksElements.pcx" }, + { "custom_0.xpos", "5" }, + { "custom_0.ypos", "0" }, + { "custom_0.frames", "1" }, + + { "custom_1", "RocksElements.pcx" }, + { "custom_1.xpos", "5" }, + { "custom_1.ypos", "0" }, + { "custom_1.frames", "1" }, + + { "custom_2", "RocksElements.pcx" }, + { "custom_2.xpos", "5" }, + { "custom_2.ypos", "0" }, + { "custom_2.frames", "1" }, + + { "custom_3", "RocksElements.pcx" }, + { "custom_3.xpos", "5" }, + { "custom_3.ypos", "0" }, + { "custom_3.frames", "1" }, + + { "custom_4", "RocksElements.pcx" }, + { "custom_4.xpos", "5" }, + { "custom_4.ypos", "0" }, + { "custom_4.frames", "1" }, + + { "custom_5", "RocksElements.pcx" }, + { "custom_5.xpos", "5" }, + { "custom_5.ypos", "0" }, + { "custom_5.frames", "1" }, + + { "custom_6", "RocksElements.pcx" }, + { "custom_6.xpos", "5" }, + { "custom_6.ypos", "0" }, + { "custom_6.frames", "1" }, + + { "custom_7", "RocksElements.pcx" }, + { "custom_7.xpos", "5" }, + { "custom_7.ypos", "0" }, + { "custom_7.frames", "1" }, + + { "custom_8", "RocksElements.pcx" }, + { "custom_8.xpos", "5" }, + { "custom_8.ypos", "0" }, + { "custom_8.frames", "1" }, + + { "custom_9", "RocksElements.pcx" }, + { "custom_9.xpos", "5" }, + { "custom_9.ypos", "0" }, + { "custom_9.frames", "1" }, + + { "custom_10", "RocksElements.pcx" }, + { "custom_10.xpos", "5" }, + { "custom_10.ypos", "0" }, + { "custom_10.frames", "1" }, + + { "custom_11", "RocksElements.pcx" }, + { "custom_11.xpos", "5" }, + { "custom_11.ypos", "0" }, + { "custom_11.frames", "1" }, + + { "custom_12", "RocksElements.pcx" }, + { "custom_12.xpos", "5" }, + { "custom_12.ypos", "0" }, + { "custom_12.frames", "1" }, + + { "custom_13", "RocksElements.pcx" }, + { "custom_13.xpos", "5" }, + { "custom_13.ypos", "0" }, + { "custom_13.frames", "1" }, + + { "custom_14", "RocksElements.pcx" }, + { "custom_14.xpos", "5" }, + { "custom_14.ypos", "0" }, + { "custom_14.frames", "1" }, + + { "custom_15", "RocksElements.pcx" }, + { "custom_15.xpos", "5" }, + { "custom_15.ypos", "0" }, + { "custom_15.frames", "1" }, + + { "custom_16", "RocksElements.pcx" }, + { "custom_16.xpos", "5" }, + { "custom_16.ypos", "0" }, + { "custom_16.frames", "1" }, + + { "custom_17", "RocksElements.pcx" }, + { "custom_17.xpos", "5" }, + { "custom_17.ypos", "0" }, + { "custom_17.frames", "1" }, + + { "custom_18", "RocksElements.pcx" }, + { "custom_18.xpos", "5" }, + { "custom_18.ypos", "0" }, + { "custom_18.frames", "1" }, + + { "custom_19", "RocksElements.pcx" }, + { "custom_19.xpos", "5" }, + { "custom_19.ypos", "0" }, + { "custom_19.frames", "1" }, + + { "custom_20", "RocksElements.pcx" }, + { "custom_20.xpos", "5" }, + { "custom_20.ypos", "0" }, + { "custom_20.frames", "1" }, + + { "custom_21", "RocksElements.pcx" }, + { "custom_21.xpos", "5" }, + { "custom_21.ypos", "0" }, + { "custom_21.frames", "1" }, + + { "custom_22", "RocksElements.pcx" }, + { "custom_22.xpos", "5" }, + { "custom_22.ypos", "0" }, + { "custom_22.frames", "1" }, + + { "custom_23", "RocksElements.pcx" }, + { "custom_23.xpos", "5" }, + { "custom_23.ypos", "0" }, + { "custom_23.frames", "1" }, + + { "custom_24", "RocksElements.pcx" }, + { "custom_24.xpos", "5" }, + { "custom_24.ypos", "0" }, + { "custom_24.frames", "1" }, + + { "custom_25", "RocksElements.pcx" }, + { "custom_25.xpos", "5" }, + { "custom_25.ypos", "0" }, + { "custom_25.frames", "1" }, + + { "custom_26", "RocksElements.pcx" }, + { "custom_26.xpos", "5" }, + { "custom_26.ypos", "0" }, + { "custom_26.frames", "1" }, + + { "custom_27", "RocksElements.pcx" }, + { "custom_27.xpos", "5" }, + { "custom_27.ypos", "0" }, + { "custom_27.frames", "1" }, + + { "custom_28", "RocksElements.pcx" }, + { "custom_28.xpos", "5" }, + { "custom_28.ypos", "0" }, + { "custom_28.frames", "1" }, + + { "custom_29", "RocksElements.pcx" }, + { "custom_29.xpos", "5" }, + { "custom_29.ypos", "0" }, + { "custom_29.frames", "1" }, + + { "custom_30", "RocksElements.pcx" }, + { "custom_30.xpos", "5" }, + { "custom_30.ypos", "0" }, + { "custom_30.frames", "1" }, + + { "custom_31", "RocksElements.pcx" }, + { "custom_31.xpos", "5" }, + { "custom_31.ypos", "0" }, + { "custom_31.frames", "1" }, + + { "custom_32", "RocksElements.pcx" }, + { "custom_32.xpos", "5" }, + { "custom_32.ypos", "0" }, + { "custom_32.frames", "1" }, + + { "custom_33", "RocksElements.pcx" }, + { "custom_33.xpos", "5" }, + { "custom_33.ypos", "0" }, + { "custom_33.frames", "1" }, + + { "custom_34", "RocksElements.pcx" }, + { "custom_34.xpos", "5" }, + { "custom_34.ypos", "0" }, + { "custom_34.frames", "1" }, + + { "custom_35", "RocksElements.pcx" }, + { "custom_35.xpos", "5" }, + { "custom_35.ypos", "0" }, + { "custom_35.frames", "1" }, + + { "custom_36", "RocksElements.pcx" }, + { "custom_36.xpos", "5" }, + { "custom_36.ypos", "0" }, + { "custom_36.frames", "1" }, + + { "custom_37", "RocksElements.pcx" }, + { "custom_37.xpos", "5" }, + { "custom_37.ypos", "0" }, + { "custom_37.frames", "1" }, + + { "custom_38", "RocksElements.pcx" }, + { "custom_38.xpos", "5" }, + { "custom_38.ypos", "0" }, + { "custom_38.frames", "1" }, + + { "custom_39", "RocksElements.pcx" }, + { "custom_39.xpos", "5" }, + { "custom_39.ypos", "0" }, + { "custom_39.frames", "1" }, + + { "custom_40", "RocksElements.pcx" }, + { "custom_40.xpos", "5" }, + { "custom_40.ypos", "0" }, + { "custom_40.frames", "1" }, + + { "custom_41", "RocksElements.pcx" }, + { "custom_41.xpos", "5" }, + { "custom_41.ypos", "0" }, + { "custom_41.frames", "1" }, + + { "custom_42", "RocksElements.pcx" }, + { "custom_42.xpos", "5" }, + { "custom_42.ypos", "0" }, + { "custom_42.frames", "1" }, + + { "custom_43", "RocksElements.pcx" }, + { "custom_43.xpos", "5" }, + { "custom_43.ypos", "0" }, + { "custom_43.frames", "1" }, + + { "custom_44", "RocksElements.pcx" }, + { "custom_44.xpos", "5" }, + { "custom_44.ypos", "0" }, + { "custom_44.frames", "1" }, + + { "custom_45", "RocksElements.pcx" }, + { "custom_45.xpos", "5" }, + { "custom_45.ypos", "0" }, + { "custom_45.frames", "1" }, + + { "custom_46", "RocksElements.pcx" }, + { "custom_46.xpos", "5" }, + { "custom_46.ypos", "0" }, + { "custom_46.frames", "1" }, + + { "custom_47", "RocksElements.pcx" }, + { "custom_47.xpos", "5" }, + { "custom_47.ypos", "0" }, + { "custom_47.frames", "1" }, + + { "custom_48", "RocksElements.pcx" }, + { "custom_48.xpos", "5" }, + { "custom_48.ypos", "0" }, + { "custom_48.frames", "1" }, + + { "custom_49", "RocksElements.pcx" }, + { "custom_49.xpos", "5" }, + { "custom_49.ypos", "0" }, + { "custom_49.frames", "1" }, + + { "custom_50", "RocksElements.pcx" }, + { "custom_50.xpos", "5" }, + { "custom_50.ypos", "0" }, + { "custom_50.frames", "1" }, + + { "custom_51", "RocksElements.pcx" }, + { "custom_51.xpos", "5" }, + { "custom_51.ypos", "0" }, + { "custom_51.frames", "1" }, + + { "custom_52", "RocksElements.pcx" }, + { "custom_52.xpos", "5" }, + { "custom_52.ypos", "0" }, + { "custom_52.frames", "1" }, + + { "custom_53", "RocksElements.pcx" }, + { "custom_53.xpos", "5" }, + { "custom_53.ypos", "0" }, + { "custom_53.frames", "1" }, + + { "custom_54", "RocksElements.pcx" }, + { "custom_54.xpos", "5" }, + { "custom_54.ypos", "0" }, + { "custom_54.frames", "1" }, + + { "custom_55", "RocksElements.pcx" }, + { "custom_55.xpos", "5" }, + { "custom_55.ypos", "0" }, + { "custom_55.frames", "1" }, + + { "custom_56", "RocksElements.pcx" }, + { "custom_56.xpos", "5" }, + { "custom_56.ypos", "0" }, + { "custom_56.frames", "1" }, + + { "custom_57", "RocksElements.pcx" }, + { "custom_57.xpos", "5" }, + { "custom_57.ypos", "0" }, + { "custom_57.frames", "1" }, + + { "custom_58", "RocksElements.pcx" }, + { "custom_58.xpos", "5" }, + { "custom_58.ypos", "0" }, + { "custom_58.frames", "1" }, + + { "custom_59", "RocksElements.pcx" }, + { "custom_59.xpos", "5" }, + { "custom_59.ypos", "0" }, + { "custom_59.frames", "1" }, + + { "custom_60", "RocksElements.pcx" }, + { "custom_60.xpos", "5" }, + { "custom_60.ypos", "0" }, + { "custom_60.frames", "1" }, + + { "custom_61", "RocksElements.pcx" }, + { "custom_61.xpos", "5" }, + { "custom_61.ypos", "0" }, + { "custom_61.frames", "1" }, + + { "custom_62", "RocksElements.pcx" }, + { "custom_62.xpos", "5" }, + { "custom_62.ypos", "0" }, + { "custom_62.frames", "1" }, + + { "custom_63", "RocksElements.pcx" }, + { "custom_63.xpos", "5" }, + { "custom_63.ypos", "0" }, + { "custom_63.frames", "1" }, + + { "custom_64", "RocksElements.pcx" }, + { "custom_64.xpos", "5" }, + { "custom_64.ypos", "0" }, + { "custom_64.frames", "1" }, + + { "custom_65", "RocksElements.pcx" }, + { "custom_65.xpos", "5" }, + { "custom_65.ypos", "0" }, + { "custom_65.frames", "1" }, + + { "custom_66", "RocksElements.pcx" }, + { "custom_66.xpos", "5" }, + { "custom_66.ypos", "0" }, + { "custom_66.frames", "1" }, + + { "custom_67", "RocksElements.pcx" }, + { "custom_67.xpos", "5" }, + { "custom_67.ypos", "0" }, + { "custom_67.frames", "1" }, + + { "custom_68", "RocksElements.pcx" }, + { "custom_68.xpos", "5" }, + { "custom_68.ypos", "0" }, + { "custom_68.frames", "1" }, + + { "custom_69", "RocksElements.pcx" }, + { "custom_69.xpos", "5" }, + { "custom_69.ypos", "0" }, + { "custom_69.frames", "1" }, + + { "custom_70", "RocksElements.pcx" }, + { "custom_70.xpos", "5" }, + { "custom_70.ypos", "0" }, + { "custom_70.frames", "1" }, + + { "custom_71", "RocksElements.pcx" }, + { "custom_71.xpos", "5" }, + { "custom_71.ypos", "0" }, + { "custom_71.frames", "1" }, + + { "custom_72", "RocksElements.pcx" }, + { "custom_72.xpos", "5" }, + { "custom_72.ypos", "0" }, + { "custom_72.frames", "1" }, + + { "custom_73", "RocksElements.pcx" }, + { "custom_73.xpos", "5" }, + { "custom_73.ypos", "0" }, + { "custom_73.frames", "1" }, + + { "custom_74", "RocksElements.pcx" }, + { "custom_74.xpos", "5" }, + { "custom_74.ypos", "0" }, + { "custom_74.frames", "1" }, + + { "custom_75", "RocksElements.pcx" }, + { "custom_75.xpos", "5" }, + { "custom_75.ypos", "0" }, + { "custom_75.frames", "1" }, + + { "custom_76", "RocksElements.pcx" }, + { "custom_76.xpos", "5" }, + { "custom_76.ypos", "0" }, + { "custom_76.frames", "1" }, + + { "custom_77", "RocksElements.pcx" }, + { "custom_77.xpos", "5" }, + { "custom_77.ypos", "0" }, + { "custom_77.frames", "1" }, + + { "custom_78", "RocksElements.pcx" }, + { "custom_78.xpos", "5" }, + { "custom_78.ypos", "0" }, + { "custom_78.frames", "1" }, + + { "custom_79", "RocksElements.pcx" }, + { "custom_79.xpos", "5" }, + { "custom_79.ypos", "0" }, + { "custom_79.frames", "1" }, + + { "custom_80", "RocksElements.pcx" }, + { "custom_80.xpos", "5" }, + { "custom_80.ypos", "0" }, + { "custom_80.frames", "1" }, + + { "custom_81", "RocksElements.pcx" }, + { "custom_81.xpos", "5" }, + { "custom_81.ypos", "0" }, + { "custom_81.frames", "1" }, + + { "custom_82", "RocksElements.pcx" }, + { "custom_82.xpos", "5" }, + { "custom_82.ypos", "0" }, + { "custom_82.frames", "1" }, + + { "custom_83", "RocksElements.pcx" }, + { "custom_83.xpos", "5" }, + { "custom_83.ypos", "0" }, + { "custom_83.frames", "1" }, + + { "custom_84", "RocksElements.pcx" }, + { "custom_84.xpos", "5" }, + { "custom_84.ypos", "0" }, + { "custom_84.frames", "1" }, + + { "custom_85", "RocksElements.pcx" }, + { "custom_85.xpos", "5" }, + { "custom_85.ypos", "0" }, + { "custom_85.frames", "1" }, + + { "custom_86", "RocksElements.pcx" }, + { "custom_86.xpos", "5" }, + { "custom_86.ypos", "0" }, + { "custom_86.frames", "1" }, + + { "custom_87", "RocksElements.pcx" }, + { "custom_87.xpos", "5" }, + { "custom_87.ypos", "0" }, + { "custom_87.frames", "1" }, + + { "custom_88", "RocksElements.pcx" }, + { "custom_88.xpos", "5" }, + { "custom_88.ypos", "0" }, + { "custom_88.frames", "1" }, + + { "custom_89", "RocksElements.pcx" }, + { "custom_89.xpos", "5" }, + { "custom_89.ypos", "0" }, + { "custom_89.frames", "1" }, + + { "custom_90", "RocksElements.pcx" }, + { "custom_90.xpos", "5" }, + { "custom_90.ypos", "0" }, + { "custom_90.frames", "1" }, + + { "custom_91", "RocksElements.pcx" }, + { "custom_91.xpos", "5" }, + { "custom_91.ypos", "0" }, + { "custom_91.frames", "1" }, + + { "custom_92", "RocksElements.pcx" }, + { "custom_92.xpos", "5" }, + { "custom_92.ypos", "0" }, + { "custom_92.frames", "1" }, + + { "custom_93", "RocksElements.pcx" }, + { "custom_93.xpos", "5" }, + { "custom_93.ypos", "0" }, + { "custom_93.frames", "1" }, + + { "custom_94", "RocksElements.pcx" }, + { "custom_94.xpos", "5" }, + { "custom_94.ypos", "0" }, + { "custom_94.frames", "1" }, + + { "custom_95", "RocksElements.pcx" }, + { "custom_95.xpos", "5" }, + { "custom_95.ypos", "0" }, + { "custom_95.frames", "1" }, + + { "custom_96", "RocksElements.pcx" }, + { "custom_96.xpos", "5" }, + { "custom_96.ypos", "0" }, + { "custom_96.frames", "1" }, + + { "custom_97", "RocksElements.pcx" }, + { "custom_97.xpos", "5" }, + { "custom_97.ypos", "0" }, + { "custom_97.frames", "1" }, + + { "custom_98", "RocksElements.pcx" }, + { "custom_98.xpos", "5" }, + { "custom_98.ypos", "0" }, + { "custom_98.frames", "1" }, + + { "custom_99", "RocksElements.pcx" }, + { "custom_99.xpos", "5" }, + { "custom_99.ypos", "0" }, + { "custom_99.frames", "1" }, + + { "custom_100", "RocksElements.pcx" }, + { "custom_100.xpos", "5" }, + { "custom_100.ypos", "0" }, + { "custom_100.frames", "1" }, + + { "custom_101", "RocksElements.pcx" }, + { "custom_101.xpos", "5" }, + { "custom_101.ypos", "0" }, + { "custom_101.frames", "1" }, + + { "custom_102", "RocksElements.pcx" }, + { "custom_102.xpos", "5" }, + { "custom_102.ypos", "0" }, + { "custom_102.frames", "1" }, + + { "custom_103", "RocksElements.pcx" }, + { "custom_103.xpos", "5" }, + { "custom_103.ypos", "0" }, + { "custom_103.frames", "1" }, + + { "custom_104", "RocksElements.pcx" }, + { "custom_104.xpos", "5" }, + { "custom_104.ypos", "0" }, + { "custom_104.frames", "1" }, + + { "custom_105", "RocksElements.pcx" }, + { "custom_105.xpos", "5" }, + { "custom_105.ypos", "0" }, + { "custom_105.frames", "1" }, + + { "custom_106", "RocksElements.pcx" }, + { "custom_106.xpos", "5" }, + { "custom_106.ypos", "0" }, + { "custom_106.frames", "1" }, + + { "custom_107", "RocksElements.pcx" }, + { "custom_107.xpos", "5" }, + { "custom_107.ypos", "0" }, + { "custom_107.frames", "1" }, + + { "custom_108", "RocksElements.pcx" }, + { "custom_108.xpos", "5" }, + { "custom_108.ypos", "0" }, + { "custom_108.frames", "1" }, + + { "custom_109", "RocksElements.pcx" }, + { "custom_109.xpos", "5" }, + { "custom_109.ypos", "0" }, + { "custom_109.frames", "1" }, + + { "custom_110", "RocksElements.pcx" }, + { "custom_110.xpos", "5" }, + { "custom_110.ypos", "0" }, + { "custom_110.frames", "1" }, + + { "custom_111", "RocksElements.pcx" }, + { "custom_111.xpos", "5" }, + { "custom_111.ypos", "0" }, + { "custom_111.frames", "1" }, + + { "custom_112", "RocksElements.pcx" }, + { "custom_112.xpos", "5" }, + { "custom_112.ypos", "0" }, + { "custom_112.frames", "1" }, + + { "custom_113", "RocksElements.pcx" }, + { "custom_113.xpos", "5" }, + { "custom_113.ypos", "0" }, + { "custom_113.frames", "1" }, + + { "custom_114", "RocksElements.pcx" }, + { "custom_114.xpos", "5" }, + { "custom_114.ypos", "0" }, + { "custom_114.frames", "1" }, + + { "custom_115", "RocksElements.pcx" }, + { "custom_115.xpos", "5" }, + { "custom_115.ypos", "0" }, + { "custom_115.frames", "1" }, + + { "custom_116", "RocksElements.pcx" }, + { "custom_116.xpos", "5" }, + { "custom_116.ypos", "0" }, + { "custom_116.frames", "1" }, + + { "custom_117", "RocksElements.pcx" }, + { "custom_117.xpos", "5" }, + { "custom_117.ypos", "0" }, + { "custom_117.frames", "1" }, + + { "custom_118", "RocksElements.pcx" }, + { "custom_118.xpos", "5" }, + { "custom_118.ypos", "0" }, + { "custom_118.frames", "1" }, + + { "custom_119", "RocksElements.pcx" }, + { "custom_119.xpos", "5" }, + { "custom_119.ypos", "0" }, + { "custom_119.frames", "1" }, + + { "custom_120", "RocksElements.pcx" }, + { "custom_120.xpos", "5" }, + { "custom_120.ypos", "0" }, + { "custom_120.frames", "1" }, + + { "custom_121", "RocksElements.pcx" }, + { "custom_121.xpos", "5" }, + { "custom_121.ypos", "0" }, + { "custom_121.frames", "1" }, + + { "custom_122", "RocksElements.pcx" }, + { "custom_122.xpos", "5" }, + { "custom_122.ypos", "0" }, + { "custom_122.frames", "1" }, + + { "custom_123", "RocksElements.pcx" }, + { "custom_123.xpos", "5" }, + { "custom_123.ypos", "0" }, + { "custom_123.frames", "1" }, + + { "custom_124", "RocksElements.pcx" }, + { "custom_124.xpos", "5" }, + { "custom_124.ypos", "0" }, + { "custom_124.frames", "1" }, + + { "custom_125", "RocksElements.pcx" }, + { "custom_125.xpos", "5" }, + { "custom_125.ypos", "0" }, + { "custom_125.frames", "1" }, + + { "custom_126", "RocksElements.pcx" }, + { "custom_126.xpos", "5" }, + { "custom_126.ypos", "0" }, + { "custom_126.frames", "1" }, + + { "custom_127", "RocksElements.pcx" }, + { "custom_127.xpos", "5" }, + { "custom_127.ypos", "0" }, + { "custom_127.frames", "1" }, + + +#endif /* CONF_CUS_C */ diff --git a/src/conf_gen.c b/src/conf_gen.c deleted file mode 100644 index 2634c6ae..00000000 --- a/src/conf_gen.c +++ /dev/null @@ -1,182 +0,0 @@ -/*********************************************************** -* 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_gen.c * -***********************************************************/ - -/* ----- this file was automatically generated -- do not edit by hand ----- */ - -#ifndef CONF_GEN_C -#define CONF_GEN_C - -/* values for graphics configuration (generic elements) */ - - { "generic_0", "RocksElements.pcx" }, - { "generic_0.xpos", "4" }, - { "generic_0.ypos", "0" }, - { "generic_0.frames", "1" }, - - { "generic_1", "RocksElements.pcx" }, - { "generic_1.xpos", "4" }, - { "generic_1.ypos", "0" }, - { "generic_1.frames", "1" }, - - { "generic_2", "RocksElements.pcx" }, - { "generic_2.xpos", "4" }, - { "generic_2.ypos", "0" }, - { "generic_2.frames", "1" }, - - { "generic_3", "RocksElements.pcx" }, - { "generic_3.xpos", "4" }, - { "generic_3.ypos", "0" }, - { "generic_3.frames", "1" }, - - { "generic_4", "RocksElements.pcx" }, - { "generic_4.xpos", "4" }, - { "generic_4.ypos", "0" }, - { "generic_4.frames", "1" }, - - { "generic_5", "RocksElements.pcx" }, - { "generic_5.xpos", "4" }, - { "generic_5.ypos", "0" }, - { "generic_5.frames", "1" }, - - { "generic_6", "RocksElements.pcx" }, - { "generic_6.xpos", "4" }, - { "generic_6.ypos", "0" }, - { "generic_6.frames", "1" }, - - { "generic_7", "RocksElements.pcx" }, - { "generic_7.xpos", "4" }, - { "generic_7.ypos", "0" }, - { "generic_7.frames", "1" }, - - { "generic_8", "RocksElements.pcx" }, - { "generic_8.xpos", "4" }, - { "generic_8.ypos", "0" }, - { "generic_8.frames", "1" }, - - { "generic_9", "RocksElements.pcx" }, - { "generic_9.xpos", "4" }, - { "generic_9.ypos", "0" }, - { "generic_9.frames", "1" }, - - { "generic_10", "RocksElements.pcx" }, - { "generic_10.xpos", "4" }, - { "generic_10.ypos", "0" }, - { "generic_10.frames", "1" }, - - { "generic_11", "RocksElements.pcx" }, - { "generic_11.xpos", "4" }, - { "generic_11.ypos", "0" }, - { "generic_11.frames", "1" }, - - { "generic_12", "RocksElements.pcx" }, - { "generic_12.xpos", "4" }, - { "generic_12.ypos", "0" }, - { "generic_12.frames", "1" }, - - { "generic_13", "RocksElements.pcx" }, - { "generic_13.xpos", "4" }, - { "generic_13.ypos", "0" }, - { "generic_13.frames", "1" }, - - { "generic_14", "RocksElements.pcx" }, - { "generic_14.xpos", "4" }, - { "generic_14.ypos", "0" }, - { "generic_14.frames", "1" }, - - { "generic_15", "RocksElements.pcx" }, - { "generic_15.xpos", "4" }, - { "generic_15.ypos", "0" }, - { "generic_15.frames", "1" }, - - { "generic_16", "RocksElements.pcx" }, - { "generic_16.xpos", "4" }, - { "generic_16.ypos", "0" }, - { "generic_16.frames", "1" }, - - { "generic_17", "RocksElements.pcx" }, - { "generic_17.xpos", "4" }, - { "generic_17.ypos", "0" }, - { "generic_17.frames", "1" }, - - { "generic_18", "RocksElements.pcx" }, - { "generic_18.xpos", "4" }, - { "generic_18.ypos", "0" }, - { "generic_18.frames", "1" }, - - { "generic_19", "RocksElements.pcx" }, - { "generic_19.xpos", "4" }, - { "generic_19.ypos", "0" }, - { "generic_19.frames", "1" }, - - { "generic_20", "RocksElements.pcx" }, - { "generic_20.xpos", "4" }, - { "generic_20.ypos", "0" }, - { "generic_20.frames", "1" }, - - { "generic_21", "RocksElements.pcx" }, - { "generic_21.xpos", "4" }, - { "generic_21.ypos", "0" }, - { "generic_21.frames", "1" }, - - { "generic_22", "RocksElements.pcx" }, - { "generic_22.xpos", "4" }, - { "generic_22.ypos", "0" }, - { "generic_22.frames", "1" }, - - { "generic_23", "RocksElements.pcx" }, - { "generic_23.xpos", "4" }, - { "generic_23.ypos", "0" }, - { "generic_23.frames", "1" }, - - { "generic_24", "RocksElements.pcx" }, - { "generic_24.xpos", "4" }, - { "generic_24.ypos", "0" }, - { "generic_24.frames", "1" }, - - { "generic_25", "RocksElements.pcx" }, - { "generic_25.xpos", "4" }, - { "generic_25.ypos", "0" }, - { "generic_25.frames", "1" }, - - { "generic_26", "RocksElements.pcx" }, - { "generic_26.xpos", "4" }, - { "generic_26.ypos", "0" }, - { "generic_26.frames", "1" }, - - { "generic_27", "RocksElements.pcx" }, - { "generic_27.xpos", "4" }, - { "generic_27.ypos", "0" }, - { "generic_27.frames", "1" }, - - { "generic_28", "RocksElements.pcx" }, - { "generic_28.xpos", "4" }, - { "generic_28.ypos", "0" }, - { "generic_28.frames", "1" }, - - { "generic_29", "RocksElements.pcx" }, - { "generic_29.xpos", "4" }, - { "generic_29.ypos", "0" }, - { "generic_29.frames", "1" }, - - { "generic_30", "RocksElements.pcx" }, - { "generic_30.xpos", "4" }, - { "generic_30.ypos", "0" }, - { "generic_30.frames", "1" }, - - { "generic_31", "RocksElements.pcx" }, - { "generic_31.xpos", "4" }, - { "generic_31.ypos", "0" }, - { "generic_31.frames", "1" }, - - -#endif /* CONF_GEN_C */ diff --git a/src/conf_gfx.c b/src/conf_gfx.c index 523b53ea..c4107ce9 100644 --- a/src/conf_gfx.c +++ b/src/conf_gfx.c @@ -473,13 +473,13 @@ struct ConfigInfo image_config[] = { "sp_electron.delay", "2" }, { "sp_terminal", "RocksSP.pcx" }, - { "sp_terminal.xpos", "8" }, - { "sp_terminal.ypos", "11" }, + { "sp_terminal.xpos", "0" }, + { "sp_terminal.ypos", "10" }, { "sp_terminal.frames", "7" }, { "sp_terminal.delay", "12" }, { "sp_terminal.active", "RocksSP.pcx" }, - { "sp_terminal.active.xpos", "8" }, - { "sp_terminal.active.ypos", "12" }, + { "sp_terminal.active.xpos", "0" }, + { "sp_terminal.active.ypos", "11" }, { "sp_terminal.active.frames", "7" }, { "sp_terminal.active.delay", "4" }, @@ -2071,7 +2071,7 @@ struct ConfigInfo image_config[] = { "stoneblock.ypos", "1" }, { "stoneblock.frames", "1" }, - /* images for generic elements and actions */ + /* images for other elements and actions */ { "player1", "RocksHeroes.pcx" }, { "player1.xpos", "0" }, @@ -2566,7 +2566,7 @@ struct ConfigInfo image_config[] = { "scrollbar_yellow.frames", "1" }, #include "conf_chr.c" /* include auto-generated data structure definitions */ -#include "conf_gen.c" /* include auto-generated data structure definitions */ +#include "conf_cus.c" /* include auto-generated data structure definitions */ /* images not associated to game elements (used for menu screens etc.) */ /* keyword to stop parser: "NO_MORE_ELEMENT_IMAGES" <-- do not change! */ diff --git a/src/conf_gfx.h b/src/conf_gfx.h index e065f7a6..982b9982 100644 --- a/src/conf_gfx.h +++ b/src/conf_gfx.h @@ -623,51 +623,147 @@ #define IMG_CHAR_DEGREE 602 #define IMG_CHAR_TM 603 #define IMG_CHAR_CURSOR 604 -#define IMG_GENERIC_0 605 -#define IMG_GENERIC_1 606 -#define IMG_GENERIC_2 607 -#define IMG_GENERIC_3 608 -#define IMG_GENERIC_4 609 -#define IMG_GENERIC_5 610 -#define IMG_GENERIC_6 611 -#define IMG_GENERIC_7 612 -#define IMG_GENERIC_8 613 -#define IMG_GENERIC_9 614 -#define IMG_GENERIC_10 615 -#define IMG_GENERIC_11 616 -#define IMG_GENERIC_12 617 -#define IMG_GENERIC_13 618 -#define IMG_GENERIC_14 619 -#define IMG_GENERIC_15 620 -#define IMG_GENERIC_16 621 -#define IMG_GENERIC_17 622 -#define IMG_GENERIC_18 623 -#define IMG_GENERIC_19 624 -#define IMG_GENERIC_20 625 -#define IMG_GENERIC_21 626 -#define IMG_GENERIC_22 627 -#define IMG_GENERIC_23 628 -#define IMG_GENERIC_24 629 -#define IMG_GENERIC_25 630 -#define IMG_GENERIC_26 631 -#define IMG_GENERIC_27 632 -#define IMG_GENERIC_28 633 -#define IMG_GENERIC_29 634 -#define IMG_GENERIC_30 635 -#define IMG_GENERIC_31 636 -#define IMG_MENU_BACK 637 -#define IMG_MENU_DOOR 638 -#define IMG_MENU_TOONS 639 -#define IMG_MENU_FONT_BIG 640 -#define IMG_MENU_FONT_SMALL 641 -#define IMG_MENU_FONT_MEDIUM 642 -#define IMG_MENU_FONT_EM 643 -#define IMG_INFO_FONT_EM_1 644 -#define IMG_INFO_FONT_EM_2 645 -#define IMG_INFO_FONT_EM_3 646 -#define IMG_INFO_FONT_EM_4 647 -#define IMG_INFO_FONT_EM_5 648 +#define IMG_CUSTOM_0 605 +#define IMG_CUSTOM_1 606 +#define IMG_CUSTOM_2 607 +#define IMG_CUSTOM_3 608 +#define IMG_CUSTOM_4 609 +#define IMG_CUSTOM_5 610 +#define IMG_CUSTOM_6 611 +#define IMG_CUSTOM_7 612 +#define IMG_CUSTOM_8 613 +#define IMG_CUSTOM_9 614 +#define IMG_CUSTOM_10 615 +#define IMG_CUSTOM_11 616 +#define IMG_CUSTOM_12 617 +#define IMG_CUSTOM_13 618 +#define IMG_CUSTOM_14 619 +#define IMG_CUSTOM_15 620 +#define IMG_CUSTOM_16 621 +#define IMG_CUSTOM_17 622 +#define IMG_CUSTOM_18 623 +#define IMG_CUSTOM_19 624 +#define IMG_CUSTOM_20 625 +#define IMG_CUSTOM_21 626 +#define IMG_CUSTOM_22 627 +#define IMG_CUSTOM_23 628 +#define IMG_CUSTOM_24 629 +#define IMG_CUSTOM_25 630 +#define IMG_CUSTOM_26 631 +#define IMG_CUSTOM_27 632 +#define IMG_CUSTOM_28 633 +#define IMG_CUSTOM_29 634 +#define IMG_CUSTOM_30 635 +#define IMG_CUSTOM_31 636 +#define IMG_CUSTOM_32 637 +#define IMG_CUSTOM_33 638 +#define IMG_CUSTOM_34 639 +#define IMG_CUSTOM_35 640 +#define IMG_CUSTOM_36 641 +#define IMG_CUSTOM_37 642 +#define IMG_CUSTOM_38 643 +#define IMG_CUSTOM_39 644 +#define IMG_CUSTOM_40 645 +#define IMG_CUSTOM_41 646 +#define IMG_CUSTOM_42 647 +#define IMG_CUSTOM_43 648 +#define IMG_CUSTOM_44 649 +#define IMG_CUSTOM_45 650 +#define IMG_CUSTOM_46 651 +#define IMG_CUSTOM_47 652 +#define IMG_CUSTOM_48 653 +#define IMG_CUSTOM_49 654 +#define IMG_CUSTOM_50 655 +#define IMG_CUSTOM_51 656 +#define IMG_CUSTOM_52 657 +#define IMG_CUSTOM_53 658 +#define IMG_CUSTOM_54 659 +#define IMG_CUSTOM_55 660 +#define IMG_CUSTOM_56 661 +#define IMG_CUSTOM_57 662 +#define IMG_CUSTOM_58 663 +#define IMG_CUSTOM_59 664 +#define IMG_CUSTOM_60 665 +#define IMG_CUSTOM_61 666 +#define IMG_CUSTOM_62 667 +#define IMG_CUSTOM_63 668 +#define IMG_CUSTOM_64 669 +#define IMG_CUSTOM_65 670 +#define IMG_CUSTOM_66 671 +#define IMG_CUSTOM_67 672 +#define IMG_CUSTOM_68 673 +#define IMG_CUSTOM_69 674 +#define IMG_CUSTOM_70 675 +#define IMG_CUSTOM_71 676 +#define IMG_CUSTOM_72 677 +#define IMG_CUSTOM_73 678 +#define IMG_CUSTOM_74 679 +#define IMG_CUSTOM_75 680 +#define IMG_CUSTOM_76 681 +#define IMG_CUSTOM_77 682 +#define IMG_CUSTOM_78 683 +#define IMG_CUSTOM_79 684 +#define IMG_CUSTOM_80 685 +#define IMG_CUSTOM_81 686 +#define IMG_CUSTOM_82 687 +#define IMG_CUSTOM_83 688 +#define IMG_CUSTOM_84 689 +#define IMG_CUSTOM_85 690 +#define IMG_CUSTOM_86 691 +#define IMG_CUSTOM_87 692 +#define IMG_CUSTOM_88 693 +#define IMG_CUSTOM_89 694 +#define IMG_CUSTOM_90 695 +#define IMG_CUSTOM_91 696 +#define IMG_CUSTOM_92 697 +#define IMG_CUSTOM_93 698 +#define IMG_CUSTOM_94 699 +#define IMG_CUSTOM_95 700 +#define IMG_CUSTOM_96 701 +#define IMG_CUSTOM_97 702 +#define IMG_CUSTOM_98 703 +#define IMG_CUSTOM_99 704 +#define IMG_CUSTOM_100 705 +#define IMG_CUSTOM_101 706 +#define IMG_CUSTOM_102 707 +#define IMG_CUSTOM_103 708 +#define IMG_CUSTOM_104 709 +#define IMG_CUSTOM_105 710 +#define IMG_CUSTOM_106 711 +#define IMG_CUSTOM_107 712 +#define IMG_CUSTOM_108 713 +#define IMG_CUSTOM_109 714 +#define IMG_CUSTOM_110 715 +#define IMG_CUSTOM_111 716 +#define IMG_CUSTOM_112 717 +#define IMG_CUSTOM_113 718 +#define IMG_CUSTOM_114 719 +#define IMG_CUSTOM_115 720 +#define IMG_CUSTOM_116 721 +#define IMG_CUSTOM_117 722 +#define IMG_CUSTOM_118 723 +#define IMG_CUSTOM_119 724 +#define IMG_CUSTOM_120 725 +#define IMG_CUSTOM_121 726 +#define IMG_CUSTOM_122 727 +#define IMG_CUSTOM_123 728 +#define IMG_CUSTOM_124 729 +#define IMG_CUSTOM_125 730 +#define IMG_CUSTOM_126 731 +#define IMG_CUSTOM_127 732 +#define IMG_MENU_BACK 733 +#define IMG_MENU_DOOR 734 +#define IMG_MENU_TOONS 735 +#define IMG_MENU_FONT_BIG 736 +#define IMG_MENU_FONT_SMALL 737 +#define IMG_MENU_FONT_MEDIUM 738 +#define IMG_MENU_FONT_EM 739 +#define IMG_INFO_FONT_EM_1 740 +#define IMG_INFO_FONT_EM_2 741 +#define IMG_INFO_FONT_EM_3 742 +#define IMG_INFO_FONT_EM_4 743 +#define IMG_INFO_FONT_EM_5 744 -#define NUM_IMAGE_FILES 649 +#define NUM_IMAGE_FILES 745 #endif /* CONF_GFX_H */ diff --git a/src/conftime.h b/src/conftime.h index e982fbad..924ee24e 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2003-01-02 05:41]" +#define COMPILE_DATE_STRING "[2003-01-04 01:24]" diff --git a/src/editor.c b/src/editor.c index 7850a4f5..e8201e30 100644 --- a/src/editor.c +++ b/src/editor.c @@ -737,7 +737,7 @@ static int counter_xsize = DXSIZE + FONT2_XSIZE - 2 * ED_GADGET_DISTANCE; int element_shift = 0; -int editor_element[] = +int editor_el_boulderdash[] = { EL_CHAR('B'), EL_CHAR('O'), @@ -778,7 +778,11 @@ int editor_element[] = EL_BD_BUTTERFLY_DOWN, EL_BD_FIREFLY_DOWN, EL_EMPTY, +}; +int num_editor_el_boulderdash = SIZEOF_ARRAY_INT(editor_el_boulderdash); +int editor_el_emerald_mine[] = +{ EL_CHAR('E'), EL_CHAR('M'), EL_CHAR('E'), @@ -868,7 +872,11 @@ int editor_element[] = EL_EM_GATE2_GRAY, EL_EM_GATE3_GRAY, EL_EM_GATE4_GRAY, +}; +int num_editor_el_emerald_mine = SIZEOF_ARRAY_INT(editor_el_emerald_mine); +int editor_el_more[] = +{ EL_CHAR('M'), EL_CHAR('O'), EL_CHAR('R'), @@ -968,8 +976,11 @@ int editor_element[] = EL_EMC_WALL5, EL_EMC_WALL6, EL_EMC_WALL7, +}; +int num_editor_el_more = SIZEOF_ARRAY_INT(editor_el_more); - +int editor_el_sokoban[] = +{ EL_CHAR('S'), EL_CHAR('O'), EL_CHAR('K'), @@ -984,7 +995,11 @@ int editor_element[] = EL_SOKOBAN_FIELD_EMPTY, EL_SOKOBAN_FIELD_FULL, EL_STEELWALL, +}; +int num_editor_el_sokoban = SIZEOF_ARRAY_INT(editor_el_sokoban); +int editor_el_supaplex[] = +{ EL_CHAR('S'), EL_CHAR('U'), EL_CHAR('P'), @@ -1044,7 +1059,11 @@ int editor_element[] = EL_SP_HARD_BASE6, EL_SP_CHIP_UPPER, EL_SP_CHIP_LOWER, +}; +int num_editor_el_supaplex = SIZEOF_ARRAY_INT(editor_el_supaplex); +int editor_el_diamond_caves[] = +{ EL_CHAR('D'), EL_CHAR('I'), EL_CHAR('A'), @@ -1124,7 +1143,11 @@ int editor_element[] = EL_SHIELD_DEADLY, EL_EXTRA_TIME, EL_EMPTY, +}; +int num_editor_el_diamond_caves = SIZEOF_ARRAY_INT(editor_el_diamond_caves); +int editor_el_dx_boulderdash[] = +{ EL_CHAR('D'), EL_CHAR('X'), EL_CHAR('-'), @@ -1163,85 +1186,12 @@ int editor_element[] = EL_TRAP, EL_DX_SUPABOMB, EL_EMPTY, - EL_EMPTY, - - /* - EL_CHAR('D'), - EL_CHAR('Y'), - EL_CHAR('N'), - EL_CHAR('A'), - - EL_CHAR('B'), - EL_CHAR('L'), - EL_CHAR('A'), - EL_CHAR('S'), - - EL_CHAR_MINUS, - EL_CHAR('T'), - EL_CHAR('E'), - EL_CHAR('R'), - */ - - EL_CHAR('C'), - EL_CHAR('U'), - EL_CHAR('S'), - EL_CHAR('-'), - - EL_CHAR('T'), - EL_CHAR('O'), - EL_CHAR('M'), - EL_CHAR(' '), - - EL_CHAR('E'), - EL_CHAR('L'), - EL_CHAR('E'), - EL_CHAR('M'), - - EL_CHAR('E'), - EL_CHAR('N'), - EL_CHAR('T'), - EL_CHAR('S'), - - EL_GENERIC_START + 0, - EL_GENERIC_START + 1, - EL_GENERIC_START + 2, - EL_GENERIC_START + 3, - - EL_GENERIC_START + 4, - EL_GENERIC_START + 5, - EL_GENERIC_START + 6, - EL_GENERIC_START + 7, - - EL_GENERIC_START + 8, - EL_GENERIC_START + 9, - EL_GENERIC_START + 10, - EL_GENERIC_START + 11, - - EL_GENERIC_START + 12, - EL_GENERIC_START + 13, - EL_GENERIC_START + 14, - EL_GENERIC_START + 15, - - EL_GENERIC_START + 16, - EL_GENERIC_START + 17, - EL_GENERIC_START + 18, - EL_GENERIC_START + 19, - - EL_GENERIC_START + 20, - EL_GENERIC_START + 21, - EL_GENERIC_START + 22, - EL_GENERIC_START + 23, - - EL_GENERIC_START + 24, - EL_GENERIC_START + 25, - EL_GENERIC_START + 26, - EL_GENERIC_START + 27, - - EL_GENERIC_START + 28, - EL_GENERIC_START + 29, - EL_GENERIC_START + 30, - EL_GENERIC_START + 31, + EL_EMPTY +}; +int num_editor_el_dx_boulderdash = SIZEOF_ARRAY_INT(editor_el_dx_boulderdash); +int editor_el_chars[] = +{ EL_CHAR('T'), EL_CHAR('E'), EL_CHAR('X'), @@ -1332,7 +1282,284 @@ int editor_element[] = EL_CHAR('ยด'), EL_CHAR('|') }; -int elements_in_list = sizeof(editor_element)/sizeof(int); +int num_editor_el_chars = SIZEOF_ARRAY_INT(editor_el_chars); + +int editor_el_custom[] = +{ + EL_CHAR('C'), + EL_CHAR('U'), + EL_CHAR('S'), + EL_CHAR('-'), + + EL_CHAR('T'), + EL_CHAR('O'), + EL_CHAR('M'), + EL_CHAR(' '), + + EL_CHAR('E'), + EL_CHAR('L'), + EL_CHAR('E'), + EL_CHAR('M'), + + EL_CHAR('E'), + EL_CHAR('N'), + EL_CHAR('T'), + EL_CHAR('S'), + + EL_CUSTOM_START + 0, + EL_CUSTOM_START + 1, + EL_CUSTOM_START + 2, + EL_CUSTOM_START + 3, + + EL_CUSTOM_START + 4, + EL_CUSTOM_START + 5, + EL_CUSTOM_START + 6, + EL_CUSTOM_START + 7, + + EL_CUSTOM_START + 8, + EL_CUSTOM_START + 9, + EL_CUSTOM_START + 10, + EL_CUSTOM_START + 11, + + EL_CUSTOM_START + 12, + EL_CUSTOM_START + 13, + EL_CUSTOM_START + 14, + EL_CUSTOM_START + 15, + + EL_CUSTOM_START + 16, + EL_CUSTOM_START + 17, + EL_CUSTOM_START + 18, + EL_CUSTOM_START + 19, + + EL_CUSTOM_START + 20, + EL_CUSTOM_START + 21, + EL_CUSTOM_START + 22, + EL_CUSTOM_START + 23, + + EL_CUSTOM_START + 24, + EL_CUSTOM_START + 25, + EL_CUSTOM_START + 26, + EL_CUSTOM_START + 27, + + EL_CUSTOM_START + 28, + EL_CUSTOM_START + 29, + EL_CUSTOM_START + 30, + EL_CUSTOM_START + 31, + + EL_CUSTOM_START + 32, + EL_CUSTOM_START + 33, + EL_CUSTOM_START + 34, + EL_CUSTOM_START + 35, + + EL_CUSTOM_START + 36, + EL_CUSTOM_START + 37, + EL_CUSTOM_START + 38, + EL_CUSTOM_START + 39, + + EL_CUSTOM_START + 40, + EL_CUSTOM_START + 41, + EL_CUSTOM_START + 42, + EL_CUSTOM_START + 43, + + EL_CUSTOM_START + 44, + EL_CUSTOM_START + 45, + EL_CUSTOM_START + 46, + EL_CUSTOM_START + 47, + + EL_CUSTOM_START + 48, + EL_CUSTOM_START + 49, + EL_CUSTOM_START + 50, + EL_CUSTOM_START + 51, + + EL_CUSTOM_START + 52, + EL_CUSTOM_START + 53, + EL_CUSTOM_START + 54, + EL_CUSTOM_START + 55, + + EL_CUSTOM_START + 56, + EL_CUSTOM_START + 57, + EL_CUSTOM_START + 58, + EL_CUSTOM_START + 59, + + EL_CUSTOM_START + 60, + EL_CUSTOM_START + 61, + EL_CUSTOM_START + 62, + EL_CUSTOM_START + 63, + + EL_CUSTOM_START + 64, + EL_CUSTOM_START + 65, + EL_CUSTOM_START + 66, + EL_CUSTOM_START + 67, + + EL_CUSTOM_START + 68, + EL_CUSTOM_START + 69, + EL_CUSTOM_START + 70, + EL_CUSTOM_START + 71, + + EL_CUSTOM_START + 72, + EL_CUSTOM_START + 73, + EL_CUSTOM_START + 74, + EL_CUSTOM_START + 75, + + EL_CUSTOM_START + 76, + EL_CUSTOM_START + 77, + EL_CUSTOM_START + 78, + EL_CUSTOM_START + 79, + + EL_CUSTOM_START + 80, + EL_CUSTOM_START + 81, + EL_CUSTOM_START + 82, + EL_CUSTOM_START + 83, + + EL_CUSTOM_START + 84, + EL_CUSTOM_START + 85, + EL_CUSTOM_START + 86, + EL_CUSTOM_START + 87, + + EL_CUSTOM_START + 88, + EL_CUSTOM_START + 89, + EL_CUSTOM_START + 90, + EL_CUSTOM_START + 91, + + EL_CUSTOM_START + 92, + EL_CUSTOM_START + 93, + EL_CUSTOM_START + 94, + EL_CUSTOM_START + 95, + + EL_CUSTOM_START + 96, + EL_CUSTOM_START + 97, + EL_CUSTOM_START + 98, + EL_CUSTOM_START + 99, + + EL_CUSTOM_START + 100, + EL_CUSTOM_START + 101, + EL_CUSTOM_START + 102, + EL_CUSTOM_START + 103, + + EL_CUSTOM_START + 104, + EL_CUSTOM_START + 105, + EL_CUSTOM_START + 106, + EL_CUSTOM_START + 107, + + EL_CUSTOM_START + 108, + EL_CUSTOM_START + 109, + EL_CUSTOM_START + 110, + EL_CUSTOM_START + 111, + + EL_CUSTOM_START + 112, + EL_CUSTOM_START + 113, + EL_CUSTOM_START + 114, + EL_CUSTOM_START + 115, + + EL_CUSTOM_START + 116, + EL_CUSTOM_START + 117, + EL_CUSTOM_START + 118, + EL_CUSTOM_START + 119, + + EL_CUSTOM_START + 120, + EL_CUSTOM_START + 121, + EL_CUSTOM_START + 122, + EL_CUSTOM_START + 123, + + EL_CUSTOM_START + 124, + EL_CUSTOM_START + 125, + EL_CUSTOM_START + 126, + EL_CUSTOM_START + 127 +}; +int num_editor_el_custom = SIZEOF_ARRAY_INT(editor_el_custom); + +int *editor_elements = NULL; /* dynamically allocated */ +int num_editor_elements = 0; /* dynamically determined */ + +struct +{ + boolean *setup_value; + int *element_list; + int *element_list_size; + + boolean last_setup_value; +} +editor_elements_info[] = +{ + { &setup.editor.el_boulderdash, editor_el_boulderdash, + &num_editor_el_boulderdash }, + { &setup.editor.el_emerald_mine, editor_el_emerald_mine, + &num_editor_el_emerald_mine }, + { &setup.editor.el_more, editor_el_more, + &num_editor_el_more }, + { &setup.editor.el_sokoban, editor_el_sokoban, + &num_editor_el_sokoban }, + { &setup.editor.el_supaplex, editor_el_supaplex, + &num_editor_el_supaplex }, + { &setup.editor.el_diamond_caves, editor_el_diamond_caves, + &num_editor_el_diamond_caves }, + { &setup.editor.el_dx_boulderdash, editor_el_dx_boulderdash, + &num_editor_el_dx_boulderdash }, + { &setup.editor.el_chars, editor_el_chars, + &num_editor_el_chars }, + { &setup.editor.el_custom, editor_el_custom, + &num_editor_el_custom }, + { NULL, NULL, + NULL } +}; + +static void ReinitializeElementList() +{ + int pos = 0; + int i, j; + + if (editor_elements != NULL) + free(editor_elements); + + num_editor_elements = 0; + + /* determine size of element list */ + for (i=0; editor_elements_info[i].setup_value != NULL; i++) + if (*editor_elements_info[i].setup_value) + num_editor_elements += *editor_elements_info[i].element_list_size; + + if (num_editor_elements < ED_NUM_ELEMENTLIST_BUTTONS) + { + /* workaround: offer at least as many elements as element buttons exist */ + int list_nr = 1; /* see above: editor_elements_info for Emerald Mine */ + + *editor_elements_info[list_nr].setup_value = TRUE; + num_editor_elements += *editor_elements_info[list_nr].element_list_size; + } + + editor_elements = checked_malloc(num_editor_elements * sizeof(int)); + + /* fill element list */ + for (i=0; editor_elements_info[i].setup_value != NULL; i++) + if (*editor_elements_info[i].setup_value) + for (j=0; j<*editor_elements_info[i].element_list_size; j++) + editor_elements[pos++] = editor_elements_info[i].element_list[j]; +} + +static void ReinitializeElementListButtons() +{ + static boolean initialization_needed = TRUE; + int i; + + if (!initialization_needed) /* check if editor element setup has changed */ + for (i=0; editor_elements_info[i].setup_value != NULL; i++) + if (editor_elements_info[i].last_setup_value != + *editor_elements_info[i].setup_value) + initialization_needed = TRUE; + + if (!initialization_needed) + return; + + FreeLevelEditorGadgets(); + CreateLevelEditorGadgets(); + + /* store current setup values for next invocation of this function */ + for (i=0; editor_elements_info[i].setup_value != NULL; i++) + editor_elements_info[i].last_setup_value = + *editor_elements_info[i].setup_value; + + initialization_needed = FALSE; +} static char *getElementInfoText(int element) { @@ -1546,6 +1773,7 @@ static void CreateControlButtons() int x = i % ED_ELEMENTLIST_BUTTONS_HORIZ; int y = i / ED_ELEMENTLIST_BUTTONS_HORIZ; int id = GADGET_ID_ELEMENTLIST_FIRST + i; + int element = editor_elements[i]; event_mask = GD_EVENT_RELEASED; @@ -1556,14 +1784,13 @@ static void CreateControlButtons() gd_x2 = DOOR_GFX_PAGEX6 + ED_ELEMENTLIST_XPOS; gd_y = DOOR_GFX_PAGEY1 + ED_ELEMENTLIST_YPOS; - getMiniGraphicSource(el2img(editor_element[i]), - &deco_bitmap, &deco_x, &deco_y); + getMiniGraphicSource(el2img(element), &deco_bitmap, &deco_x, &deco_y); deco_xpos = (ED_ELEMENTLIST_XSIZE - MINI_TILEX) / 2; deco_ypos = (ED_ELEMENTLIST_YSIZE - MINI_TILEY) / 2; gi = CreateGadget(GDI_CUSTOM_ID, id, GDI_CUSTOM_TYPE_ID, i, - GDI_INFO_TEXT, getElementInfoText(editor_element[i]), + GDI_INFO_TEXT, getElementInfoText(element), GDI_X, DX + gd_xoffset, GDI_Y, DY + gd_yoffset, GDI_WIDTH, ED_ELEMENTLIST_XSIZE, @@ -1877,7 +2104,7 @@ static void CreateScrollbarGadgets() if (i == ED_SCROLLBAR_ID_LIST_VERTICAL) { - items_max = elements_in_list / ED_ELEMENTLIST_BUTTONS_HORIZ; + items_max = num_editor_elements / ED_ELEMENTLIST_BUTTONS_HORIZ; items_visible = ED_ELEMENTLIST_BUTTONS_VERT; item_position = 0; } @@ -2017,6 +2244,8 @@ static void CreateCheckbuttonGadgets() void CreateLevelEditorGadgets() { + ReinitializeElementList(); + CreateControlButtons(); CreateCounterButtons(); CreateDrawingAreas(); @@ -2234,6 +2463,9 @@ void DrawLevelEd() redraw_mask |= REDRAW_ALL; + ReinitializeElementListButtons(); /* only needed after setup changes */ + + UnmapTapeButtons(); MapControlButtons(); /* copy actual editor door content to door double buffer for OpenDoor() */ @@ -3909,8 +4141,8 @@ static void HandleControlButtons(struct GadgetInfo *gi) if (element_shift < 0) element_shift = 0; - if (element_shift > elements_in_list - ED_NUM_ELEMENTLIST_BUTTONS) - element_shift = elements_in_list - ED_NUM_ELEMENTLIST_BUTTONS; + if (element_shift > num_editor_elements - ED_NUM_ELEMENTLIST_BUTTONS) + element_shift = num_editor_elements - ED_NUM_ELEMENTLIST_BUTTONS; ModifyGadget(level_editor_gadget[GADGET_ID_SCROLL_LIST_VERTICAL], GDI_SCROLLBAR_ITEM_POSITION, @@ -3922,7 +4154,7 @@ static void HandleControlButtons(struct GadgetInfo *gi) int gadget_id = GADGET_ID_ELEMENTLIST_FIRST + i; struct GadgetInfo *gi = level_editor_gadget[gadget_id]; struct GadgetDesign *gd = &gi->deco.design; - int element = editor_element[element_shift + i]; + int element = editor_elements[element_shift + i]; UnmapGadget(gi); getMiniGraphicSource(el2img(element), &gd->bitmap, &gd->x, &gd->y); @@ -4082,7 +4314,7 @@ static void HandleControlButtons(struct GadgetInfo *gi) id <= GADGET_ID_ELEMENTLIST_LAST) { int element_position = id - GADGET_ID_ELEMENTLIST_FIRST; - int new_element = editor_element[element_position + element_shift]; + int new_element = editor_elements[element_position + element_shift]; PickDrawingElement(button, new_element); diff --git a/src/files.c b/src/files.c index fad45178..f4c2065d 100644 --- a/src/files.c +++ b/src/files.c @@ -1229,34 +1229,48 @@ void SaveScore(int level_nr) #define NUM_GLOBAL_SETUP_TOKENS 22 +/* editor setup */ +#define SETUP_TOKEN_EDITOR_EL_BOULDERDASH 0 +#define SETUP_TOKEN_EDITOR_EL_EMERALD_MINE 1 +#define SETUP_TOKEN_EDITOR_EL_MORE 2 +#define SETUP_TOKEN_EDITOR_EL_SOKOBAN 3 +#define SETUP_TOKEN_EDITOR_EL_SUPAPLEX 4 +#define SETUP_TOKEN_EDITOR_EL_DIAMOND_CAVES 5 +#define SETUP_TOKEN_EDITOR_EL_DX_BOULDERDASH 6 +#define SETUP_TOKEN_EDITOR_EL_CHARS 7 +#define SETUP_TOKEN_EDITOR_EL_CUSTOM 8 + +#define NUM_EDITOR_SETUP_TOKENS 9 + /* shortcut setup */ -#define SETUP_TOKEN_SAVE_GAME 0 -#define SETUP_TOKEN_LOAD_GAME 1 -#define SETUP_TOKEN_TOGGLE_PAUSE 2 +#define SETUP_TOKEN_SHORTCUT_SAVE_GAME 0 +#define SETUP_TOKEN_SHORTCUT_LOAD_GAME 1 +#define SETUP_TOKEN_SHORTCUT_TOGGLE_PAUSE 2 #define NUM_SHORTCUT_SETUP_TOKENS 3 /* player setup */ -#define SETUP_TOKEN_USE_JOYSTICK 0 -#define SETUP_TOKEN_JOY_DEVICE_NAME 1 -#define SETUP_TOKEN_JOY_XLEFT 2 -#define SETUP_TOKEN_JOY_XMIDDLE 3 -#define SETUP_TOKEN_JOY_XRIGHT 4 -#define SETUP_TOKEN_JOY_YUPPER 5 -#define SETUP_TOKEN_JOY_YMIDDLE 6 -#define SETUP_TOKEN_JOY_YLOWER 7 -#define SETUP_TOKEN_JOY_SNAP 8 -#define SETUP_TOKEN_JOY_BOMB 9 -#define SETUP_TOKEN_KEY_LEFT 10 -#define SETUP_TOKEN_KEY_RIGHT 11 -#define SETUP_TOKEN_KEY_UP 12 -#define SETUP_TOKEN_KEY_DOWN 13 -#define SETUP_TOKEN_KEY_SNAP 14 -#define SETUP_TOKEN_KEY_BOMB 15 +#define SETUP_TOKEN_PLAYER_USE_JOYSTICK 0 +#define SETUP_TOKEN_PLAYER_JOY_DEVICE_NAME 1 +#define SETUP_TOKEN_PLAYER_JOY_XLEFT 2 +#define SETUP_TOKEN_PLAYER_JOY_XMIDDLE 3 +#define SETUP_TOKEN_PLAYER_JOY_XRIGHT 4 +#define SETUP_TOKEN_PLAYER_JOY_YUPPER 5 +#define SETUP_TOKEN_PLAYER_JOY_YMIDDLE 6 +#define SETUP_TOKEN_PLAYER_JOY_YLOWER 7 +#define SETUP_TOKEN_PLAYER_JOY_SNAP 8 +#define SETUP_TOKEN_PLAYER_JOY_BOMB 9 +#define SETUP_TOKEN_PLAYER_KEY_LEFT 10 +#define SETUP_TOKEN_PLAYER_KEY_RIGHT 11 +#define SETUP_TOKEN_PLAYER_KEY_UP 12 +#define SETUP_TOKEN_PLAYER_KEY_DOWN 13 +#define SETUP_TOKEN_PLAYER_KEY_SNAP 14 +#define SETUP_TOKEN_PLAYER_KEY_BOMB 15 #define NUM_PLAYER_SETUP_TOKENS 16 static struct SetupInfo si; +static struct SetupEditorInfo sei; static struct SetupShortcutInfo ssi; static struct SetupInputInfo sii; @@ -1287,6 +1301,20 @@ static struct TokenInfo global_setup_tokens[] = { TYPE_SWITCH, &si.override_level_music, "override_level_music" }, }; +static struct TokenInfo editor_setup_tokens[] = +{ + /* shortcut setup */ + { TYPE_SWITCH, &sei.el_boulderdash, "editor.el_boulderdash" }, + { TYPE_SWITCH, &sei.el_emerald_mine, "editor.el_emerald_mine" }, + { TYPE_SWITCH, &sei.el_more, "editor.el_more" }, + { TYPE_SWITCH, &sei.el_sokoban, "editor.el_sokoban" }, + { TYPE_SWITCH, &sei.el_supaplex, "editor.el_supaplex" }, + { TYPE_SWITCH, &sei.el_diamond_caves, "editor.el_diamond_caves" }, + { TYPE_SWITCH, &sei.el_dx_boulderdash,"editor.el_dx_boulderdash" }, + { TYPE_SWITCH, &sei.el_chars, "editor.el_chars" }, + { TYPE_SWITCH, &sei.el_custom, "editor.el_custom" }, +}; + static struct TokenInfo shortcut_setup_tokens[] = { /* shortcut setup */ @@ -1347,6 +1375,16 @@ static void setSetupInfoToDefaults(struct SetupInfo *si) si->override_level_sounds = FALSE; si->override_level_music = FALSE; + si->editor.el_boulderdash = TRUE; + si->editor.el_emerald_mine = TRUE; + si->editor.el_more = TRUE; + si->editor.el_sokoban = TRUE; + si->editor.el_supaplex = TRUE; + si->editor.el_diamond_caves = TRUE; + si->editor.el_dx_boulderdash = TRUE; + si->editor.el_chars = TRUE; + si->editor.el_custom = FALSE; + si->shortcut.save_game = DEFAULT_KEY_SAVE_GAME; si->shortcut.load_game = DEFAULT_KEY_LOAD_GAME; si->shortcut.toggle_pause = DEFAULT_KEY_TOGGLE_PAUSE; @@ -1386,6 +1424,13 @@ static void decodeSetupFileList(struct SetupFileList *setup_file_list) getTokenValue(setup_file_list, global_setup_tokens[i].text)); setup = si; + /* editor setup */ + sei = setup.editor; + for (i=0; i -1) diff --git a/src/libgame/system.h b/src/libgame/system.h index 7dcc7e13..d393bfc0 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -332,6 +332,19 @@ struct SetupInputInfo struct SetupKeyboardInfo key; }; +struct SetupEditorInfo +{ + boolean el_boulderdash; + boolean el_emerald_mine; + boolean el_more; + boolean el_sokoban; + boolean el_supaplex; + boolean el_diamond_caves; + boolean el_dx_boulderdash; + boolean el_chars; + boolean el_custom; +}; + struct SetupShortcutInfo { Key save_game; @@ -368,6 +381,7 @@ struct SetupInfo boolean override_level_sounds; boolean override_level_music; + struct SetupEditorInfo editor; struct SetupShortcutInfo shortcut; struct SetupInputInfo input[MAX_PLAYERS]; }; diff --git a/src/main.c b/src/main.c index ba87b736..46277b95 100644 --- a/src/main.c +++ b/src/main.c @@ -541,38 +541,134 @@ struct ElementInfo element_info[MAX_ELEMENTS] = { "dx_bomb", "stable bomb (DX style)" }, { NULL, "-" }, { NULL, "-" }, - { "generic", "generic element 0" }, - { "generic", "generic element 1" }, - { "generic", "generic element 2" }, - { "generic", "generic element 3" }, - { "generic", "generic element 4" }, - { "generic", "generic element 5" }, - { "generic", "generic element 6" }, - { "generic", "generic element 7" }, - { "generic", "generic element 8" }, - { "generic", "generic element 9" }, - { "generic", "generic element 10" }, - { "generic", "generic element 11" }, - { "generic", "generic element 12" }, - { "generic", "generic element 13" }, - { "generic", "generic element 14" }, - { "generic", "generic element 15" }, - { "generic", "generic element 16" }, - { "generic", "generic element 17" }, - { "generic", "generic element 18" }, - { "generic", "generic element 19" }, - { "generic", "generic element 20" }, - { "generic", "generic element 21" }, - { "generic", "generic element 22" }, - { "generic", "generic element 23" }, - { "generic", "generic element 24" }, - { "generic", "generic element 25" }, - { "generic", "generic element 26" }, - { "generic", "generic element 27" }, - { "generic", "generic element 28" }, - { "generic", "generic element 29" }, - { "generic", "generic element 30" }, - { "generic", "generic element 31" }, + { "custom", "custom element 0" }, + { "custom", "custom element 1" }, + { "custom", "custom element 2" }, + { "custom", "custom element 3" }, + { "custom", "custom element 4" }, + { "custom", "custom element 5" }, + { "custom", "custom element 6" }, + { "custom", "custom element 7" }, + { "custom", "custom element 8" }, + { "custom", "custom element 9" }, + { "custom", "custom element 10" }, + { "custom", "custom element 11" }, + { "custom", "custom element 12" }, + { "custom", "custom element 13" }, + { "custom", "custom element 14" }, + { "custom", "custom element 15" }, + { "custom", "custom element 16" }, + { "custom", "custom element 17" }, + { "custom", "custom element 18" }, + { "custom", "custom element 19" }, + { "custom", "custom element 20" }, + { "custom", "custom element 21" }, + { "custom", "custom element 22" }, + { "custom", "custom element 23" }, + { "custom", "custom element 24" }, + { "custom", "custom element 25" }, + { "custom", "custom element 26" }, + { "custom", "custom element 27" }, + { "custom", "custom element 28" }, + { "custom", "custom element 29" }, + { "custom", "custom element 30" }, + { "custom", "custom element 31" }, + { "custom", "custom element 32" }, + { "custom", "custom element 33" }, + { "custom", "custom element 34" }, + { "custom", "custom element 35" }, + { "custom", "custom element 36" }, + { "custom", "custom element 37" }, + { "custom", "custom element 38" }, + { "custom", "custom element 39" }, + { "custom", "custom element 40" }, + { "custom", "custom element 41" }, + { "custom", "custom element 42" }, + { "custom", "custom element 43" }, + { "custom", "custom element 44" }, + { "custom", "custom element 45" }, + { "custom", "custom element 46" }, + { "custom", "custom element 47" }, + { "custom", "custom element 48" }, + { "custom", "custom element 49" }, + { "custom", "custom element 50" }, + { "custom", "custom element 51" }, + { "custom", "custom element 52" }, + { "custom", "custom element 53" }, + { "custom", "custom element 54" }, + { "custom", "custom element 55" }, + { "custom", "custom element 56" }, + { "custom", "custom element 57" }, + { "custom", "custom element 58" }, + { "custom", "custom element 59" }, + { "custom", "custom element 60" }, + { "custom", "custom element 61" }, + { "custom", "custom element 62" }, + { "custom", "custom element 63" }, + { "custom", "custom element 64" }, + { "custom", "custom element 65" }, + { "custom", "custom element 66" }, + { "custom", "custom element 67" }, + { "custom", "custom element 68" }, + { "custom", "custom element 69" }, + { "custom", "custom element 70" }, + { "custom", "custom element 71" }, + { "custom", "custom element 72" }, + { "custom", "custom element 73" }, + { "custom", "custom element 74" }, + { "custom", "custom element 75" }, + { "custom", "custom element 76" }, + { "custom", "custom element 77" }, + { "custom", "custom element 78" }, + { "custom", "custom element 79" }, + { "custom", "custom element 80" }, + { "custom", "custom element 81" }, + { "custom", "custom element 82" }, + { "custom", "custom element 83" }, + { "custom", "custom element 84" }, + { "custom", "custom element 85" }, + { "custom", "custom element 86" }, + { "custom", "custom element 87" }, + { "custom", "custom element 88" }, + { "custom", "custom element 89" }, + { "custom", "custom element 90" }, + { "custom", "custom element 91" }, + { "custom", "custom element 92" }, + { "custom", "custom element 93" }, + { "custom", "custom element 94" }, + { "custom", "custom element 95" }, + { "custom", "custom element 96" }, + { "custom", "custom element 97" }, + { "custom", "custom element 98" }, + { "custom", "custom element 99" }, + { "custom", "custom element 100" }, + { "custom", "custom element 101" }, + { "custom", "custom element 102" }, + { "custom", "custom element 103" }, + { "custom", "custom element 104" }, + { "custom", "custom element 105" }, + { "custom", "custom element 106" }, + { "custom", "custom element 107" }, + { "custom", "custom element 108" }, + { "custom", "custom element 109" }, + { "custom", "custom element 110" }, + { "custom", "custom element 111" }, + { "custom", "custom element 112" }, + { "custom", "custom element 113" }, + { "custom", "custom element 114" }, + { "custom", "custom element 115" }, + { "custom", "custom element 116" }, + { "custom", "custom element 117" }, + { "custom", "custom element 118" }, + { "custom", "custom element 119" }, + { "custom", "custom element 120" }, + { "custom", "custom element 121" }, + { "custom", "custom element 122" }, + { "custom", "custom element 123" }, + { "custom", "custom element 124" }, + { "custom", "custom element 125" }, + { "custom", "custom element 126" }, + { "custom", "custom element 127" }, { NULL, "-" } diff --git a/src/main.h b/src/main.h index f6eb73f8..7e55e992 100644 --- a/src/main.h +++ b/src/main.h @@ -33,7 +33,7 @@ #define IMG_EMPTY IMG_EMPTY_SPACE #define IMG_SP_EMPTY IMG_SP_EMPTY_SPACE #define IMG_CHAR_START IMG_CHAR_SPACE -#define IMG_GENERIC_START IMG_GENERIC_0 +#define IMG_CUSTOM_START IMG_CUSTOM_0 #define WIN_XSIZE 672 #define WIN_YSIZE 560 @@ -677,12 +677,12 @@ #define EL_UNUSED_358 358 #define EL_UNUSED_359 359 -#define EL_GENERIC_START 360 -#define EL_GENERIC_0 (EL_GENERIC_START + 0) -#define EL_GENERIC_31 (EL_GENERIC_START + 31) -#define EL_GENERIC_END (EL_GENERIC_START + 31) +#define EL_CUSTOM_START 360 +#define EL_CUSTOM_0 (EL_CUSTOM_START + 0) +#define EL_CUSTOM_31 (EL_CUSTOM_START + 127) +#define EL_CUSTOM_END (EL_CUSTOM_START + 127) -#define NUM_FILE_ELEMENTS 392 +#define NUM_FILE_ELEMENTS 488 /* "real" (and therefore drawable) runtime elements */ @@ -1427,7 +1427,7 @@ #define PROGRAM_VERSION_MAJOR 2 #define PROGRAM_VERSION_MINOR 2 #define PROGRAM_VERSION_PATCH 0 -#define PROGRAM_VERSION_STRING "2.2.0rc1" +#define PROGRAM_VERSION_STRING "2.2.0rc2" #define PROGRAM_TITLE_STRING "Rocks'n'Diamonds" #define PROGRAM_AUTHOR_STRING "Holger Schemel" diff --git a/src/screens.c b/src/screens.c index ad93781b..bc8f64ec 100644 --- a/src/screens.c +++ b/src/screens.c @@ -27,16 +27,17 @@ /* screens in the setup menu */ #define SETUP_MODE_MAIN 0 #define SETUP_MODE_GAME 1 -#define SETUP_MODE_INPUT 2 -#define SETUP_MODE_SHORTCUT 3 -#define SETUP_MODE_GRAPHICS 4 -#define SETUP_MODE_SOUND 5 -#define SETUP_MODE_ARTWORK 6 -#define SETUP_MODE_CHOOSE_GRAPHICS 7 -#define SETUP_MODE_CHOOSE_SOUNDS 8 -#define SETUP_MODE_CHOOSE_MUSIC 9 - -#define MAX_SETUP_MODES 10 +#define SETUP_MODE_EDITOR 2 +#define SETUP_MODE_INPUT 3 +#define SETUP_MODE_SHORTCUT 4 +#define SETUP_MODE_GRAPHICS 5 +#define SETUP_MODE_SOUND 6 +#define SETUP_MODE_ARTWORK 7 +#define SETUP_MODE_CHOOSE_GRAPHICS 8 +#define SETUP_MODE_CHOOSE_SOUNDS 9 +#define SETUP_MODE_CHOOSE_MUSIC 10 + +#define MAX_SETUP_MODES 11 /* for input setup functions */ #define SETUPINPUT_SCREEN_POS_START 0 @@ -1670,6 +1671,12 @@ static void execSetupGame() DrawSetupScreen(); } +static void execSetupEditor() +{ + setup_mode = SETUP_MODE_EDITOR; + DrawSetupScreen(); +} + static void execSetupGraphics() { setup_mode = SETUP_MODE_GRAPHICS; @@ -1745,6 +1752,7 @@ static void execSaveAndExitSetup() static struct TokenInfo setup_info_main[] = { { TYPE_ENTER_MENU, execSetupGame, "Game Settings" }, + { TYPE_ENTER_MENU, execSetupEditor, "Editor Settings" }, { TYPE_ENTER_MENU, execSetupGraphics, "Graphics" }, { TYPE_ENTER_MENU, execSetupSound, "Sound & Music" }, { TYPE_ENTER_MENU, execSetupArtwork, "Custom Artwork" }, @@ -1752,7 +1760,7 @@ static struct TokenInfo setup_info_main[] = { TYPE_ENTER_MENU, execSetupShortcut, "Key Shortcuts" }, { TYPE_EMPTY, NULL, "" }, { TYPE_LEAVE_MENU, execExitSetup, "Exit" }, - { TYPE_LEAVE_MENU, execSaveAndExitSetup, "Save and exit" }, + { TYPE_LEAVE_MENU, execSaveAndExitSetup, "Save and Exit" }, { 0, NULL, NULL } }; @@ -1763,7 +1771,24 @@ static struct TokenInfo setup_info_game[] = { TYPE_SWITCH, &setup.time_limit, "Timelimit:" }, { TYPE_SWITCH, &setup.autorecord, "Auto-Record:" }, { TYPE_EMPTY, NULL, "" }, - { TYPE_LEAVE_MENU, execSetupMain, "Exit" }, + { TYPE_LEAVE_MENU, execSetupMain, "Back" }, + { 0, NULL, NULL } +}; + +static struct TokenInfo setup_info_editor[] = +{ + { TYPE_STRING, NULL, "Offer Special Elements:"}, + { TYPE_SWITCH, &setup.editor.el_boulderdash, "BoulderDash:" }, + { TYPE_SWITCH, &setup.editor.el_emerald_mine, "Emerald Mine:" }, + { TYPE_SWITCH, &setup.editor.el_more, "More:" }, + { TYPE_SWITCH, &setup.editor.el_sokoban, "Sokoban:" }, + { TYPE_SWITCH, &setup.editor.el_supaplex, "Supaplex:" }, + { TYPE_SWITCH, &setup.editor.el_diamond_caves, "Diamd. Caves:" }, + { TYPE_SWITCH, &setup.editor.el_dx_boulderdash,"DX Boulderd.:" }, + { TYPE_SWITCH, &setup.editor.el_chars, "Characters:" }, + { TYPE_SWITCH, &setup.editor.el_custom, "Custom:" }, + { TYPE_EMPTY, NULL, "" }, + { TYPE_LEAVE_MENU, execSetupMain, "Back" }, { 0, NULL, NULL } }; @@ -1779,7 +1804,7 @@ static struct TokenInfo setup_info_graphics[] = { TYPE_SWITCH, &setup.quick_doors, "Quick Doors:" }, { TYPE_SWITCH, &setup.toons, "Toons:" }, { TYPE_EMPTY, NULL, "" }, - { TYPE_LEAVE_MENU, execSetupMain, "Exit" }, + { TYPE_LEAVE_MENU, execSetupMain, "Back" }, { 0, NULL, NULL } }; @@ -1791,7 +1816,7 @@ static struct TokenInfo setup_info_sound[] = { TYPE_SWITCH, &setup.sound_loops, "Sound Loops:" }, { TYPE_SWITCH, &setup.sound_music, "Game Music:" }, { TYPE_EMPTY, NULL, "" }, - { TYPE_LEAVE_MENU, execSetupMain, "Exit" }, + { TYPE_LEAVE_MENU, execSetupMain, "Back" }, { 0, NULL, NULL } }; @@ -1809,7 +1834,7 @@ static struct TokenInfo setup_info_artwork[] = { TYPE_YES_NO, &setup.override_level_sounds, "Sounds:" }, { TYPE_YES_NO, &setup.override_level_music, "Music:" }, { TYPE_EMPTY, NULL, "" }, - { TYPE_LEAVE_MENU, execSetupMain, "Exit" }, + { TYPE_LEAVE_MENU, execSetupMain, "Back" }, { 0, NULL, NULL } }; @@ -1824,7 +1849,7 @@ static struct TokenInfo setup_info_shortcut[] = { TYPE_EMPTY, NULL, "" }, { TYPE_YES_NO, &setup.ask_on_escape, "Ask on Esc:" }, { TYPE_EMPTY, NULL, "" }, - { TYPE_LEAVE_MENU, execSetupMain, "Exit" }, + { TYPE_LEAVE_MENU, execSetupMain, "Back" }, { 0, NULL, NULL } }; @@ -1957,6 +1982,11 @@ static void DrawSetupScreen_Generic() setup_info = setup_info_game; title_string = "Setup Game"; } + else if (setup_mode == SETUP_MODE_EDITOR) + { + setup_info = setup_info_editor; + title_string = "Setup Editor"; + } else if (setup_mode == SETUP_MODE_GRAPHICS) { setup_info = setup_info_graphics; @@ -2020,12 +2050,18 @@ static void DrawSetupScreen_Generic() void HandleSetupScreen_Generic(int mx, int my, int dx, int dy, int button) { static int choice_store[MAX_SETUP_MODES]; - int choice = choice_store[setup_mode]; + int choice = choice_store[setup_mode]; /* always starts with 0 */ int x = 0; int y = choice; if (button == MB_MENU_INITIALIZE) { + /* advance to first valid menu entry */ + while (choice < num_setup_info && + (setup_info[choice].type & TYPE_SKIP_ENTRY)) + choice++; + choice_store[setup_mode] = choice; + drawCursor(choice, FC_RED); return; } @@ -2122,7 +2158,7 @@ void DrawSetupScreen_Input() 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, "Exit", FS_BIG, FC_GREEN); + DrawText(SX+32, SY+15*32, "Back", FS_BIG, FC_GREEN); #if 0 DeactivateJoystickForCalibration();