aboutsummaryrefslogtreecommitdiff
path: root/backends/PalmOS/Src/builder/scumm/bl_gfx.c
blob: 0ac90e5636acd96d970cd741337d9f9df2085500 (plain)
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#include <PalmOS.h>
#include "b_globals.h"
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
typedef struct  {
	Int8 numOfIterations;
	Int8 deltaTable[16];	// four times l / t / r / b
	Int8 stripTable[16];	// ditto
} TransitionEffect;
///////////////////////////////////////////////////////////////////
static void addGfx_transitionEffects() {
		TransitionEffect transitionEffects[5] = {
		// Iris effect (looks like an opening/closing camera iris)
		{
			13,		// Number of iterations
			{
				1,  1, -1,  1,
			   -1,  1, -1, -1,
				1, -1, -1, -1,
				1,  1,  1, -1
			},
			{
				0,  0, 39,  0,
			   39,  0, 39, 24,
				0, 24, 39, 24,
				0,  0,  0, 24
			}
		},
		
		// Box wipe (a box expands from the upper-left corner to the lower-right corner)
		{
			25,		// Number of iterations
			{
				0,  1,  2,  1,
				2,  0,  2,  1,
				2,  0,  2,  1,
				0,  0,  0,  0
			},
			{
				0,  0,  0,  0,
				0,  0,  0,  0,
				1,  0,  1,  0,
			  255,  0,  0,  0
			}
		},
		
		// Box wipe (a box expands from the lower-right corner to the upper-left corner)
		{
			25,		// Number of iterations
			{
			   -2, -1,  0, -1,
			   -2, -1, -2,  0,
			   -2, -1, -2,  0,
				0,  0,  0,  0
			},
			{
			   39, 24, 39, 24,
			   39, 24, 39, 24,
			   38, 24, 38, 24,
			  255,  0,  0,  0
			}
		},
		
		// Inverse box wipe
		{
			25,		// Number of iterations
			{
				0, -1, -2, -1,
			   -2,  0, -2, -1,
			   -2,  0, -2, -1,
			    0,  0,  0,  0
			},
			{
				0, 24, 39, 24,
			   39,  0, 39, 24,
			   38,  0, 38, 24,
			  255,  0,  0,  0
			}
		},

		// Inverse iris effect, specially tailored for V1/V2 games
		{
			9,		// Number of iterations
			{
				-1, -1,  1, -1,
				-1,  1,  1,  1,
				-1, -1, -1,  1,
				 1, -1,  1,  1
			},
			{
				 7, 7, 32, 7,
				 7, 8, 32, 8,
				 7, 8,  7, 8,
				32, 7, 32, 8
			}
		}
	};

	writeRecord(transitionEffects, sizeof(transitionEffects), GBVARS_TRANSITIONEFFECTS_INDEX , GBVARS_SCUMM);
}

///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////

void addGfx() {
	addGfx_transitionEffects();

}