root/lang/javascript/ML4M2M/trunk/spex/index.html @ 30565

Revision 30565, 13.6 kB (checked in by issm, 4 years ago)

propset: mime-type=text/html to spex/index.html.

  • Property svn:mime-type set to text/html; charset=utf-8
Line 
1<html>
2<head>
3        <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
4        <title></title>
5
6        <link rel="stylesheet" type="text/css" href="./style.css" charset="utf-8" />
7        <script type="text/javascript" src="../js/jquery-1.3.2.min.js"></script>
8        <script type="text/javascript" src="../js/ml4m2m.js" charset="utf-8"></script>
9        <script type="text/javascript">
10$( function() { $( 'pre' ).each( function() {
11  this.innerHTML = this.innerHTML.replace( /\</g, '&lt;').replace( /\>/g, '&gt;' ).replace( /\&lt;\s/g, '&lt;' ); } );
12} );
13        </script>
14</head>
15<body>
16
17<div id="head">
18        <div class="ml4m2m">
19                <mario2map like="3-1" s="52x13">
20                        <blockade>
21                                <ground s="52x2"></ground>
22
23                                <!-- M -->
24                                <renga p="8,5" s="x8"></renga>
25                                <renga p=",+6"></renga>
26                                <renga p=",-1"></renga>
27                                <renga p=",-3" s="x3"></renga>
28                                <renga p=",+3"></renga>
29                                <renga p=",+1"></renga>
30                                <renga p=",-6" s="x8"></renga>
31                                <!-- L -->
32                                <renga p="+1" s="x8"></renga>
33                                <renga s="4"></renga>
34                                <!-- 4 -->
35                                <renga p=",+2" s="7"></renga>
36                                <renga p="-7,+1"></renga>
37                                <renga p=",+1"></renga>
38                                <renga p=",+1"></renga>
39                                <renga p=",+1"></renga>
40                                <renga p=",-6" s="x8"></renga>
41                                <!-- M -->
42                                <renga p="+3" s="x8"></renga>
43                                <renga p=",+6"></renga>
44                                <renga p=",-1"></renga>
45                                <renga p=",-3" s="x3"></renga>
46                                <renga p=",+3"></renga>
47                                <renga p=",+1"></renga>
48                                <renga p=",-6" s="x8"></renga>
49                                <!-- 2 -->
50                                <renga p="+1,+5" s="x2"></renga>
51                                <renga p=",+2" s="4"></renga>
52                                <renga p=",-2" s="x2"></renga>
53                                <renga p="-2,-1"></renga>
54                                <renga p="-3,-1" s="2"></renga>
55                                <renga p="-3,-1"></renga>
56                                <renga p="-2,-1"></renga>
57                                <renga p="-1,-1" s="6"></renga>
58                                <!-- M -->
59                                <renga p="+1" s="x8"></renga>
60                                <renga p=",+6"></renga>
61                                <renga p=",-1"></renga>
62                                <renga p=",-3" s="x3"></renga>
63                                <renga p=",+3"></renga>
64                                <renga p=",+1"></renga>
65                                <renga p=",-6" s="x8"></renga>
66                        </blockade>
67
68                        <background>
69                                <castle p=",3"></castle>
70
71                                <cloud type="3" p="2,10"></cloud>
72                                <cloud type="1" p="+10,7"></cloud>
73                                <cloud type="2" p="+8,10"></cloud>
74                                <cloud type="1" p="+10,7"></cloud>
75
76                                <mount type="1" p="8,3"></mount>
77                                <mount type="1" p="+20"></mount>
78                                <mount type="2" p="+8"></mount>
79
80                                <tree type="1" p="16" s="2"></tree>
81                                <tree type="2" s="1"></tree>
82                                <tree type="3" s="1"></tree>
83                                <tree type="1" s="3"></tree>
84                                <tree type="3" s="1"></tree>
85                                <tree type="1" s="1"></tree>
86                                <tree type="1" p="+9" s="1"></tree>
87                                <tree type="2" s="1"></tree>
88                                <tree type="1" s="2"></tree>
89                        </background>
90                </mario2map>
91        </div>
92
93        <h1>ML4M2M - Markup Language for Mario2(-like) Maps</h1>
94</div>
95
96
97<div id="content">
98
99        <h3>目次</h3>
100
101        <ul>
102                <li>
103                        <a href="#section-概要">概要</a>
104                </li>
105                <li>
106                        <a href="#section-準備">準備</a>
107                </li>
108                <li>
109                        <a href="#section-基本">基本</a>
110                </li>
111                <li>
112                        <a href="#section-要素一覧">要素一覧</a>
113                        <ul>
114                                <li><a href="#section-要素一覧-背景カテゴリ">背景カテゴリ</a></li>
115                                <li><a href="#section-要素一覧-障害物カテゴリ">障害物カテゴリ</a></li>
116                                <li><a href="#section-要素一覧-リフトカテゴリ">リフトカテゴリ</a></li>
117                                <li><a href="#section-要素一覧-アイテムカテゴリ">アイテムカテゴリ</a></li>
118                        </ul>
119                </li>
120        </ul>
121
122
123
124
125
126        <h3><a id="section-概要">概要</a></h3>
127
128        <p>HTMLのようなタグ形式の記述で「スーパーマリオブラザーズ 2」っぽいエリアマップを描画するためのマークアップ言語のようなものです.</p>
129
130
131       
132       
133        <h3><a id="section-準備">準備</a></h3>
134       
135<pre>
136        <script type="text/javascript" src="jquery-1.3.2.min.js" charset="utf-8"></script>
137        <script type="text/javascript" src="ml4m2m.js" charset="utf-8"></script>
138</pre>
139
140
141
142        <h3><a id="section-基本">基本</a></h3>
143
144        <h4>全体の書式</h4>
145
146        <p><code>ml4m2m</code> なクラスの <code>div</code> 要素の中に,次のような書式で記述していきます.</p>
147
148<pre>
149< div class="ml4m2m">
150  <mario2map like="1-1" size="80x14">
151
152    <!-- 背景カテゴリ -->
153    <background>
154      <!--
155      「背景要素」を記述する
156      -->
157    </background>
158
159    <!-- 障害物カテゴリ -->
160    <blockade>
161      <!--
162      「障害物要素」を記述する
163      -->
164    </blockade>
165
166    <!-- リフトカテゴリ -->
167    <lift>
168      <!--
169      「リフト要素」を記述する
170       障害物カテゴリでいいんじゃね?というのはとりあえずスルー
171      -->
172    </lift>
173
174    <!-- アイテムカテゴリ -->
175    <item>
176      <!--
177      「アイテム要素」を記述する
178      -->
179    </item>
180
181  </mario2map>
182< /div>
183</pre>
184
185<h5><code>mario2map</code> タグの属性</h5>
186<p><code>mario2map</code> タグには,次の属性を設定することができます.</p>
187<dl>
188        <dt><code>like</code></dt>
189        <dd>スーパーマリオブラザーズ2 に存在する「エリア」を指定することで,そのエリア「風の」マップを描画することができます.指定がなかった場合,「1-1」 がデフォルトの値となります.</dd>
190        <dt><code>size</code></dt>
191        <dd>マップのサイズを「幅x高さ」で指定します.16pixel x 12pixel のブロック 1つが単位となります.指定がなかった場合,「100x14」がデフォルトの値となります.</dd>
192</dl>
193
194
195        <h4>単一要素の書式</h4>
196       
197        <p>特定の「カテゴリ」下で特定の「要素」を記述することで,マップの描画が行われます.「要素」の基本的な記述の例を次に示します.</p>
198
199<pre>
200  <elemname pos="20,10" size="10x5"></elemname>
201</pre>
202
203<p><code>pos</code> と <code>size</code> はすべての「要素」に共通の属性で,それぞれ<b>位置</b>と<b>サイズ</b>を表します.この例では,<b>マップ左下から右に20ブロック,上に10ブロック</b> のところに,<b>幅10ブロック分,高さ5ブロック分</b>の <b><code>elemname</code> という要素を描画する</b>,ということを表しています.なお,要素の左下部分が指定位置となるように描画されます.</p>
204
205
206
207
208
209
210
211
212
213<h3><a id="section-要素一覧">要素一覧</a></h3>
214
215
216
217
218
219<h4><a id="section-要素一覧-背景カテゴリ">背景カテゴリ</a></h4>
220
221<div class="ml4m2m">
222        <mario2map like="2-1" s="80,13">
223                <background>
224                        <cloud type="1" p="2,2" title="雲1"></cloud>
225                        <cloud type="2" title="雲2"></cloud>
226                        <cloud type="3" title="雲3"></cloud>
227                        <grass type="1" title="草1"></grass>
228                        <grass type="2" title="草2"></grass>
229                        <grass type="3" title="草3"></grass>
230                        <mount type="1" title="山1"></mount>
231                        <mount type="2" title="山2"></mount>
232                        <tree type="1" title="木1"></tree>
233                        <tree type="2" title="木2"></tree>
234                        <tree type="3" title="木3"></tree>
235                        <water p="+1" s="3,3" title="水"></water>
236                        <castle type="1" p="+1" title="城1"></castle>
237                        <castle type="2" p="+1" title="城2"></castle>
238                        <wall p="+1" s="3" title="城壁"></wall>
239                </background>
240        </mario2map>
241</div>
242
243<pre>
244< div class="ml4m2m">
245  <mario2map like="2-1" s="80,13">
246    <background>
247      <cloud type="1" p="2,2" title="雲1"></cloud>
248      <cloud type="2" title="雲2"></cloud>
249      <cloud type="3" title="雲3"></cloud>
250      <grass type="1" title="草1"></grass>
251      <grass type="2" title="草2"></grass>
252      <grass type="3" title="草3"></grass>
253      <mount type="1" title="山1"></mount>
254      <mount type="2" title="山2"></mount>
255      <tree type="1" title="木1"></tree>
256      <tree type="2" title="木2"></tree>
257      <tree type="3" title="木3"></tree>
258      <water p="+1" s="3,3" title="水"></water>
259      <castle type="1" p="+1" title="城1"></castle>
260      <castle type="2" p="+1" title="城2"></castle>
261      <wall p="+1" s="3" title="城壁"></wall>
262    </background>
263  </mario2map>
264< /div>
265</pre>
266
267
268
269<h4><a id="section-要素一覧-障害物カテゴリ">障害物カテゴリ</a></h4>
270
271<div class="ml4m2m">
272        <mario2map like="3-1" s="80,12">
273                <blockade>
274                        <block p="2,2" s="2,2" title="ブロック"></block>
275                        <brick p="+1" s="2,2" title="レンガブロック"></brick>
276                        <bridge p="+1" s="2" title="橋"></bridge>
277                        <cloud p="+1" s="2,2" title="雲"></cloud>
278                        <ground p="+1" s="2,2" title="地面"></ground>
279                        <hatena p="+1" s="2,2" title="ハテナブロック"></hatena>
280                        <hidden p="+1" s="2,2" title="隠しブロック"></hidden>
281                        <iron p="+1" s="2,2" title="鉄ブロック"></iron>
282                        <jump type="1" p="+1" title="ジャンプ台"></jump>
283                        <jump type="2" p="+1" title="スーパージャンプ台"></jump>
284                        <killer type="1" p="+1" s=",1" title="キラー砲台"></killer>
285                        <killer type="2" p="+0" s=",2" title="キラー砲台"></killer>
286                        <killer type="2" p="+0" s=",4" title="キラー砲台"></killer>
287                        <pipe type="n" p="+1" s=",3" title="土管"></pipe>
288                        <pipe type="r" p="+1" s=",3" title="土管"></pipe>
289                        <pole p="+1" title="ポール"></pole>
290                        <shima p="+1" s="5,3" title="島"></shima>
291                </blockade>
292        </mario2map>
293</div>
294<div class="ml4m2m">
295        <mario2map like="3-2" s="4,4">
296                <blockade>
297                        <coral p="2,2" s="2,2" title="さんごブロック"></coral>
298                </blockade>
299        </mario2map>
300</div>
301
302<pre>
303< div class="ml4m2m">
304  <mario2map like="3-1" s="80,12">
305    <blockade>
306      <block p="2,2" s="2,2" title="ブロック"></block>
307      <brick p="+1" s="2,2" title="レンガブロック"></brick>
308      <bridge p="+1" s="2" title="橋"></bridge>
309      <cloud p="+1" s="2,2" title="雲"></cloud>
310      <ground p="+1" s="2,2" title="地面"></ground>
311      <hatena p="+1" s="2,2" title="ハテナブロック"></hatena>
312      <hidden p="+1" s="2,2" title="隠しブロック"></hidden>
313      <iron p="+1" s="2,2" title="鉄ブロック"></iron>
314      <jump type="1" p="+1" title="ジャンプ台"></jump>
315      <jump type="2" p="+1" title="スーパージャンプ台"></jump>
316      <killer type="1" p="+1" s=",1" title="キラー砲台"></killer>
317      <killer type="2" p="+0" s=",2" title="キラー砲台"></killer>
318      <killer type="2" p="+0" s=",4" title="キラー砲台"></killer>
319      <pipe type="n" p="+1" s=",3" title="土管"></pipe>
320      <pipe type="r" p="+1" s=",3" title="逆さ土管"></pipe>
321      <pole p="+1" title="ポール"></pole>
322      <shima p="+1" s="5,3" title="島?"></shima>
323    </blockade>
324  </mario2map>
325< /div>
326< div class="ml4m2m">
327  <mario2map like="3-2" s="4,4">
328    <blockade>
329      <coral p="2,2" s="2,2" title="さんごブロック"></coral>
330    </blockade>
331  </mario2map>
332< /div>
333</pre>
334
335
336
337<h4><a id="section-要素一覧-リフトカテゴリ">リフトカテゴリ</a></h4>
338
339<div class="ml4m2m">
340        <mario2map like="a-3" s="80,9">
341                <lift>
342                        <kinoko type="1" p="2,4" title="リフト1"></kinoko>
343                        <kinoko type="2" p="+1" title="リフト2"></kinoko>
344                        <kinoko type="3" p="+1" title="リフト3"></kinoko>
345                        <cloud type="1" p="+1" title="雲リフト1"></cloud>
346                        <cloud type="2" p="+1" title="雲リフト2"></cloud>
347                        <balance type="1" p="+1" s="8,4" r="-2" title="天秤リフト1"></balance>
348                        <balance type="2" p="+1" s="7,5" r="+1" title="天秤リフト2"></balance>
349                        <balance type="3" p="+1" s="6,5" r="+2" title="天秤リフト3"></balance>
350                        <elevator type="1" p="+1" from="2" int="3" title="エレベータ1"></elevator>
351                        <elevator type="2" p="+1" from="3" int="3" title="エレベータ2"></elevator>
352                        <elevator type="3" p="+1" from="4" int="3" title="エレベータ3"></elevator>
353                </lift>
354        </mario2map>
355</div>
356
357<pre>
358< div class="ml4m2m">
359  <mario2map like="a-3" s="80,9">
360    <lift>
361      <kinoko type="1" p="2,4" title="リフト1"></kinoko>
362      <kinoko type="2" p="+1" title="リフト2"></kinoko>
363      <kinoko type="3" p="+1" title="リフト3"></kinoko>
364      <cloud type="1" p="+1" title="雲リフト1"></cloud>
365      <cloud type="2" p="+1" title="雲リフト2"></cloud>
366      <balance type="1" p="+1" s="8,4" r="-2" title="天秤リフト1"></balance>
367      <balance type="2" p="+1" s="7,5" r="+1" title="天秤リフト2"></balance>
368      <balance type="3" p="+1" s="6,5" r="+2" title="天秤リフト3"></balance>
369      <elevator type="1" p="+1" from="2" int="3" title="エレベータ1"></elevator>
370      <elevator type="2" p="+1" from="3" int="3" title="エレベータ2"></elevator>
371      <elevator type="3" p="+1" from="4" int="3" title="エレベータ3"></elevator>
372    </lift>
373  </mario2map>
374< /div>
375</pre>
376
377
378<h4><a id="section-要素一覧-アイテムカテゴリ">アイテムカテゴリ</a></h4>
379
380<div class="ml4m2m">
381        <mario2map like="1-1" s="20,6">
382                <item>
383                        <coin p="2,3" s="3" title="コイン"></coin>
384                        <kinoko type="s" p="+1" title="スーパーキノコ"></kinoko>
385                        <kinoko type="u" p="+1" title="1UPキノコ"></kinoko>
386                        <kinoko type="d" p="+1" title="毒キノコ"></kinoko>
387                        <flower p="+1" title="ファイアフラワー"></flower>
388                        <star p="+1" title="スーパースター"></star>
389                        <jack p="+1,-1" s=",4" title="ツタ?"></jack>
390                </item>
391        </mario2map>
392</div>
393<div class="ml4m2m">
394        <mario2map like="1-4" s="5,5">
395                <item>
396                        <axe p="3,3" title="斧"></axe>
397                </item>
398        </mario2map>
399</div>
400
401<pre>
402< div class="ml4m2m">
403  <mario2map like="1-1" s="20,6">
404    <item>
405      <coin p="2,3" s="3" title="コイン"></coin>
406      <kinoko type="s" p="+1" title="スーパーキノコ"></kinoko>
407      <kinoko type="u" p="+1" title="1UPキノコ"></kinoko>
408      <kinoko type="d" p="+1" title="毒キノコ"></kinoko>
409      <flower p="+1" title="ファイアフラワー"></flower>
410      <star p="+1" title="スーパースター"></star>
411      <jack p="+1,-1" s=",4" title="ツタ?"></jack>
412    </item>
413  </mario2map>
414< /div>
415< div class="ml4m2m">
416  <mario2map like="1-4" s="5,5">
417    <item>
418      <axe p="3,3" title="斧"></axe>
419    </item>
420  </mario2map>
421< /div>
422</pre>
423
424
425
426
427</div>
428
429
430<div id="foot">
431</div>
432
433
434</body>
435</html>
Note: See TracBrowser for help on using the browser.