From: Holger Schemel Date: Fri, 13 Apr 2007 20:10:37 +0000 (+0200) Subject: rnd-20070413-1-src X-Git-Tag: 3.2.4^2~35 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=197edf38367a6f825e4a60441a11a3c55191e51b;p=rocksndiamonds.git rnd-20070413-1-src --- diff --git a/src/conf_gfx.c b/src/conf_gfx.c index 71791701..640cb4e0 100644 --- a/src/conf_gfx.c +++ b/src/conf_gfx.c @@ -5928,51 +5928,123 @@ struct ConfigInfo image_config[] = { "game.panel.element_1.x", "-1" }, { "game.panel.element_1.y", "-1" }, { "game.panel.element_1.tile_size", "16" }, - { "game.panel.element_1.element", "custom_1" }, + { "game.panel.element_1.element", "empty_space" }, { "game.panel.element_1.draw_masked", "false" }, { "game.panel.element_1.draw_order", "0" }, + { "game.panel.element_1_count.x", "-1" }, + { "game.panel.element_1_count.y", "-1" }, + { "game.panel.element_1_count.align", "left" }, + { "game.panel.element_1_count.valign", "top" }, + { "game.panel.element_1_count.digits", "-1" }, + { "game.panel.element_1_count.font", "font.text_2" }, + { "game.panel.element_1_count.element", "empty_space" }, + { "game.panel.element_1_count.draw_masked", "true" }, + { "game.panel.element_1_count.draw_order", "0" }, { "game.panel.element_2.x", "-1" }, { "game.panel.element_2.y", "-1" }, { "game.panel.element_2.tile_size", "16" }, - { "game.panel.element_2.element", "custom_1" }, + { "game.panel.element_2.element", "empty_space" }, { "game.panel.element_2.draw_masked", "false" }, { "game.panel.element_2.draw_order", "0" }, + { "game.panel.element_2_count.x", "-1" }, + { "game.panel.element_2_count.y", "-1" }, + { "game.panel.element_2_count.align", "left" }, + { "game.panel.element_2_count.valign", "top" }, + { "game.panel.element_2_count.digits", "-1" }, + { "game.panel.element_2_count.font", "font.text_2" }, + { "game.panel.element_2_count.element", "empty_space" }, + { "game.panel.element_2_count.draw_masked", "true" }, + { "game.panel.element_2_count.draw_order", "0" }, { "game.panel.element_3.x", "-1" }, { "game.panel.element_3.y", "-1" }, { "game.panel.element_3.tile_size", "16" }, - { "game.panel.element_3.element", "custom_1" }, + { "game.panel.element_3.element", "empty_space" }, { "game.panel.element_3.draw_masked", "false" }, { "game.panel.element_3.draw_order", "0" }, + { "game.panel.element_3_count.x", "-1" }, + { "game.panel.element_3_count.y", "-1" }, + { "game.panel.element_3_count.align", "left" }, + { "game.panel.element_3_count.valign", "top" }, + { "game.panel.element_3_count.digits", "-1" }, + { "game.panel.element_3_count.font", "font.text_2" }, + { "game.panel.element_3_count.element", "empty_space" }, + { "game.panel.element_3_count.draw_masked", "true" }, + { "game.panel.element_3_count.draw_order", "0" }, { "game.panel.element_4.x", "-1" }, { "game.panel.element_4.y", "-1" }, { "game.panel.element_4.tile_size", "16" }, - { "game.panel.element_4.element", "custom_1" }, + { "game.panel.element_4.element", "empty_space" }, { "game.panel.element_4.draw_masked", "false" }, { "game.panel.element_4.draw_order", "0" }, + { "game.panel.element_4_count.x", "-1" }, + { "game.panel.element_4_count.y", "-1" }, + { "game.panel.element_4_count.align", "left" }, + { "game.panel.element_4_count.valign", "top" }, + { "game.panel.element_4_count.digits", "-1" }, + { "game.panel.element_4_count.font", "font.text_2" }, + { "game.panel.element_4_count.element", "empty_space" }, + { "game.panel.element_4_count.draw_masked", "true" }, + { "game.panel.element_4_count.draw_order", "0" }, { "game.panel.element_5.x", "-1" }, { "game.panel.element_5.y", "-1" }, { "game.panel.element_5.tile_size", "16" }, - { "game.panel.element_5.element", "custom_1" }, + { "game.panel.element_5.element", "empty_space" }, { "game.panel.element_5.draw_masked", "false" }, { "game.panel.element_5.draw_order", "0" }, + { "game.panel.element_5_count.x", "-1" }, + { "game.panel.element_5_count.y", "-1" }, + { "game.panel.element_5_count.align", "left" }, + { "game.panel.element_5_count.valign", "top" }, + { "game.panel.element_5_count.digits", "-1" }, + { "game.panel.element_5_count.font", "font.text_2" }, + { "game.panel.element_5_count.element", "empty_space" }, + { "game.panel.element_5_count.draw_masked", "true" }, + { "game.panel.element_5_count.draw_order", "0" }, { "game.panel.element_6.x", "-1" }, { "game.panel.element_6.y", "-1" }, { "game.panel.element_6.tile_size", "16" }, - { "game.panel.element_6.element", "custom_1" }, + { "game.panel.element_6.element", "empty_space" }, { "game.panel.element_6.draw_masked", "false" }, { "game.panel.element_6.draw_order", "0" }, + { "game.panel.element_6_count.x", "-1" }, + { "game.panel.element_6_count.y", "-1" }, + { "game.panel.element_6_count.align", "left" }, + { "game.panel.element_6_count.valign", "top" }, + { "game.panel.element_6_count.digits", "-1" }, + { "game.panel.element_6_count.font", "font.text_2" }, + { "game.panel.element_6_count.element", "empty_space" }, + { "game.panel.element_6_count.draw_masked", "true" }, + { "game.panel.element_6_count.draw_order", "0" }, { "game.panel.element_7.x", "-1" }, { "game.panel.element_7.y", "-1" }, { "game.panel.element_7.tile_size", "16" }, - { "game.panel.element_7.element", "custom_1" }, + { "game.panel.element_7.element", "empty_space" }, { "game.panel.element_7.draw_masked", "false" }, { "game.panel.element_7.draw_order", "0" }, + { "game.panel.element_7_count.x", "-1" }, + { "game.panel.element_7_count.y", "-1" }, + { "game.panel.element_7_count.align", "left" }, + { "game.panel.element_7_count.valign", "top" }, + { "game.panel.element_7_count.digits", "-1" }, + { "game.panel.element_7_count.font", "font.text_2" }, + { "game.panel.element_7_count.element", "empty_space" }, + { "game.panel.element_7_count.draw_masked", "true" }, + { "game.panel.element_7_count.draw_order", "0" }, { "game.panel.element_8.x", "-1" }, { "game.panel.element_8.y", "-1" }, { "game.panel.element_8.tile_size", "16" }, - { "game.panel.element_8.element", "custom_1" }, + { "game.panel.element_8.element", "empty_space" }, { "game.panel.element_8.draw_masked", "false" }, { "game.panel.element_8.draw_order", "0" }, + { "game.panel.element_8_count.x", "-1" }, + { "game.panel.element_8_count.y", "-1" }, + { "game.panel.element_8_count.align", "left" }, + { "game.panel.element_8_count.valign", "top" }, + { "game.panel.element_8_count.digits", "-1" }, + { "game.panel.element_8_count.font", "font.text_2" }, + { "game.panel.element_8_count.element", "empty_space" }, + { "game.panel.element_8_count.draw_masked", "true" }, + { "game.panel.element_8_count.draw_order", "0" }, { "game.panel.ce_score_1.x", "-1" }, { "game.panel.ce_score_1.y", "-1" }, @@ -5980,13 +6052,13 @@ struct ConfigInfo image_config[] = { "game.panel.ce_score_1.valign", "top" }, { "game.panel.ce_score_1.digits", "-1" }, { "game.panel.ce_score_1.font", "font.text_2" }, - { "game.panel.ce_score_1.element", "custom_1" }, + { "game.panel.ce_score_1.element", "empty_space" }, { "game.panel.ce_score_1.draw_masked", "true" }, { "game.panel.ce_score_1.draw_order", "0" }, { "game.panel.ce_score_1_element.x", "-1" }, { "game.panel.ce_score_1_element.y", "-1" }, { "game.panel.ce_score_1_element.tile_size", "16" }, - { "game.panel.ce_score_1_element.element", "custom_1" }, + { "game.panel.ce_score_1_element.element", "empty_space" }, { "game.panel.ce_score_1_element.draw_masked","false" }, { "game.panel.ce_score_1_element.draw_order", "0" }, { "game.panel.ce_score_2.x", "-1" }, @@ -5995,13 +6067,13 @@ struct ConfigInfo image_config[] = { "game.panel.ce_score_2.valign", "top" }, { "game.panel.ce_score_2.digits", "-1" }, { "game.panel.ce_score_2.font", "font.text_2" }, - { "game.panel.ce_score_2.element", "custom_1" }, + { "game.panel.ce_score_2.element", "empty_space" }, { "game.panel.ce_score_2.draw_masked", "true" }, { "game.panel.ce_score_2.draw_order", "0" }, { "game.panel.ce_score_2_element.x", "-1" }, { "game.panel.ce_score_2_element.y", "-1" }, { "game.panel.ce_score_2_element.tile_size", "16" }, - { "game.panel.ce_score_2_element.element", "custom_1" }, + { "game.panel.ce_score_2_element.element", "empty_space" }, { "game.panel.ce_score_2_element.draw_masked","false" }, { "game.panel.ce_score_2_element.draw_order", "0" }, { "game.panel.ce_score_3.x", "-1" }, @@ -6010,13 +6082,13 @@ struct ConfigInfo image_config[] = { "game.panel.ce_score_3.valign", "top" }, { "game.panel.ce_score_3.digits", "-1" }, { "game.panel.ce_score_3.font", "font.text_2" }, - { "game.panel.ce_score_3.element", "custom_1" }, + { "game.panel.ce_score_3.element", "empty_space" }, { "game.panel.ce_score_3.draw_masked", "true" }, { "game.panel.ce_score_3.draw_order", "0" }, { "game.panel.ce_score_3_element.x", "-1" }, { "game.panel.ce_score_3_element.y", "-1" }, { "game.panel.ce_score_3_element.tile_size", "16" }, - { "game.panel.ce_score_3_element.element", "custom_1" }, + { "game.panel.ce_score_3_element.element", "empty_space" }, { "game.panel.ce_score_3_element.draw_masked","false" }, { "game.panel.ce_score_3_element.draw_order", "0" }, { "game.panel.ce_score_4.x", "-1" }, @@ -6025,13 +6097,13 @@ struct ConfigInfo image_config[] = { "game.panel.ce_score_4.valign", "top" }, { "game.panel.ce_score_4.digits", "-1" }, { "game.panel.ce_score_4.font", "font.text_2" }, - { "game.panel.ce_score_4.element", "custom_1" }, + { "game.panel.ce_score_4.element", "empty_space" }, { "game.panel.ce_score_4.draw_masked", "true" }, { "game.panel.ce_score_4.draw_order", "0" }, { "game.panel.ce_score_4_element.x", "-1" }, { "game.panel.ce_score_4_element.y", "-1" }, { "game.panel.ce_score_4_element.tile_size", "16" }, - { "game.panel.ce_score_4_element.element", "custom_1" }, + { "game.panel.ce_score_4_element.element", "empty_space" }, { "game.panel.ce_score_4_element.draw_masked","false" }, { "game.panel.ce_score_4_element.draw_order", "0" }, { "game.panel.ce_score_5.x", "-1" }, @@ -6040,13 +6112,13 @@ struct ConfigInfo image_config[] = { "game.panel.ce_score_5.valign", "top" }, { "game.panel.ce_score_5.digits", "-1" }, { "game.panel.ce_score_5.font", "font.text_2" }, - { "game.panel.ce_score_5.element", "custom_1" }, + { "game.panel.ce_score_5.element", "empty_space" }, { "game.panel.ce_score_5.draw_masked", "true" }, { "game.panel.ce_score_5.draw_order", "0" }, { "game.panel.ce_score_5_element.x", "-1" }, { "game.panel.ce_score_5_element.y", "-1" }, { "game.panel.ce_score_5_element.tile_size", "16" }, - { "game.panel.ce_score_5_element.element", "custom_1" }, + { "game.panel.ce_score_5_element.element", "empty_space" }, { "game.panel.ce_score_5_element.draw_masked","false" }, { "game.panel.ce_score_5_element.draw_order", "0" }, { "game.panel.ce_score_6.x", "-1" }, @@ -6055,13 +6127,13 @@ struct ConfigInfo image_config[] = { "game.panel.ce_score_6.valign", "top" }, { "game.panel.ce_score_6.digits", "-1" }, { "game.panel.ce_score_6.font", "font.text_2" }, - { "game.panel.ce_score_6.element", "custom_1" }, + { "game.panel.ce_score_6.element", "empty_space" }, { "game.panel.ce_score_6.draw_masked", "true" }, { "game.panel.ce_score_6.draw_order", "0" }, { "game.panel.ce_score_6_element.x", "-1" }, { "game.panel.ce_score_6_element.y", "-1" }, { "game.panel.ce_score_6_element.tile_size", "16" }, - { "game.panel.ce_score_6_element.element", "custom_1" }, + { "game.panel.ce_score_6_element.element", "empty_space" }, { "game.panel.ce_score_6_element.draw_masked","false" }, { "game.panel.ce_score_6_element.draw_order", "0" }, { "game.panel.ce_score_7.x", "-1" }, @@ -6070,13 +6142,13 @@ struct ConfigInfo image_config[] = { "game.panel.ce_score_7.valign", "top" }, { "game.panel.ce_score_7.digits", "-1" }, { "game.panel.ce_score_7.font", "font.text_2" }, - { "game.panel.ce_score_7.element", "custom_1" }, + { "game.panel.ce_score_7.element", "empty_space" }, { "game.panel.ce_score_7.draw_masked", "true" }, { "game.panel.ce_score_7.draw_order", "0" }, { "game.panel.ce_score_7_element.x", "-1" }, { "game.panel.ce_score_7_element.y", "-1" }, { "game.panel.ce_score_7_element.tile_size", "16" }, - { "game.panel.ce_score_7_element.element", "custom_1" }, + { "game.panel.ce_score_7_element.element", "empty_space" }, { "game.panel.ce_score_7_element.draw_masked","false" }, { "game.panel.ce_score_7_element.draw_order", "0" }, { "game.panel.ce_score_8.x", "-1" }, @@ -6085,13 +6157,13 @@ struct ConfigInfo image_config[] = { "game.panel.ce_score_8.valign", "top" }, { "game.panel.ce_score_8.digits", "-1" }, { "game.panel.ce_score_8.font", "font.text_2" }, - { "game.panel.ce_score_8.element", "custom_1" }, + { "game.panel.ce_score_8.element", "empty_space" }, { "game.panel.ce_score_8.draw_masked", "true" }, { "game.panel.ce_score_8.draw_order", "0" }, { "game.panel.ce_score_8_element.x", "-1" }, { "game.panel.ce_score_8_element.y", "-1" }, { "game.panel.ce_score_8_element.tile_size", "16" }, - { "game.panel.ce_score_8_element.element", "custom_1" }, + { "game.panel.ce_score_8_element.element", "empty_space" }, { "game.panel.ce_score_8_element.draw_masked","false" }, { "game.panel.ce_score_8_element.draw_order", "0" }, diff --git a/src/conf_var.c b/src/conf_var.c index 799331dc..3cf2fae6 100644 --- a/src/conf_var.c +++ b/src/conf_var.c @@ -3648,6 +3648,42 @@ struct TokenIntPtrInfo image_config_vars[] = "game.panel.element_1.draw_order", &game.panel.element[0].sort_priority }, + { + "game.panel.element_1_count.x", + &game.panel.element_count[0].x + }, + { + "game.panel.element_1_count.y", + &game.panel.element_count[0].y + }, + { + "game.panel.element_1_count.align", + &game.panel.element_count[0].align + }, + { + "game.panel.element_1_count.valign", + &game.panel.element_count[0].valign + }, + { + "game.panel.element_1_count.digits", + &game.panel.element_count[0].size + }, + { + "game.panel.element_1_count.font", + &game.panel.element_count[0].font + }, + { + "game.panel.element_1_count.element", + &game.panel.element_count[0].id + }, + { + "game.panel.element_1_count.draw_masked", + &game.panel.element_count[0].draw_masked + }, + { + "game.panel.element_1_count.draw_order", + &game.panel.element_count[0].sort_priority + }, { "game.panel.element_2.x", &game.panel.element[1].x @@ -3672,6 +3708,42 @@ struct TokenIntPtrInfo image_config_vars[] = "game.panel.element_2.draw_order", &game.panel.element[1].sort_priority }, + { + "game.panel.element_2_count.x", + &game.panel.element_count[1].x + }, + { + "game.panel.element_2_count.y", + &game.panel.element_count[1].y + }, + { + "game.panel.element_2_count.align", + &game.panel.element_count[1].align + }, + { + "game.panel.element_2_count.valign", + &game.panel.element_count[1].valign + }, + { + "game.panel.element_2_count.digits", + &game.panel.element_count[1].size + }, + { + "game.panel.element_2_count.font", + &game.panel.element_count[1].font + }, + { + "game.panel.element_2_count.element", + &game.panel.element_count[1].id + }, + { + "game.panel.element_2_count.draw_masked", + &game.panel.element_count[1].draw_masked + }, + { + "game.panel.element_2_count.draw_order", + &game.panel.element_count[1].sort_priority + }, { "game.panel.element_3.x", &game.panel.element[2].x @@ -3696,6 +3768,42 @@ struct TokenIntPtrInfo image_config_vars[] = "game.panel.element_3.draw_order", &game.panel.element[2].sort_priority }, + { + "game.panel.element_3_count.x", + &game.panel.element_count[2].x + }, + { + "game.panel.element_3_count.y", + &game.panel.element_count[2].y + }, + { + "game.panel.element_3_count.align", + &game.panel.element_count[2].align + }, + { + "game.panel.element_3_count.valign", + &game.panel.element_count[2].valign + }, + { + "game.panel.element_3_count.digits", + &game.panel.element_count[2].size + }, + { + "game.panel.element_3_count.font", + &game.panel.element_count[2].font + }, + { + "game.panel.element_3_count.element", + &game.panel.element_count[2].id + }, + { + "game.panel.element_3_count.draw_masked", + &game.panel.element_count[2].draw_masked + }, + { + "game.panel.element_3_count.draw_order", + &game.panel.element_count[2].sort_priority + }, { "game.panel.element_4.x", &game.panel.element[3].x @@ -3720,6 +3828,42 @@ struct TokenIntPtrInfo image_config_vars[] = "game.panel.element_4.draw_order", &game.panel.element[3].sort_priority }, + { + "game.panel.element_4_count.x", + &game.panel.element_count[3].x + }, + { + "game.panel.element_4_count.y", + &game.panel.element_count[3].y + }, + { + "game.panel.element_4_count.align", + &game.panel.element_count[3].align + }, + { + "game.panel.element_4_count.valign", + &game.panel.element_count[3].valign + }, + { + "game.panel.element_4_count.digits", + &game.panel.element_count[3].size + }, + { + "game.panel.element_4_count.font", + &game.panel.element_count[3].font + }, + { + "game.panel.element_4_count.element", + &game.panel.element_count[3].id + }, + { + "game.panel.element_4_count.draw_masked", + &game.panel.element_count[3].draw_masked + }, + { + "game.panel.element_4_count.draw_order", + &game.panel.element_count[3].sort_priority + }, { "game.panel.element_5.x", &game.panel.element[4].x @@ -3744,6 +3888,42 @@ struct TokenIntPtrInfo image_config_vars[] = "game.panel.element_5.draw_order", &game.panel.element[4].sort_priority }, + { + "game.panel.element_5_count.x", + &game.panel.element_count[4].x + }, + { + "game.panel.element_5_count.y", + &game.panel.element_count[4].y + }, + { + "game.panel.element_5_count.align", + &game.panel.element_count[4].align + }, + { + "game.panel.element_5_count.valign", + &game.panel.element_count[4].valign + }, + { + "game.panel.element_5_count.digits", + &game.panel.element_count[4].size + }, + { + "game.panel.element_5_count.font", + &game.panel.element_count[4].font + }, + { + "game.panel.element_5_count.element", + &game.panel.element_count[4].id + }, + { + "game.panel.element_5_count.draw_masked", + &game.panel.element_count[4].draw_masked + }, + { + "game.panel.element_5_count.draw_order", + &game.panel.element_count[4].sort_priority + }, { "game.panel.element_6.x", &game.panel.element[5].x @@ -3768,6 +3948,42 @@ struct TokenIntPtrInfo image_config_vars[] = "game.panel.element_6.draw_order", &game.panel.element[5].sort_priority }, + { + "game.panel.element_6_count.x", + &game.panel.element_count[5].x + }, + { + "game.panel.element_6_count.y", + &game.panel.element_count[5].y + }, + { + "game.panel.element_6_count.align", + &game.panel.element_count[5].align + }, + { + "game.panel.element_6_count.valign", + &game.panel.element_count[5].valign + }, + { + "game.panel.element_6_count.digits", + &game.panel.element_count[5].size + }, + { + "game.panel.element_6_count.font", + &game.panel.element_count[5].font + }, + { + "game.panel.element_6_count.element", + &game.panel.element_count[5].id + }, + { + "game.panel.element_6_count.draw_masked", + &game.panel.element_count[5].draw_masked + }, + { + "game.panel.element_6_count.draw_order", + &game.panel.element_count[5].sort_priority + }, { "game.panel.element_7.x", &game.panel.element[6].x @@ -3792,6 +4008,42 @@ struct TokenIntPtrInfo image_config_vars[] = "game.panel.element_7.draw_order", &game.panel.element[6].sort_priority }, + { + "game.panel.element_7_count.x", + &game.panel.element_count[6].x + }, + { + "game.panel.element_7_count.y", + &game.panel.element_count[6].y + }, + { + "game.panel.element_7_count.align", + &game.panel.element_count[6].align + }, + { + "game.panel.element_7_count.valign", + &game.panel.element_count[6].valign + }, + { + "game.panel.element_7_count.digits", + &game.panel.element_count[6].size + }, + { + "game.panel.element_7_count.font", + &game.panel.element_count[6].font + }, + { + "game.panel.element_7_count.element", + &game.panel.element_count[6].id + }, + { + "game.panel.element_7_count.draw_masked", + &game.panel.element_count[6].draw_masked + }, + { + "game.panel.element_7_count.draw_order", + &game.panel.element_count[6].sort_priority + }, { "game.panel.element_8.x", &game.panel.element[7].x @@ -3816,6 +4068,42 @@ struct TokenIntPtrInfo image_config_vars[] = "game.panel.element_8.draw_order", &game.panel.element[7].sort_priority }, + { + "game.panel.element_8_count.x", + &game.panel.element_count[7].x + }, + { + "game.panel.element_8_count.y", + &game.panel.element_count[7].y + }, + { + "game.panel.element_8_count.align", + &game.panel.element_count[7].align + }, + { + "game.panel.element_8_count.valign", + &game.panel.element_count[7].valign + }, + { + "game.panel.element_8_count.digits", + &game.panel.element_count[7].size + }, + { + "game.panel.element_8_count.font", + &game.panel.element_count[7].font + }, + { + "game.panel.element_8_count.element", + &game.panel.element_count[7].id + }, + { + "game.panel.element_8_count.draw_masked", + &game.panel.element_count[7].draw_masked + }, + { + "game.panel.element_8_count.draw_order", + &game.panel.element_count[7].sort_priority + }, { "game.panel.ce_score_1.x", &game.panel.ce_score[0].x diff --git a/src/conftime.h b/src/conftime.h index 40671e4f..a633a1bd 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "2007-04-10 00:36" +#define COMPILE_DATE_STRING "2007-04-13 22:02" diff --git a/src/game.c b/src/game.c index d24c62f6..f600e046 100644 --- a/src/game.c +++ b/src/game.c @@ -208,27 +208,35 @@ #define GAME_PANEL_ELEMENT_6 74 #define GAME_PANEL_ELEMENT_7 75 #define GAME_PANEL_ELEMENT_8 76 -#define GAME_PANEL_CE_SCORE_1 77 -#define GAME_PANEL_CE_SCORE_2 78 -#define GAME_PANEL_CE_SCORE_3 79 -#define GAME_PANEL_CE_SCORE_4 80 -#define GAME_PANEL_CE_SCORE_5 81 -#define GAME_PANEL_CE_SCORE_6 82 -#define GAME_PANEL_CE_SCORE_7 83 -#define GAME_PANEL_CE_SCORE_8 84 -#define GAME_PANEL_CE_SCORE_1_ELEMENT 85 -#define GAME_PANEL_CE_SCORE_2_ELEMENT 86 -#define GAME_PANEL_CE_SCORE_3_ELEMENT 87 -#define GAME_PANEL_CE_SCORE_4_ELEMENT 88 -#define GAME_PANEL_CE_SCORE_5_ELEMENT 89 -#define GAME_PANEL_CE_SCORE_6_ELEMENT 90 -#define GAME_PANEL_CE_SCORE_7_ELEMENT 91 -#define GAME_PANEL_CE_SCORE_8_ELEMENT 92 -#define GAME_PANEL_PLAYER_NAME 93 -#define GAME_PANEL_LEVEL_NAME 94 -#define GAME_PANEL_LEVEL_AUTHOR 95 - -#define NUM_GAME_PANEL_CONTROLS 96 +#define GAME_PANEL_ELEMENT_COUNT_1 77 +#define GAME_PANEL_ELEMENT_COUNT_2 78 +#define GAME_PANEL_ELEMENT_COUNT_3 79 +#define GAME_PANEL_ELEMENT_COUNT_4 80 +#define GAME_PANEL_ELEMENT_COUNT_5 81 +#define GAME_PANEL_ELEMENT_COUNT_6 82 +#define GAME_PANEL_ELEMENT_COUNT_7 83 +#define GAME_PANEL_ELEMENT_COUNT_8 84 +#define GAME_PANEL_CE_SCORE_1 85 +#define GAME_PANEL_CE_SCORE_2 86 +#define GAME_PANEL_CE_SCORE_3 87 +#define GAME_PANEL_CE_SCORE_4 88 +#define GAME_PANEL_CE_SCORE_5 89 +#define GAME_PANEL_CE_SCORE_6 90 +#define GAME_PANEL_CE_SCORE_7 91 +#define GAME_PANEL_CE_SCORE_8 92 +#define GAME_PANEL_CE_SCORE_1_ELEMENT 93 +#define GAME_PANEL_CE_SCORE_2_ELEMENT 94 +#define GAME_PANEL_CE_SCORE_3_ELEMENT 95 +#define GAME_PANEL_CE_SCORE_4_ELEMENT 96 +#define GAME_PANEL_CE_SCORE_5_ELEMENT 97 +#define GAME_PANEL_CE_SCORE_6_ELEMENT 98 +#define GAME_PANEL_CE_SCORE_7_ELEMENT 99 +#define GAME_PANEL_CE_SCORE_8_ELEMENT 100 +#define GAME_PANEL_PLAYER_NAME 101 +#define GAME_PANEL_LEVEL_NAME 102 +#define GAME_PANEL_LEVEL_AUTHOR 103 + +#define NUM_GAME_PANEL_CONTROLS 104 struct GamePanelOrderInfo { @@ -638,6 +646,46 @@ static struct GamePanelControlInfo game_panel_controls[] = &game.panel.element[7], TYPE_ELEMENT, }, + { + GAME_PANEL_ELEMENT_COUNT_1, + &game.panel.element_count[0], + TYPE_INTEGER, + }, + { + GAME_PANEL_ELEMENT_COUNT_2, + &game.panel.element_count[1], + TYPE_INTEGER, + }, + { + GAME_PANEL_ELEMENT_COUNT_3, + &game.panel.element_count[2], + TYPE_INTEGER, + }, + { + GAME_PANEL_ELEMENT_COUNT_4, + &game.panel.element_count[3], + TYPE_INTEGER, + }, + { + GAME_PANEL_ELEMENT_COUNT_5, + &game.panel.element_count[4], + TYPE_INTEGER, + }, + { + GAME_PANEL_ELEMENT_COUNT_6, + &game.panel.element_count[5], + TYPE_INTEGER, + }, + { + GAME_PANEL_ELEMENT_COUNT_7, + &game.panel.element_count[6], + TYPE_INTEGER, + }, + { + GAME_PANEL_ELEMENT_COUNT_8, + &game.panel.element_count[7], + TYPE_INTEGER, + }, { GAME_PANEL_CE_SCORE_1, &game.panel.ce_score[0], @@ -2010,6 +2058,25 @@ void InitGameControlValues() sizeof(struct GamePanelOrderInfo), compareGamePanelOrderInfo); } +void UpdatePlayfieldElementCount() +{ + int i, j, x, y; + + for (i = 0; i < MAX_NUM_ELEMENTS; i++) + element_info[i].element_count = 0; + + SCAN_PLAYFIELD(x, y) + { + element_info[Feld[x][y]].element_count++; + } + + for (i = 0; i < NUM_GROUP_ELEMENTS; i++) + for (j = 0; j < MAX_NUM_ELEMENTS; j++) + if (IS_IN_GROUP(j, i)) + element_info[EL_GROUP_START + i].element_count += + element_info[j].element_count; +} + void UpdateGameControlValues() { int i, k; @@ -2032,6 +2099,10 @@ void UpdateGameControlValues() local_player->sokobanfields_still_needed > 0 || local_player->lights_still_needed > 0); + UpdatePlayfieldElementCount(); + + /* update game panel control values */ + game_panel_controls[GAME_PANEL_LEVEL_NUMBER].value = level_nr; game_panel_controls[GAME_PANEL_GEMS].value = gems; @@ -2214,6 +2285,12 @@ void UpdateGameControlValues() (IS_DRAWABLE_ELEMENT(game.panel.element[i].id) ? game.panel.element[i].id : EL_UNDEFINED); + for (i = 0; i < NUM_PANEL_ELEMENTS; i++) + game_panel_controls[GAME_PANEL_ELEMENT_COUNT_1 + i].value = + (IS_VALID_ELEMENT(game.panel.element_count[i].id) ? + element_info[game.panel.element_count[i].id].element_count : + EL_UNDEFINED); + for (i = 0; i < NUM_PANEL_CE_SCORE; i++) game_panel_controls[GAME_PANEL_CE_SCORE_1 + i].value = (IS_CUSTOM_ELEMENT(game.panel.ce_score[i].id) ? @@ -2229,6 +2306,8 @@ void UpdateGameControlValues() game_panel_controls[GAME_PANEL_LEVEL_NAME].value = 0; game_panel_controls[GAME_PANEL_LEVEL_AUTHOR].value = 0; + /* update game panel control frames */ + for (i = 0; game_panel_controls[i].nr != -1; i++) { struct GamePanelControlInfo *gpc = &game_panel_controls[i]; diff --git a/src/game.h b/src/game.h index 5b2b46a9..241889b0 100644 --- a/src/game.h +++ b/src/game.h @@ -75,6 +75,7 @@ struct GamePanelInfo struct TextPosInfo magic_wall_time; struct TextPosInfo gravity_state; struct TextPosInfo element[NUM_PANEL_ELEMENTS]; + struct TextPosInfo element_count[NUM_PANEL_ELEMENTS]; struct TextPosInfo ce_score[NUM_PANEL_CE_SCORE]; struct TextPosInfo ce_score_element[NUM_PANEL_CE_SCORE]; struct TextPosInfo player_name; diff --git a/src/main.h b/src/main.h index 938eb26a..2f323f27 100644 --- a/src/main.h +++ b/src/main.h @@ -2474,6 +2474,9 @@ struct ElementInfo int collect_score; /* runtime score value for collecting */ + /* count of this element on playfield, calculated after each frame */ + int element_count; + /* ---------- internal values used in level editor ---------- */ int access_type; /* walkable or passable */