blob: d9dc3bfaa6fa54c639dc3c8b674fbf064c9b0650 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#include <stdlib.h>
#include <string.h>
#include "global.h"
static data_store* data = NULL;
// returns global data_store
data_store* datamodel()
{
if(data == NULL)
{
data = malloc(sizeof(data_store));
memset(data, 0, sizeof(data_store));
}
return data;
}
// indicate which part of model has been changed,
// so UI can be redrawn
void updated_model(update_type_t action)
{
switch(action)
{
case update_type_players:
// ui_redraw_player_list()
break;
case update_type_stacks:
// ui_redraw_stacks()
break;
case update_type_hand:
// ui_redraw_hand()
break;
}
}
|