summaryrefslogtreecommitdiff
path: root/support/regression/tests/bug-2051348.c
blob: cc1a35b2d400f9efa85dda37354225043a14c2a4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
        bug 2051348.
*/

#include <testfwk.h>

#pragma disable_warning 85

typedef char BOOLEAN;
typedef signed char SHORTINT;

void App_PutSprite (SHORTINT x, SHORTINT y, SHORTINT spr)
{
}

static SHORTINT Labirint_objCell, Labirint_manX, Labirint_manY, Labirint_manDirX, Labirint_manDirY;
static BOOLEAN Labirint_manPresent;

static SHORTINT Labirint_GetManSprite (void)
{
	return(0);
}

static BOOLEAN Labirint_ManCanGo (void)
{
	return(0);
}

static BOOLEAN Labirint_ManGoing (SHORTINT x, SHORTINT y)
{
	return(0);
}

static void Labirint_SetCell (SHORTINT x, SHORTINT y, SHORTINT cell)
{
}

static void Labirint_TryMoveMan (void)
{
	SHORTINT x, y, manSprite;
	if (Labirint_ManCanGo()) {
		x = (Labirint_manX + Labirint_manDirX) + Labirint_manDirX;
		y = (Labirint_manY + Labirint_manDirY) + Labirint_manDirY;
		Labirint_manPresent = Labirint_ManGoing(x, y);
		if (!Labirint_manPresent) {
			return;
		}
		manSprite = Labirint_GetManSprite();
		Labirint_SetCell(x, y, manSprite);
		App_PutSprite(Labirint_manX, Labirint_manY, 0);
		// Assembly fails for the next two lines.
		Labirint_manX = Labirint_manX + Labirint_manDirX;
		Labirint_manY = Labirint_manY + Labirint_manDirY;
	} else {
		manSprite = 4;
	}
	App_PutSprite(Labirint_manX, Labirint_manY, manSprite);
}

void
testBug2051348(void)
{
        ASSERT(1);
}