~ubuntu-branches/ubuntu/saucy/cuyo/saucy

« back to all changes in this revision

Viewing changes to datasrc/pics/dungeon.inc

  • Committer: Bazaar Package Importer
  • Author(s): Angel Abad
  • Date: 2010-07-19 09:54:44 UTC
  • mfrom: (4.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20100719095444-ecoegzo1vvvdwra9
Tags: 2.~-1.1.brl3-1ubuntu1
* Merge from debian unstable (LP: #607106). Remaining changes:
  - Don't register MimeType=application/x-executable in
    the .desktop file.
  - Remove UTF-8 in the .desktop file
  - 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
    Copyright 2006 by Mark Weyer
3
 
 
4
 
    This program is free software; you can redistribute it and/or modify
5
 
    it under the terms of the GNU General Public License as published by
6
 
    the Free Software Foundation; either version 2 of the License, or
7
 
    (at your option) any later version.
8
 
 
9
 
    This program is distributed in the hope that it will be useful,
10
 
    but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 
    GNU General Public License for more details.
13
 
 
14
 
    You should have received a copy of the GNU General Public License
15
 
    along with this program; if not, write to the Free Software
16
 
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
 
*/
18
 
 
19
 
#include "dungeon_boden.inc"
20
 
 
21
 
#declare Eigenes_Licht = 1;
22
 
 
23
 
#ifdef(Version)
24
 
  #declare Eigene_Kamera = 1;
25
 
#else
26
 
  #ifndef(Breite)
27
 
    #declare Breite = 6;
28
 
    #declare Hoehe = 2;
29
 
  #end
30
 
#end
31
 
 
32
 
#declare Hintergrund = 0;
33
 
 
34
 
#include "cuyopov.inc"
35
 
 
36
 
#declare Hoehe = 3;
37
 
#declare Ueberlappung = 0.03;
38
 
 
39
 
#declare N = array[12] {
40
 
  1, 2,  3, 2,  3, 2, 2,  5, 4,  5, 3, 3
41
 
};
42
 
#declare X = array[12][5] {
43
 
  {0,0,0,0,0}, {-1,1,0,0,0},
44
 
  {-2,0,2,0,0}, {-1,1,0,0,0},
45
 
  {-3,0,3,0,0}, {-2,1,0,0,0}, {-1,2,0,0,0},
46
 
  {-4,-2,0,2,4}, {-3,-1,1,3,0},
47
 
  {-5,-2,0,2,5}, {-4,-1,3,0,0}, {-3,1,4,0,0}
48
 
};
49
 
#declare Z = array[12] {
50
 
  1, 1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5
51
 
};
52
 
 
53
 
#declare G = array[13] {  // Der letzte Eintrag ist ein Dummy f�r den Boden
54
 
  4,4,4,4,3,3,3,3,3,2,2,2,0
55
 
};
56
 
 
57
 
#macro BlockAusWand(Wand)
58
 
  union {
59
 
    object {Wand}
60
 
    object {Wand rotate 90*y translate z}
61
 
    object {Wand rotate 180*y translate x+z}
62
 
    object {Wand rotate 270*y translate x}
63
 
  }
64
 
#end
65
 
 
66
 
#macro SetzBlock(X,Z)
67
 
  object {Block translate <X,0,Z> no_shadow}
68
 
#end
69
 
 
70
 
#macro Setze()
71
 
  #ifdef (Version)
72
 
    #local i=0;
73
 
    #while (i<N[Version])
74
 
      SetzBlock(X[Version][i],Z[Version])
75
 
      #local i=i+1;
76
 
    #end
77
 
  #else
78
 
    union {
79
 
      object {Boden translate <-1,0,-1>}
80
 
      SetzBlock(-3,0) SetzBlock(-3,-1) SetzBlock(2,0) SetzBlock(2,-1)
81
 
      union {
82
 
        SetzBlock(-1,0) SetzBlock(0,0)
83
 
        clipped_by {box {-1 1+Hoehe*y}}
84
 
      }
85
 
      rotate -90*x
86
 
    }
87
 
  #end
88
 
#end
89
 
 
90
 
 
91
 
#ifdef (Version)
92
 
 
93
 
  camera {
94
 
    location <1/2,Hoehe*2/3,1/2>
95
 
    right 2*x
96
 
    #switch (G[Version])
97
 
      #case (4) #local hoch=1; #local runter=1; #break
98
 
      #case (3) #local hoch=1/2; #local runter=1; #break
99
 
      #case (2) #local hoch=1/2; #local runter=1/2; #break
100
 
      #case (0) #local hoch=0; #local runter=1; #break
101
 
    #end
102
 
    up (hoch+runter)*y
103
 
    direction (hoch-runter)/2*y+z
104
 
  }
105
 
 
106
 
  light_source {   // Fackel in der rechten Hand
107
 
    <3/4,Hoehe*3/4,1/2>
108
 
    2
109
 
    fade_distance 2
110
 
    fade_power 2
111
 
  }
112
 
 
113
 
#else
114
 
 
115
 
  light_source {
116
 
    <-1,1,-2>*10000 2
117
 
  }
118
 
 
119
 
#end
120