Freeciv-3.3
|
Go to the source code of this file.
Data Structures | |
struct | worklist |
Macros | |
#define | MAX_LEN_WORKLIST 64 |
#define | MAX_NUM_WORKLISTS 16 |
#define | worklist_iterate(_list, _p) |
#define | worklist_iterate_end |
Functions | |
void | worklist_init (struct worklist *pwl) |
int | worklist_length (const struct worklist *pwl) |
bool | worklist_is_empty (const struct worklist *pwl) |
bool | worklist_peek (const struct worklist *pwl, struct universal *prod) |
bool | worklist_peek_ith (const struct worklist *pwl, struct universal *prod, int idx) |
void | worklist_advance (struct worklist *pwl) |
void | worklist_copy (struct worklist *dst, const struct worklist *src) |
void | worklist_remove (struct worklist *pwl, int idx) |
bool | worklist_append (struct worklist *pwl, const struct universal *prod) |
bool | worklist_insert (struct worklist *pwl, const struct universal *prod, int idx) |
bool | are_worklists_equal (const struct worklist *wlist1, const struct worklist *wlist2) |
#define MAX_LEN_WORKLIST 64 |
Definition at line 24 of file worklist.h.
#define MAX_NUM_WORKLISTS 16 |
Definition at line 25 of file worklist.h.
Definition at line 51 of file worklist.h.
#define worklist_iterate_end |
Definition at line 59 of file worklist.h.
Return TRUE iff the two worklists are equal.
Definition at line 192 of file worklist.c.
Referenced by send_packet_city_info_100(), and send_packet_city_worklist_100().
Remove first element from worklist.
Definition at line 104 of file worklist.c.
Referenced by city_set_queue(), and remove_item_from_worklist().
Adds the id to the next available slot in the worklist. 'id' is the ID of the unit/building to be produced; is_unit specifies whether it's a unit or a building. Returns TRUE if successful.
Definition at line 147 of file worklist.c.
Referenced by add_global_worklist(), add_target_to_worklist(), base_city_queue_insert(), commit_worklist(), dio_get_worklist_raw(), and global_worklists_build().
Copy contents from worklist src to worklist dst.
Definition at line 112 of file worklist.c.
Referenced by city_get_queue(), city_set_queue(), dsend_packet_city_worklist(), global_worklist_set(), global_worklists_build(), global_worklists_unbuild(), handle_city_info(), handle_city_worklist(), package_city(), popup_worklist_editor(), refresh_worklist(), and set_global_worklist().
Initialize a worklist to be empty. For elements, only really need to set [0], but initialize the rest to avoid junk values in savefile.
Definition at line 38 of file worklist.c.
Referenced by city_queue_clear(), city_dialog::clear_worklist(), clear_worklist_foreach_func(), city_widget::clear_worlist(), commit_worklist(), create_city_virtual(), dio_get_worklist_raw(), global_worklist_alloc(), global_worklists_build(), handle_city_info(), set_global_worklist(), worklist_load(), and worklist_load().
Inserts the production at the location idx in the worklist, thus moving all subsequent entries down. 'id' specifies the unit/building to be produced; is_unit tells whether it's a unit or building. Returns TRUE if successful.
Definition at line 167 of file worklist.c.
Referenced by base_city_queue_insert(), city_get_queue(), production_widget::prod_selected(), city_dialog::worklist_down(), and city_dialog::worklist_up().
Returns whether worklist has no elements.
Definition at line 66 of file worklist.c.
Referenced by add_global_worklist(), city_dialog_update_building(), city_set_queue(), cr_entry_building(), real_city_report_dialog_update_city(), real_info_city_report_dialog_update(), remove_item_from_worklist(), set_global_worklist(), and worklist_change_build_target().
Returns the number of entries in the worklist. The returned value can also be used as the next available worklist index (assuming that len < MAX_LEN_WORKLIST).
Definition at line 57 of file worklist.c.
Referenced by add_global_worklist(), add_target_to_worklist(), base_city_queue_insert(), city_build_unit(), city_production_build_units(), city_queue_insert_worklist(), city_dialog::dbl_click_p(), dio_put_worklist_raw(), city_widget::display_list_menu(), global_worklist_save(), global_worklists_build(), global_worklists_save(), global_worklists_unbuild(), menu_item_callback(), menu_item_callback(), ok_worklist_editor_callback(), popup_worklist_editor(), production_widget::prod_selected(), refresh_worklist(), refresh_worklist_count_label(), remove_item_from_worklist(), set_global_worklist(), city_dialog::update_improvements(), worklist_append(), worklist_change_build_target(), and worklist_next_to_last_impr_or_unit_iterate().
Fill in the id and is_unit values for the head of the worklist if the worklist is non-empty. Return 1 iff id and is_unit are valid.
Definition at line 76 of file worklist.c.
Referenced by city_set_queue().
Fill in the id and is_unit values for the ith element in the worklist. If the worklist has fewer than idx elements, return FALSE.
Definition at line 86 of file worklist.c.
Referenced by city_production_build_units(), city_worklist_commit(), set_global_worklist(), worklist_change_build_target(), city_dialog::worklist_down(), worklist_peek(), and city_dialog::worklist_up().
Remove element from position idx.
Definition at line 122 of file worklist.c.
Referenced by city_build_unit(), city_get_queue(), city_worklist_commit(), city_dialog::dbl_click_p(), ok_worklist_editor_callback(), production_widget::prod_selected(), remove_item_from_worklist(), worklist_advance(), worklist_change_build_target(), city_dialog::worklist_down(), and city_dialog::worklist_up().