Merge branch 'accurate' into portable

This commit is contained in:
Clownacy 2019-10-21 20:25:48 +01:00
commit 006a20b914
4 changed files with 11 additions and 7 deletions

View file

@ -16,12 +16,12 @@ void ReadyMapName(const char *str)
// Handle "Studio Pixel presents" text in the intro, using an obfuscated string // Handle "Studio Pixel presents" text in the intro, using an obfuscated string
unsigned char presentText[24] = { unsigned char presentText[24] = {
#ifdef JAPANESE #ifdef JAPANESE
// "ŠJ”­ŽºPixel presents" // "開発室Pixel presents"
0x8A - 1, // ŠJ 0x8A - 1, //
0x4A - 1, 0x4A - 1,
0x94 - 1, // ”­ 0x94 - 1, //
0xAD - 1, 0xAD - 1,
0x8E - 1, // Žº 0x8E - 1, //
0xBA - 1, 0xBA - 1,
'P' - 1, 'P' - 1,
'i' - 1, 'i' - 1,

View file

@ -142,7 +142,7 @@ void SetNpChar(int code_char, int x, int y, int xm, int ym, int dir, NPCHAR *npc
// Set NPC parameters // Set NPC parameters
memset(&gNPC[n], 0, sizeof(NPCHAR)); memset(&gNPC[n], 0, sizeof(NPCHAR));
gNPC[n].cond |= 0x80u; gNPC[n].cond |= 0x80;
gNPC[n].direct = dir; gNPC[n].direct = dir;
gNPC[n].code_char = code_char; gNPC[n].code_char = code_char;
gNPC[n].x = x; gNPC[n].x = x;

View file

@ -1949,6 +1949,8 @@ void ActNpc158(NPCHAR *npc)
// Monster X (defeated) // Monster X (defeated)
void ActNpc159(NPCHAR *npc) void ActNpc159(NPCHAR *npc)
{ {
int i;
RECT rect = {144, 128, 192, 200}; RECT rect = {144, 128, 192, 200};
switch (npc->act_no) switch (npc->act_no)
@ -1956,7 +1958,7 @@ void ActNpc159(NPCHAR *npc)
case 0: case 0:
npc->act_no = 1; npc->act_no = 1;
for (int i = 0; i < 8; ++i) for (i = 0; i < 8; ++i)
SetNpChar(4, npc->x + (Random(-16, 16) * 0x200), npc->y + (Random(-16, 16) * 0x200), Random(-341, 341), Random(-341, 341), 0, 0, 0x100); SetNpChar(4, npc->x + (Random(-16, 16) * 0x200), npc->y + (Random(-16, 16) * 0x200), Random(-341, 341), Random(-341, 341), 0, 0, 0x100);
// Fallthrough // Fallthrough
case 1: case 1:

View file

@ -970,6 +970,8 @@ void ActNpc189(NPCHAR *npc)
// Broken robot // Broken robot
void ActNpc190(NPCHAR *npc) void ActNpc190(NPCHAR *npc)
{ {
int i;
RECT rect[2] = { RECT rect[2] = {
{192, 32, 208, 48}, {192, 32, 208, 48},
{208, 32, 224, 48}, {208, 32, 224, 48},
@ -983,7 +985,7 @@ void ActNpc190(NPCHAR *npc)
case 10: case 10:
PlaySoundObject(72, 1); PlaySoundObject(72, 1);
for (int i = 0; i < 8; i++) for (i = 0; i < 8; i++)
SetNpChar(4, npc->x, npc->y + (Random(-8, 8) << 9), Random(-8, -2) << 9, Random(-3, 3) << 9, 0, 0, 0x100); SetNpChar(4, npc->x, npc->y + (Random(-8, 8) << 9), Random(-8, -2) << 9, Random(-3, 3) << 9, 0, 0, 0x100);
npc->cond = 0; npc->cond = 0;
break; break;