mirror of
https://github.com/ondra-novak/gates_of_skeldal.git
synced 2025-07-21 14:44:57 -04:00
allow to leave PC in other map
This commit is contained in:
parent
5c4cfaf314
commit
33fa026576
23 changed files with 515 additions and 319 deletions
|
@ -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)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue