Initial port to Linux (using Allegro).

64-bit fixes.
Some changes to aid portability.
A few other tweaks.
This commit is contained in:
TomW 2014-09-04 21:07:24 +01:00
commit 56b455844e
70 changed files with 12702 additions and 282 deletions

View file

@ -9,7 +9,7 @@
#include "win.h"
#include "video.h"
extern "C" int key[272];
extern "C" int pcem_key[272];
extern "C" void fatal(const char *format, ...);
extern "C" void pclog(const char *format, ...);
@ -18,11 +18,13 @@ extern "C" void keyboard_init();
extern "C" void keyboard_close();
extern "C" void keyboard_poll();
int pcem_key[272];
void keyboard_init()
{
atexit(keyboard_close);
memset(key, 0, sizeof(key));
memset(pcem_key, 0, sizeof(pcem_key));
pclog("Keyboard initialized!\n");
}
@ -35,7 +37,7 @@ void keyboard_poll_host()
int c;
for (c = 0; c < 272; c++)
key[c] = rawinputkey[c];
pcem_key[c] = rawinputkey[c];
if ((rawinputkey[0x1D] || rawinputkey[0x9D]) &&
(rawinputkey[0x38] || rawinputkey[0xB8]) &&