rntviewer/src/app_state.h

34 lines
527 B
C
Raw Normal View History

2024-07-11 12:59:59 +00:00
struct Delta_Time_Accum {
f32 *base;
u16 count;
u16 max;
u16 start;
};
2024-07-10 18:11:42 +00:00
struct App_State {
Window_Data win_data;
User_Input user_input;
2024-07-11 12:27:19 +00:00
RNTuple_Info rntinfo;
Viewer_Settings vsettings;
2024-07-10 18:11:42 +00:00
2024-07-11 12:59:59 +00:00
Delta_Time_Accum delta_time_accum;
2024-07-10 20:30:49 +00:00
FILE *inspected_file;
u8 *inspected_fmem;
u64 inspected_file_size;
// @Platform: inotify file descriptor
int inot;
2024-07-11 12:00:43 +00:00
const char *ntpl_name;
2024-07-10 18:11:42 +00:00
};
2024-07-11 12:00:43 +00:00
internal
size_t file_size(FILE *f)
{
fseek(f, 0, SEEK_END);
size_t res = ftell(f);
fseek(f, 0, SEEK_SET);
return res;
}