allow to leave PC in other map

This commit is contained in:
Ondřej Novák 2025-02-04 15:08:35 +01:00
parent 5c4cfaf314
commit 33fa026576
23 changed files with 515 additions and 319 deletions

View file

@ -20,6 +20,7 @@ extern "C"
#define _KEYBRD_READ 1
#define TIMERSPEED 20
extern int timerspeed_val;
uint32_t _bios_keybrd(int mode);
@ -27,6 +28,8 @@ uint32_t _bios_keybrd(int mode);
#define RGB888(r,g,b) ((unsigned short)((((r)<<7)&0x7C00) | (((g)<<2) & 0x3E0) | ((b)>>3)))
#define RGB555(r,g,b) (((unsigned short)(((r)<<10) | ((g)<<5) | (b))) & ~BGSWITCHBIT)
#define RGB555_ALPHA(r,g,b) (((unsigned short)(((r)<<10) | ((g)<<5) | (b))) | BGSWITCHBIT)
#define AVG_PIXEL_MASK (0x7BDE)
#define BLEND_PIXELS(px1, px2) ((((px1) & AVG_PIXEL_MASK) + ((px2) & AVG_PIXEL_MASK)) >> 1)

View file

@ -3,9 +3,12 @@
#include "platform.h"
#include <thread>
int timerspeed_val = TIMERSPEED;
int get_timer_value() {
auto n = std::chrono::steady_clock::now();
return std::chrono::duration_cast<std::chrono::milliseconds>(n.time_since_epoch()).count()/TIMERSPEED;
return std::chrono::duration_cast<std::chrono::milliseconds>(n.time_since_epoch()).count()/timerspeed_val;
}
uint32_t get_game_tick_count() {