Merge pull request #25 from GabrielRavier/improveM

Improve files starting with M
This commit is contained in:
Clownacy 2019-05-08 18:40:00 +00:00 committed by GitHub
commit 9f181c1864
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 224 additions and 228 deletions

View file

@ -489,10 +489,8 @@ bool SystemTask()
case SDL_KEYUP:
#ifdef FIX_BUGS
// BUG FIX: Pixel relied on key codes for input, but these differ based on keyboard layout.
//This would break the alternate movement keys on typical English keyboards, since the '=' key
//is in a completely different place to where it is on a Japanese keyboard.
//To solve this, we use scancodes instead, which are based on the physical location of keys,
//rather than their meaning.
// This would break the alternate movement keys on typical English keyboards, since the '=' key is in a completely different place to where it is on a Japanese keyboard.
// To solve this, we use scan codes instead, which are based on the physical location of keys, rather than their meaning.
switch (event.key.keysym.scancode)
{
case SDL_SCANCODE_ESCAPE:

View file

@ -52,8 +52,7 @@ BOOL LoadMapData2(const char *path_map)
fread(&dum, 1, 1, fp);
// Get width and height
#ifdef NONPORTABLE
// This fails on big-endian hardware, and platforms
// where short is not two bytes long.
// This fails on big-endian hardware, and platforms where short is not two bytes long.
fread(&gMap.width, 2, 1, fp);
fread(&gMap.length, 2, 1, fp);
#else

View file

@ -14,7 +14,7 @@ void ReadyMapName(const char *str)
{
int a;
//Handle "Studio Pixel presents" text in the intro
// Handle "Studio Pixel presents" text in the intro, using an obfuscated string
unsigned char presentText[24] = {
#ifdef JAPANESE
// "ŠJ”­ŽºPixel presents"
@ -79,12 +79,11 @@ void ReadyMapName(const char *str)
str = (char*)presentText;
}
//Copy map's name to the MapName
// Copy map's name to the global map name
strcpy(gMapName.name, str);
// Draw the text to the surface
a = (int)strlen(gMapName.name);
CortBox2(&rc, 0, SURFACE_ID_ROOM_NAME);
PutText2((160 - 6 * a) / 2 + 6, 1, gMapName.name, RGB(0x11, 0x00, 0x22), SURFACE_ID_ROOM_NAME);
PutText2((160 - 6 * a) / 2 + 6, 0, gMapName.name, RGB(0xFF, 0xFF, 0xFE), SURFACE_ID_ROOM_NAME);