Added testing script and changed engine...

This commit is contained in:
Ognjen Milan Robovic 2024-01-01 13:08:20 -05:00
parent a570c15d3b
commit 5084a93ab7
2 changed files with 15 additions and 4 deletions

View File

@ -77,7 +77,7 @@ static void render_layout (int x, int y, int width, int height, int small, int a
}
}
static void define_minimenu (int menu, char * text, int icon, void (* action) (void)) {
static void define_menu_item (int menu, char * text, int icon, void (* action) (void)) {
menu_text [menu] [menu_items [menu]] = text;
menu_icon [menu] [menu_items [menu]] = icon;
menu_action [menu] [menu_items [menu]] = action;
@ -182,15 +182,15 @@ void layout_configure (void) {
bind (signal_v, show_value_menu);
for (index = 0; index < trait_count; ++index) {
define_minimenu (menu_traits, trait_name [index], index, 0);
define_menu_item (menu_traits, trait_name [index], index, NULL);
}
for (index = 0; index < skill_count; ++index) {
define_minimenu (menu_skills, skill_name [index], 3 + index, 0);
define_menu_item (menu_skills, skill_name [index], 3 + index, NULL);
}
for (index = 0; index < value_count; ++index) {
define_minimenu (menu_values, value_name [index], 27 + index, 0);
define_menu_item (menu_values, value_name [index], 27 + index, NULL);
}
}

11
test.sh Normal file
View File

@ -0,0 +1,11 @@
#!/bin/bash
splint -predboolint +boolint -warnposix -retvalint source/game.c
splint -predboolint +boolint -warnposix -retvalint source/game.h
splint -predboolint +boolint -warnposix -retvalint source/engine.c
splint -predboolint +boolint -warnposix -retvalint source/engine.h
splint -predboolint +boolint -warnposix -retvalint source/main.c
splint -predboolint +boolint -warnposix -retvalint source/render.c
splint -predboolint +boolint -warnposix -retvalint source/render.h
exit