マップ

えーと、まだコンテンツ充実する暇がありません。

豆知識1:リープルフォート〜ディアスがリープルフォート〜エレミア平原に改変されたさい、マップ全体が1ドット下に下がりました。ミルシア〜蒼目の塔〜古灯台が繋がったさい、マップ全体が2ドット下に下がりました。下のスクリプトは最後の改変後です。

地図スクリプト

文字コードはShift_JIS用…だと思います。Perl/Tk、Windows用。

use Tk;
use Tk::PNG;
use encoding "cp932";

$points = '
1,	3,	35,	592,	スヴァ/ルト,
2,	1,	49,	153,	イブリス/大平原,
3,	2,	85,	337,	アルヴ/ヘイム,
4,	1,	96,	213,	白眼/の塔,
5,	1,	130,	465,	アウストリ/海岸,
6,	1,	137,	104,	メフティス/火山,
7,	1,	148,	154,	廃港,
8,	3,	175,	589,	ノア/トゥーン,
9,	1,	192,	504,	アルヴィス/の森,
10,	1,	202,	355,	メティウス/大森林,
11,	1,	221,	44,	アウェルナス/森林,
12,	1,	253,	553,	赤眼/の塔,
13,	1,	257,	462,	ルベツ/アール/峡谷,
14,	2,	268,	362,	プルトス,
15,	2,	272,	222,	パラス,
16,	2,	276,	116,	バルバシア,
17,	1,	307,	179,	ヴァルグ/渓谷,
18,	1,	310,	567,	グニタ/荒野,
19,	1,	380,	313,	冥界/の門,
20,	1,	383,	410,	ニザ/ヴェリール/野,
21,	1,	385,	116,	黄眼/の塔,
22,	1,	394,	53,	逝者/の谷,
23,	3,	444,	513,	ミルシア,
24,	1,	458,	183,	第一砦,
25,	1,	474,	367,	カタコンベ,
26,	1,	480,	477,	マルティア/大森林北部,
27,	2,	481,	264,	アムス/ティア,
28,	1,	485,	303,	第二砦,
29,	1,	490,	87,	聖者/の丘,
30,	1,	497,	558,	蒼眼/の塔,
31,	1,	523,	420,	ミレット/山道,
32,	1,	539,	227,	第三砦,
33,	1,	541,	506,	マルティア/大森林南部,
34,	2,	553,	80,	エルク/アール,
35,	1,	556,	133,	エクリム/山道,
36,	1,	559,	613,	古灯台,
37,	1,	591,	242,	大瀑布,
38,	2,	607,	375,	ティター/ニア,
39,	2,	648,	499,	リーブル/フォート,
40,	1,	654,	131,	ヘステイア/高地,
41,	1,	672,	213,	黒眼/の塔,
42,	1,	673,	396,	バーリー/要塞,
43,	3,	704,	312,	ロデ,
44,	2,	715,	91,	アステリア,
45,	3,	717,	172,	リダ,
46,	1,	718,	254,	ヴェーラス/大湿地帯,
47,	1,	761,	119,	霹靂/の荒野,
48,	1,	777,	348,	ウィート/監視塔跡,
49,	2,	777,	547,	ディアス,
50,	1,	812,	511,	エレミア/平原,
51,	1,	823,	71,	雷神洞,
52,	1,	852,	557,	ゴルダ/鉱山,
53,	2,	884,	411,	ア/デ/ン,
';

$lines = '

2-6,2-7,
3-5,3-10,
4-7,
5-9,
6-11,
7-16,
8-9,
9-12,9-13,
10-14,
11-16,
12-18,
13-20,
14-15,
15-17,
16-17,16-22,
17-21,17-24,

19-20,19-27


22-29,
23-26,23-30,23-33,
24-27,24-35,
25-28,25-31,25-38,
26-31,
27-28,27-32,

29-34,
30-33,30-36
31-38,
32-37,
33-36,33-39,
34-40,
35-40,
36-39,
37-41,
38-42,
39-50,
40-45,40-44,
41-45,41-46,
42-48,
43-46,43-48,
44-47,
45-46,

47-51,
49-50,
50-52,50-53


';
sub dataset{
	@points = split /[,\t\r\n]+/, $points;
	@lines = split /[^\d]+/, $lines;
	for($i=1; $i<=$#lines; $i+=2){
		($a, $b) = @lines[$i, $i+1];
		push @id, ($canvas->createLine(
			$points[$a*5-2]+$shift, $points[$a*5-1],
			$points[$b*5-2]+$shift, $points[$b*5-1],
			-fill, 'orange',
			-width, 10
		));
	}
	for($i=1; $i<=$#points; $i+=5){
		($n, $p, $x, $y, $t) = @points[$i .. $i+4];
		$t =~ s/\//\n/g;
		push @id, ($canvas->createOval(
			$x-15+$shift, $y-15, $x+15+$shift, $y+15,
			-fill, (['', 'yellow', 'green', 'gray']->[$p]),
			));
		push @id, ($canvas->createText(
			$x+$shift+2,
			$y,
			-text, $t,
			-font, ['MS Pゴシック', 14, bold],
			-fill, 'black',
		));
		push @id, ($canvas->createText(
			$x+$shift-2,
			$y,
			-text, $t,
			-font, ['MS Pゴシック', 14, bold],
			-fill, 'black',
		));
		push @id, ($canvas->createText(
			$x+$shift,
			$y+2,
			-text, $t,
			-font, ['MS Pゴシック', 14, bold],
			-fill, 'black',
		));
		push @id, ($canvas->createText(
			$x+$shift+2,
			$y-2,
			-text, $t,
			-font, ['MS Pゴシック', 14, bold],
			-fill, 'black',
		));
		push @id, ($canvas->createText(
			$x+$shift,
			$y,
			-text, $t,
			-font, ['MS Pゴシック', 14, bold],
			-fill, 'white',
		));
	}
}

{
	$shift = 0;
	$mw = MainWindow->new;
	$mw->title('map');
	$canvas = $mw->Canvas(-height, 660, -width, 890 + $shift * 2, -background, 'black')->pack;
	$bitmap = $canvas->createImage($shift, 0, -image, $image, -anchor, 'nw');
	&dataset;
	MainLoop;
}

マップ