]> Dogcows Code - chaz/yoink/blob - data/scenes/Classic.lua
new level-based controllers
[chaz/yoink] / data / scenes / Classic.lua
1
2 -- Scene: Classic Yoink
3 -- created by Neil Carter
4 -- converted to Lua by Charles McGarvey
5
6 -- Scene API:
7 --
8 -- Functions:
9 -- SetPlayfieldBounds(point1, point2)
10 -- SetMaximumBounds(point1, point2)
11 -- ResetTransform()
12 -- Translate(x, y, z)
13 -- Scale(x, y, z) or Scale(xyz)
14 -- Rotate(axis, degree) or Rotate(x, y, z)
15 -- SetTexture(name)
16 -- MakeTilemap({width = ..., surface_type = ..., tiles = {}})
17 -- MakeBillboard({tile = ..., u_scale = ...})
18 --
19 -- Globals:
20 -- detail - level of detail of the scene
21
22
23 SetPlayfieldBounds({0, 0, -100}, {1280, 500, 100})
24 SetMaximumBounds({-160, 0, -192}, {1440, 480, 224})
25
26
27 -- Left end tower block
28 -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
29
30 -- Front
31
32 ResetTransform()
33 Translate(-5, 0, 5)
34 Scale(32)
35 SetTexture("TowerBlock1")
36 MakeTilemap({
37 width = 5,
38 tiles = {
39 2, 2, 2, 2, 2,
40 1, 0, 0, 1, 0,
41 1, 0, 0, 1, 0,
42 1, 0, 0, 1, 0,
43 1, 0, 0, 1, 0,
44 1, 0, 0, 1, 0,
45 1, 0, 0, 1, 0,
46 1, 0, 0, 1, 0,
47 1, 0, 0, 1, 0,
48 1, 0, 0, 1, 0,
49 1, 0, 0, 1, 0,
50 1, 0, 0, 1, 0,
51 1, 0, 0, 1, 0,
52 1, 0, 0, 1, 0,
53 4, 4, 4, 4, 4
54 }
55 })
56
57 -- Right side
58
59 ResetTransform()
60 Rotate(Y, 90)
61 Translate(0, 0, 5)
62 Scale(32)
63 MakeTilemap({
64 width = 5,
65 surface_type = RIGHT,
66 tiles = {
67 2, 2, 2, 2, 2,
68 0, 0, 0, 0, 0,
69 0, 0, 0, 0, 0,
70 0, 0, 0, 0, 0,
71 0, 0, 0, 0, 0,
72 0, 0, 0, 0, 0,
73 0, 0, 0, 0, 0,
74 0, 0, 0, 0, 0,
75 0, 0, 0, 0, 0,
76 0, 0, 0, 0, 0,
77 0, 0, 0, 0, 0,
78 0, 0, 0, 0, 0,
79 0, 0, 0, 0, 0,
80 0, 0, 0, 0, 6,
81 4, 5, 5, 5, 4
82 }
83 })
84
85 -- Top
86
87 ResetTransform()
88 Rotate(X, 90)
89 Translate(-5, 15, 0)
90 Scale(32)
91 MakeTilemap({
92 width = 5,
93 surface_type = TOP,
94 tiles = {
95 3, 3, 3, 3, 3,
96 3, 3, 3, 3, 3,
97 3, 3, 3, 3, 3,
98 3, 3, 3, 3, 3,
99 3, 3, 3, 3, 3
100 }
101 })
102
103 -- Leftmost background tower block
104 -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
105
106 -- Front
107
108 if detail > 1 then
109 ResetTransform()
110 Scale(32)
111 MakeTilemap({
112 width = 7,
113 tiles = {
114 2, 2, 2, 2, 2, 2, 2,
115 0, 1, 0, 0, 0, 1, 0,
116 0, 1, 0, 0, 0, 1, 0,
117 0, 1, 0, 0, 6, 1, 0,
118 0, 1, 0, 0, 0, 1, 0,
119 0, 1, 0, 0, 0, 1, 0,
120 0, 1, 0, 0, 0, 1, 0,
121 4, 4, 5, 5, 5, 4, 4
122 }
123 })
124
125 -- Right side
126
127 ResetTransform()
128 Rotate(Y, 90)
129 Translate(7, 0, 0)
130 Scale(32)
131 MakeTilemap({
132 width = 6,
133 tiles = {
134 2, 2, 2, 2, 2, 2,
135 0, 1, 0, 0, 1, 0,
136 0, 1, 0, 0, 1, 0,
137 0, 1, 0, 0, 1, 0,
138 0, 1, 0, 0, 1, 0,
139 0, 1, 0, 0, 1, 0,
140 0, 1, 0, 0, 1, 0,
141 4, 4, 4, 4, 4, 4
142 }
143 })
144
145 -- Top
146
147 ResetTransform()
148 Rotate(X, 90)
149 Translate(-2, 8, -6)
150 Scale(32)
151 MakeTilemap({
152 width = 9,
153 tiles = {
154 3, 3, 3, 3, 3, 3, 3, 3, 3,
155 3, 3, 3, 3, 3, 3, 3, 3, 3,
156 3, 3, 3, 3, 3, 3, 3, 3, 3,
157 3, 3, 3, 3, 3, 3, 3, 3, 3,
158 3, 3, 3, 3, 3, 3, 3, 3, 3,
159 3, 3, 3, 3, 3, 3, 3, 3, 3
160 }
161 })
162 end
163
164 -- Foreground building with pitched roof
165 -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
166
167 -- Left wall
168
169 ResetTransform()
170 Rotate(Y, -90)
171 Translate(10, 0, 1)
172 Scale(32)
173 SetTexture("Building")
174 MakeTilemap({
175 width = 4,
176 surface_type = LEFT,
177 tiles = {
178 -1, 9, 11, -1,
179 9, 10, 12, 11,
180 15, 7, 7, 16,
181 3, 5, 6, 4,
182 3, 6, 5, 4
183 }
184 })
185
186 -- Right wall
187
188 ResetTransform()
189 Rotate(Y, -90)
190 Translate(13, 0, 1)
191 Scale(32)
192 MakeTilemap({
193 width = 4,
194 surface_type = RIGHT,
195 tiles = {
196 -1, 9, 11, -1,
197 9, 10, 12, 11,
198 15, 7, 7, 16,
199 3, 5, 6, 4,
200 3, 8, 5, 4
201 }
202 })
203
204 -- Front wall
205
206 ResetTransform()
207 Translate(10, 0, 5)
208 Scale(32)
209 MakeTilemap({
210 width = 3,
211 tiles = {
212 15, 7, 16,
213 3, 5, 4,
214 3, 6, 4
215 }
216 })
217
218 -- Pitched roof
219
220 ResetTransform()
221 Rotate(X, 135)
222 Scale(1, 1.5, 1.5)
223 Translate(10, 5, 3)
224 Scale(32)
225 MakeTilemap({
226 width = 3,
227 tiles = {
228 13, 13, 13,
229 13, 13, 13
230 }
231 })
232
233 -- Finial
234
235 ResetTransform()
236 Translate(10, 5, 3)
237 Scale(32)
238 MakeTilemap({
239 width = 3,
240 tiles = {
241 18, 18, 18
242 }
243 })
244
245 -- Cheaty invisible platform
246
247 ResetTransform()
248 Translate(10, 4, 3)
249 Scale(32)
250 MakeTilemap({
251 width = 3,
252 surface_type = TOP,
253 tiles = {
254 -1, -1, -1
255 }
256 })
257
258 -- The ground
259 -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
260
261 -- Courtyard
262
263 ResetTransform()
264 Rotate(X, 90)
265 Translate(-3, 0, 0)
266 Scale(32)
267 SetTexture("Scenery")
268 MakeTilemap({
269 width = 13,
270 surface_type = TOP,
271 tiles = {
272 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
273 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
274 -1, -1, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1,
275 -1, -1, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1,
276 -1, -1, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1,
277 -1, -1, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1,
278 -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
279 }
280 })
281
282 -- Front grass
283
284 if detail > 2 then
285 ResetTransform()
286 Scale(8, 1, 1)
287 Translate(1, -0.5, 5)
288 Scale(32)
289 MakeBillboard({
290 tile = 2,
291 u_scale = 8
292 })
293
294 -- Back grass
295
296 ResetTransform()
297 Scale(8, 1, 1)
298 Translate(1, -0.5, 1)
299 Scale(32)
300 MakeBillboard({
301 tile = 2,
302 u_scale = 8
303 })
304
305 -- Left grass
306
307 ResetTransform()
308 Scale(4, 1, 1)
309 Rotate(Y, -90)
310 Translate(1, -0.5, 1)
311 Scale(32)
312 MakeBillboard({
313 tile = 2,
314 u_scale = 4
315 })
316
317 -- Right grass
318
319 ResetTransform()
320 Scale(4, 1, 1)
321 Rotate(Y, -90)
322 Translate(9, -0.5, 1)
323 Scale(32)
324 MakeBillboard({
325 tile = 2,
326 u_scale = 4
327 })
328
329 -- Fence behind house
330
331 ResetTransform()
332 Scale(11, 1, 1)
333 Translate(7, 0, 0)
334 Scale(32)
335 MakeBillboard({
336 tile = 4,
337 u_scale = 11
338 })
339 end
340
341 -- Background building with pitched roof
342 -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
343
344 -- Front wall
345
346 if detail > 1 then
347 ResetTransform()
348 Translate(19, 0, 0)
349 Scale(32)
350 SetTexture("Building")
351 MakeTilemap({
352 width = 4,
353 tiles = {
354 -1, 9, 11, -1,
355 9, 10, 12, 11,
356 15, 7, 7, 16,
357 3, 6, 5, 4,
358 3, 5, 6, 4,
359 3, 8, 5, 4
360 }
361 })
362
363 -- Left wall
364
365 ResetTransform()
366 Rotate(Y, -90)
367 Translate(19, 0, -3)
368 Scale(32)
369 MakeTilemap({
370 width = 3,
371 tiles = {
372 15, 1, 16,
373 3, 7, 4,
374 3, 5, 4,
375 3, 0, 4
376 }
377 })
378
379 -- Right wall
380
381 ResetTransform()
382 Rotate(Y, -90)
383 Translate(23, 0, -3)
384 Scale(32)
385 MakeTilemap({
386 width = 3,
387 tiles = {
388 15, 0, 16,
389 3, 7, 4,
390 3, 6, 4,
391 3, 2, 4
392 }
393 })
394
395 -- Left pitched roof
396
397 ResetTransform()
398 Rotate(X, 135)
399 Scale(1, 1.5, 1.5)
400 Rotate(Y, -90)
401 Translate(21, 6, -3)
402 Scale(32)
403 MakeTilemap({
404 width = 3,
405 tiles = {
406 13, 13, 13,
407 13, 13, 13
408 }
409 })
410
411 -- Right pitched roof
412
413 ResetTransform()
414 Rotate(X, -135)
415 Scale(1, 1.5, 1.5)
416 Rotate(Y, -90)
417 Translate(21, 6, -3)
418 Scale(32)
419 MakeTilemap({
420 width = 3,
421 tiles = {
422 13, 13, 13,
423 13, 13, 13
424 }
425 })
426
427 -- Finial
428
429 ResetTransform()
430 Rotate(Y, -90)
431 Translate(21, 6, -3)
432 Scale(32)
433 MakeTilemap({
434 width = 3,
435 tiles = {
436 18, 18, 18
437 }
438 })
439 end
440
441 -- More ground to the right
442 -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
443
444 -- Ground under house
445
446 ResetTransform()
447 Rotate(X, 90)
448 Translate(10, 0, 0)
449 Scale(32)
450 SetTexture("Scenery")
451 MakeTilemap({
452 width = 3,
453 surface_type = TOP,
454 tiles = {
455 1, 1, 1,
456 1, 1, 1,
457 -1, -1, -1,
458 -1, -1, -1,
459 -1, -1, -1,
460 -1, -1, -1,
461 1, 1, 1
462 }
463 })
464
465 -- Left part of center courtyard
466
467 ResetTransform()
468 Rotate(X, 90)
469 Translate(13, 0, 0)
470 Scale(32)
471 MakeTilemap({
472 width = 8,
473 surface_type = TOP,
474 tiles = {
475 1, 1, 1, 1, 1, 1, 1, 1,
476 1, 1, 1, 1, 1, 1, 1, 1,
477 1, 0, 0, 0, 0, 0, 0, 0,
478 1, 0, 0, 0, 0, 0, 1, 1,
479 0, 0, 0, 0, 0, 0, 1, 1,
480 1, 0, 0, 0, 0, 0, 0, 0,
481 1, 1, 1, 1, 1, 0, 0, 0
482 }
483 })
484
485 -- Front grass
486
487 if detail > 2 then
488 ResetTransform()
489 Scale(12, 1, 1)
490 Translate(14, -0.5, 5)
491 Scale(32)
492 MakeBillboard({
493 tile = 2,
494 u_scale = 12
495 })
496
497 -- Back grass
498
499 ResetTransform()
500 Scale(4, 1, 1)
501 Translate(14, -0.5, 1)
502 Scale(32)
503 MakeBillboard({
504 tile = 2,
505 u_scale = 4
506 })
507
508 -- Front grass next to door
509
510 ResetTransform()
511 Translate(13, -0.5, 3)
512 Scale(32)
513 MakeBillboard({
514 tile = 2,
515 u_scale = 1
516 })
517
518 -- Back grass next to door
519
520 ResetTransform()
521 Translate(13, -0.5, 2)
522 Scale(32)
523 MakeBillboard({
524 tile = 2,
525 u_scale = 1
526 })
527
528 -- Left grass
529
530 ResetTransform()
531 Rotate(Y, -90)
532 Translate(14, -0.5, 1)
533 Scale(32)
534 MakeTilemap({
535 width = 4,
536 tiles = {
537 2, -1, 2, 2
538 }
539 })
540
541 -- Grass left of house
542
543 ResetTransform()
544 Rotate(Y, -90)
545 Translate(18, -0.5, 0)
546 Scale(32)
547 MakeBillboard({
548 tile = 2,
549 u_scale = 1
550 })
551
552 -- Grass right of house
553
554 ResetTransform()
555 Rotate(Y, -90)
556 Translate(24, -0.5, 0)
557 Scale(32)
558 MakeBillboard({
559 tile = 2,
560 u_scale = 1
561 })
562
563 -- Front grass in center
564
565 ResetTransform()
566 Scale(4, 1, 1)
567 Translate(19, -0.5, 4)
568 Scale(32)
569 MakeBillboard({
570 tile = 2,
571 u_scale = 4
572 })
573
574 -- Back grass in center
575
576 ResetTransform()
577 Scale(4, 1, 1)
578 Translate(19, -0.5, 2)
579 Scale(32)
580 MakeBillboard({
581 tile = 2,
582 u_scale = 4
583 })
584
585 -- Left grass in center
586
587 ResetTransform()
588 Scale(2, 1, 1)
589 Rotate(Y, -90)
590 Translate(19, -0.5, 2)
591 Scale(32)
592 MakeBillboard({
593 tile = 2,
594 u_scale = 2
595 })
596
597 -- Right grass in center
598
599 ResetTransform()
600 Scale(2, 1, 1)
601 Rotate(Y, -90)
602 Translate(23, -0.5, 2)
603 Scale(32)
604 MakeBillboard({
605 tile = 2,
606 u_scale = 2
607 })
608 end
609
610 -- Right part of center courtyard
611
612 ResetTransform()
613 Rotate(X, 90)
614 Translate(21, 0, 0)
615 Scale(32)
616 MakeTilemap({
617 width = 7,
618 surface_type = TOP,
619 tiles = {
620 1, 1, 1, 1, 1, 0, 0,
621 1, 1, 1, 1, 1, 0, 0,
622 0, 0, 0, 0, 0, 0, 0,
623 1, 1, 0, 0, 0, 0, 0,
624 1, 1, 0, 0, 0, 0, 0,
625 0, 0, 0, 0, 0, 0, 0,
626 0, 0, 0, 1, 1, 1, 1
627 }
628 })
629
630 -- Fence to right of back house
631
632 if detail > 2 then
633 ResetTransform()
634 Scale(4, 1, 1)
635 Translate(24, 0, 0)
636 Scale(32)
637 MakeBillboard({
638 tile = 4,
639 u_scale = 4
640 })
641
642 -- Grass in front of fence
643
644 ResetTransform()
645 Scale(4, 1, 1)
646 Translate(24, -0.5, 1)
647 Scale(32)
648 MakeBillboard({
649 tile = 2,
650 u_scale = 4
651 })
652
653 -- Grass to left of tower block
654
655 ResetTransform()
656 Scale(2, 1, 1)
657 Rotate(Y, -90)
658 Translate(26, -0.5, 5)
659 Scale(32)
660 MakeBillboard({
661 tile = 2,
662 u_scale = 2
663 })
664
665 -- Grass to right of tower block
666
667 ResetTransform()
668 Scale(2, 1, 1)
669 Rotate(Y, -90)
670 Translate(35, -0.5, 5)
671 Scale(32)
672 MakeBillboard({
673 tile = 2,
674 u_scale = 2
675 })
676
677 -- Next bit of grass
678
679 ResetTransform()
680 Scale(5, 1, 1)
681 Translate(35, -0.5, 5)
682 Scale(32)
683 MakeBillboard({
684 tile = 2,
685 u_scale = 5
686 })
687
688 -- Back grass
689
690 ResetTransform()
691 Scale(6, 1, 1)
692 Translate(34, -0.5, 1)
693 Scale(32)
694 MakeBillboard({
695 tile = 2,
696 u_scale = 6
697 })
698
699 -- Extra bit of back grass
700
701 ResetTransform()
702 Rotate(Y, -90)
703 Translate(34, -0.5, 0)
704 Scale(32)
705 MakeBillboard({
706 tile = 2,
707 u_scale = 1
708 })
709 end
710
711 -- Ground around tower block
712
713 ResetTransform()
714 Rotate(X, 90)
715 Translate(28, 0, 4)
716 Scale(32)
717 MakeTilemap({
718 width = 5,
719 surface_type = TOP,
720 tiles = {
721 0, 0, 0, 0, 0,
722 0, 0, 0, 0, 0,
723 0, 0, 0, 0, 0
724 }
725 })
726
727 -- Rightmost ground
728
729 ResetTransform()
730 Rotate(X, 90)
731 Translate(33, 0, 0)
732 Scale(32)
733 MakeTilemap({
734 width = 10,
735 surface_type = TOP,
736 tiles = {
737 0, 0, 1, 1, 1, 1, 1, 1, 1, 1,
738 0, 0, 1, 1, 1, 1, 1, 1, 1, 1,
739 0, 0, 0, 0, 0, 0, 0, -1, -1, -1,
740 0, 0, 0, 0, 0, 0, 0, -1, -1, -1,
741 0, 0, 0, 0, 0, 0, 0, -1, -1, -1,
742 0, 0, 0, 0, 0, 0, 0, -1, -1, -1,
743 0, 1, 1, 1, 1, 1, 1, -1, -1, -1
744 }
745 })
746
747 -- Right foreground tower block
748 -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
749
750 -- Front
751
752 ResetTransform()
753 Translate(28, 0, 4)
754 Scale(32)
755 SetTexture("TowerBlock1")
756 MakeTilemap({
757 width = 5,
758 tiles = {
759 2, 2, 2, 2, 2,
760 0, 0, 0, 0, 0,
761 0, 0, 0, 0, 6,
762 0, 0, 0, 0, 0,
763 0, 0, 0, 0, 0,
764 0, 0, 0, 6, 0,
765 4, 4, 4, 4, 4
766 }
767 })
768
769 -- Right side
770
771 ResetTransform()
772 Rotate(Y, 90)
773 Translate(33, 0, 4)
774 Scale(32)
775 MakeTilemap({
776 width = 6,
777 surface_type = RIGHT,
778 tiles = {
779 2, 2, 2, 2, 2, 2,
780 0, 1, 0, 0, 1, 0,
781 0, 1, 0, 0, 1, 0,
782 0, 1, 0, 0, 1, 0,
783 0, 1, 0, 0, 1, 0,
784 0, 1, 0, 0, 1, 0,
785 5, 4, 5, 5, 4, 5
786 }
787 })
788
789 -- Left side
790
791 ResetTransform()
792 Rotate(Y, 90)
793 Translate(28, 0, 4)
794 Scale(32)
795 MakeTilemap({
796 width = 6,
797 surface_type = LEFT,
798 tiles = {
799 2, 2, 2, 2, 2, 2,
800 0, 1, 6, 0, 1, 0,
801 0, 1, 0, 0, 1, 0,
802 0, 1, 0, 0, 1, 0,
803 0, 1, 0, 0, 1, 0,
804 0, 1, 0, 0, 1, 0,
805 5, 4, 5, 5, 4, 5
806 }
807 })
808
809 -- Top
810
811 ResetTransform()
812 Rotate(X, 90)
813 Translate(28, 7, -2)
814 Scale(32)
815 MakeTilemap({
816 width = 5,
817 surface_type = TOP,
818 tiles = {
819 3, 3, 3, 3, 3,
820 3, 3, 3, 3, 3,
821 3, 3, 3, 3, 3,
822 3, 3, 3, 3, 3,
823 3, 3, 3, 3, 3,
824 3, 3, 3, 3, 3
825 }
826 })
827
828 -- Right end tower block
829 -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
830
831 -- Front
832
833 ResetTransform()
834 Translate(40, 0, 5)
835 Scale(32)
836 MakeTilemap({
837 width = 5,
838 tiles = {
839 2, 2, 2, 2, 2,
840 0, 1, 0, 0, 1,
841 0, 1, 0, 0, 1,
842 0, 1, 0, 0, 1,
843 0, 1, 0, 0, 1,
844 6, 1, 0, 0, 1,
845 0, 1, 0, 0, 1,
846 0, 1, 0, 0, 1,
847 0, 1, 0, 0, 1,
848 0, 1, 0, 0, 1,
849 0, 1, 0, 0, 1,
850 6, 1, 0, 0, 1,
851 0, 1, 0, 0, 1,
852 0, 1, 0, 0, 1,
853 4, 4, 4, 4, 4
854 }
855 })
856
857 -- Left side
858
859 ResetTransform()
860 Rotate(Y, 90)
861 Translate(40, 0, 5)
862 Scale(32)
863 MakeTilemap({
864 width = 5,
865 surface_type = LEFT,
866 tiles = {
867 2, 2, 2, 2, 2,
868 6, 0, 0, 0, 0,
869 0, 0, 0, 0, 0,
870 0, 0, 0, 0, 0,
871 0, 0, 0, 6, 0,
872 0, 0, 0, 0, 0,
873 0, 0, 0, 0, 0,
874 0, 0, 6, 0, 0,
875 0, 0, 0, 0, 0,
876 0, 0, 0, 0, 0,
877 0, 0, 0, 0, 0,
878 0, 0, 0, 0, 0,
879 0, 0, 0, 0, 0,
880 0, 0, 0, 0, 0,
881 4, 5, 5, 5, 4
882 }
883 })
884
885 -- Top
886
887 ResetTransform()
888 Rotate(X, 90)
889 Translate(40, 15, 0)
890 Scale(32)
891 MakeTilemap({
892 width = 5,
893 surface_type = TOP,
894 tiles = {
895 3, 3, 3, 3, 3,
896 3, 3, 3, 3, 3,
897 3, 3, 3, 3, 3,
898 3, 3, 3, 3, 3,
899 3, 3, 3, 3, 3
900 }
901 })
902
903 -- Background
904 -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
905
906 ResetTransform()
907 Translate(-0.3, -0.17, -900)
908 Scale(3200, 1600, 1)
909 SetTexture("BackgroundFar")
910 MakeBillboard()
911
912 Translate(0, 0, 300)
913 SetTexture("BackgroundNear")
914 MakeBillboard({
915 blend = detail > 1 and true or false
916 })
917
918 -- Trees
919 -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
920
921 SetTexture("Trees")
922
923 -- Left courtyard
924
925 if detail > 1 then
926 ResetTransform()
927 Scale(96)
928 Translate(250, -2.5, 16)
929 MakeBillboard({
930 tile = 1
931 })
932 end
933
934 -- Center courtyard
935
936 ResetTransform()
937 Scale(96)
938 Translate(610, -2.5, 85)
939 MakeBillboard({
940 tile = 0
941 })
942
943 ResetTransform()
944 Scale(96)
945 Translate(650, -2.5, 115)
946 MakeBillboard({
947 tile = 1
948 })
949
950 -- Right courtyard
951
952 if detail > 1 then
953 ResetTransform()
954 Scale(96)
955 Translate(1080, -2.5, 10)
956 MakeBillboard({
957 tile = 1
958 })
959
960 ResetTransform()
961 Scale(96)
962 Translate(1120, -2.5, -15)
963 MakeBillboard({
964 tile = 0
965 })
966
967 ResetTransform()
968 Scale(96)
969 Translate(1220, -2.5, -30)
970 MakeBillboard({
971 tile = 1
972 })
973 end
974
This page took 0.086419 seconds and 5 git commands to generate.