▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Well, I experimented a map file which used modifiers for about 3 hours. I got something of course.
1
2
3
4
5
6
2
3
4
5
6
1 byte = tile with right rotation 2 bytes = tile with down rotation 3 bytes = tile with left rotation 4 bytes = each 10% brightness for tile 64 bytes = tile blend 128 bytes = tile color
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
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
-- BYTE tile modifier at that map position if (modifier > 0) then 	if (modifier >= 128) then 		-- BYTE tile color red 		-- BYTE tile color green 		-- BYTE tile color blue 		-- BYTE tile overlay frame 		modifier = modifier - 128 	end 	 	if (modifier >= 64) then 		-- BYTE frame for tile modification 		modifier = modifier - 64 	end 	 	if (modifier > 0) then 		for rotationindex = 1, 3 do 			if ((modifier - rotationindex) % 4 == 0) then 				rotation = rotationindex 				-- 0 = up, 1 = right, 2 = down, 3 = left 				modifier = modifier - rotationindex 			end 		end 	end 	 	if (modifier >= 4) then 		brightness = modifier / 4 * 10 	end end
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
I don't understand many things below.
CS2D specification map format has written
BYTE tile modifier at that map position
Depending on the value of that byte there can be additional stuff saved:
If the bits for the values 64 OR 128 are 1 in that byte:
If the bits for 64 AND 128 are 1
STRING - unused -
Else If the bit for 64 is 1 and the bit for 128 is 0:
BYTE frame for tile modification
Else (the bit for 64 is 0 and the bit for 128 is 1):
BYTE tile color red
BYTE tile color green
BYTE tile color blue
BYTE tile overlay frame
Depending on the value of that byte there can be additional stuff saved:
If the bits for the values 64 OR 128 are 1 in that byte:
If the bits for 64 AND 128 are 1
STRING - unused -
Else If the bit for 64 is 1 and the bit for 128 is 0:
BYTE frame for tile modification
Else (the bit for 64 is 0 and the bit for 128 is 1):
BYTE tile color red
BYTE tile color green
BYTE tile color blue
BYTE tile overlay frame
Can someone (especially DC) explain how tile modifier works in the map file with details? Or should I ignore the tile modifier because "the following stuff is not used in current versions at all but should be implemented for compatibility with future versions"?
edited 2×, last 01.05.15 07:05:12 pm