fix manabatery, fix timer clock skew, check queue when mouse move, wasd control

This commit is contained in:
Ondrej Novak 2025-02-23 14:00:55 +01:00
parent 05a2803b2b
commit 56cac26206
17 changed files with 102 additions and 60 deletions

View file

@ -33,6 +33,17 @@ void ukaz_mysku()
}
}
void nastav_mysku_kurzor(const void *mscursor, int finger_x, int finger_y) {
register_ms_cursor(mscursor);
h_x = finger_x;
h_y = finger_y;
#ifndef FORCE_SOFTWARE_CURSOR
cur_hw_mouse = mscursor;
game_display_show_mouse(mscursor,h_x, h_y);
#endif
}
void schovej_mysku()
{
#ifdef FORCE_SOFTWARE_CURSOR
@ -107,6 +118,9 @@ void set_ms_finger(int x,int y)
{
h_x=x;
h_y=y;
#ifndef FORCE_SOFTWARE_CURSOR
game_display_show_mouse(cur_hw_mouse,h_x, h_y);
#endif
}

View file

@ -12,6 +12,7 @@ extern MS_EVENT ms_last_event;
short init_mysky(void);
short done_mysky(void);
void ukaz_mysku(void);
void nastav_mysku_kurzor(const void *mscursor, int finger_x, int finger_y);
void schovej_mysku(void);
void zobraz_mysku(void);
void set_ms_finger(int x,int y);

View file

@ -5,6 +5,10 @@
extern "C" {
#endif
#ifdef _MSC_VER
#define __attribute__(...)
#endif
#ifdef LOGFILE
void send_log_impl(const char *format, ...) __attribute__((format(printf, 1, 2)));
#define SEND_LOG(...) send_log_impl( __VA_ARGS__)

View file

@ -705,7 +705,7 @@ void *grealloc(void *p,int32_t size)
q=realloc(p,size);
if (q!=NULL)
{
SEND_LOG("(ALLOC) **** Realloc: New %p size %d\n",q,*((int32_t *)q-1));
// SEND_LOG("(ALLOC) **** Realloc: New %p size %d\n",q,*((int32_t *)q-1));
return q;
}
q=getmem(size);