diff --git a/ms_ui_utils.h b/ms_ui_utils.h index 35f63e6..0bce0f5 100644 --- a/ms_ui_utils.h +++ b/ms_ui_utils.h @@ -1,4 +1,4 @@ - msu_idx_to_col_address(); +ColAddr msu_idx_to_col_address(CellIdx idx); /** * Maps the given cell index to the corresponding row address. @@ -42,7 +47,7 @@ CellIdx msu_get_random_index(Count upper_limit); * @return RowAddr The corresponding row address or a '0' value, * if the index cannot be mapped. */ - msu_idx_to_row_address(); +RowAddr msu_idx_to_row_address(CellIdx idx); /** * Maps the given column address to the corresponding cell index. @@ -51,7 +56,7 @@ CellIdx msu_get_random_index(Count upper_limit); * @return CellIdx The corresponding cell index or 0, * if the address cannot be mapped. */ - msu_col_address_to_index(); +CellIdx msu_col_address_to_index(ColAddr addr); /** * Maps the given row address to the corresponding cell index. @@ -60,7 +65,7 @@ CellIdx msu_get_random_index(Count upper_limit); * @return CellIdx The corresponding cell index or 0, * if the address cannot be mapped. */ - msu_row_address_to_index(); +CellIdx msu_row_address_to_index(RowAddr addr); /** * Maps the given column address to the corresponding cell index. @@ -69,7 +74,7 @@ CellIdx msu_get_random_index(Count upper_limit); * @return CellIdx The corresponding cell index or 0, * if the address cannot be mapped. */ - msu_col_address_to_index(); +CellIdx msu_col_address_to_index(ColAddr addr); /** * Provides the character a user may type to perform the given action. @@ -79,7 +84,7 @@ CellIdx msu_get_random_index(Count upper_limit); * @return char The corresponding 'key' character or '\0', * if the action cannot reasonably be mapped. */ - msu_get_action_char(); +char msu_get_action_char(Action action); /** * Provides the action for the given 'key' character (the counterpart of ´msu_get_action_char´). @@ -88,7 +93,7 @@ CellIdx msu_get_random_index(Count upper_limit); * @return Action The action corresponding to the given 'key' * or 'INVALID',if the key cannot be mapped. */ - msu_get_action(); +Action msu_get_action(char key); /** * Maps the given cell marker to its presentation symbol @@ -98,7 +103,7 @@ CellIdx msu_get_random_index(Count upper_limit); * @return char The corresponding character or '#', if * the marker cannot be mapped. */ - msu_get_marker_symbol(); +char msu_get_marker_symbol(CellMarker marker); /** * Provides the symbol that represents a mine @@ -106,7 +111,7 @@ CellIdx msu_get_random_index(Count upper_limit); * * @return char The symbol of a mine. */ - msu_get_mine_symbol(); +char msu_get_mine_symbol(); /** * Maps the given game status to a user presentable label. @@ -115,4 +120,6 @@ CellIdx msu_get_random_index(Count upper_limit); * @return char* The text for the status or 0, if * the status cannot be mapped. */ - msu_get_status_label(); +char* msu_get_status_label(GameState status); + +#endif \ No newline at end of file