linked list rename mod to ex
This commit is contained in:
@@ -49,7 +49,6 @@ struct ui_box_t {
|
||||
r2f32_t rect;
|
||||
};
|
||||
|
||||
// @todo:
|
||||
typedef struct ui_signal ui_signal;
|
||||
struct ui_signal {
|
||||
b8 clicked;
|
||||
@@ -106,7 +105,7 @@ ui_box_t *ui_build_box(ui_id_t id) {
|
||||
memory_zero(box, offsetof(ui_box_t, id));
|
||||
} else {
|
||||
box = ui_alloc_box();
|
||||
DLLQ_APPEND_MOD(ui->first_hash, ui->last_hash, box, hash_next, hash_prev);
|
||||
DLLQ_APPEND_EX(ui->first_hash, ui->last_hash, box, hash_next, hash_prev);
|
||||
}
|
||||
box->last_frame_touched_index = ui->frame->frame;
|
||||
box->id = id;
|
||||
@@ -293,7 +292,7 @@ void ui_end_frame(void) {
|
||||
b32 touched_this_frame = ui->frame->frame <= box->last_frame_touched_index;
|
||||
b32 is_null = box->id.value == 0;
|
||||
if (!touched_this_frame || is_null) {
|
||||
DLLQ_REMOVE_MOD(ui->first_hash, ui->last_hash, box, hash_next, hash_prev);
|
||||
DLLQ_REMOVE_EX(ui->first_hash, ui->last_hash, box, hash_next, hash_prev);
|
||||
zero_struct(box);
|
||||
SLLS_PUSH(ui->first_free, box);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user