mirror of
https://github.com/ondra-novak/gates_of_skeldal.git
synced 2025-07-05 06:00:33 -04:00
revision of events
This commit is contained in:
parent
858c4384e8
commit
669f72908e
33 changed files with 661 additions and 382 deletions
|
@ -1,9 +1,28 @@
|
|||
#include <cstdarg>
|
||||
#include <cstdint>
|
||||
#include <iostream>
|
||||
extern "C" {
|
||||
#include "error.h"
|
||||
}
|
||||
#include "platform.h"
|
||||
|
||||
|
||||
void display_error(const char *text) {
|
||||
std::cerr << "ERROR:" << text << std::endl;
|
||||
}
|
||||
|
||||
|
||||
static std::uint32_t gtick = get_game_tick_count();
|
||||
void send_log_impl(int task, const char *format, ...) {
|
||||
va_list args;
|
||||
char buff2[1000];
|
||||
va_start(args, format);
|
||||
auto reltik = get_game_tick_count() - gtick;
|
||||
double sec = reltik * 0.001;
|
||||
std::cerr << sec << "[" << task << "]";
|
||||
vsnprintf(buff2,1000,format, args);
|
||||
std::cerr << buff2 << std::endl;
|
||||
va_end(args);
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue