/usr/share/games/cuyo/kunst.ld is in cuyo-data 2.0.0brl1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | #
# Copyright <=2004 by Immanuel Halupczok
# Modified 2006 by Bernhard Seckinger
# Modified 2006 by Immanuel Halupczok
# Maintenance modifications 2005,2006,2011 by the cuyo developers
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# The above notices apply to this file and to:
# ibkBG.xpm[.gz], ibkBunt.xpm[.gz], ibkGruen.xpm[.gz], ibkRahmen.xpm[.gz],
# ibkRot.xpm[.gz], ibkSchnecken.xpm[.gz], ibkTintenfleck.xpm[.gz],
# ibkWolkig.xpm[.gz]
#
# referenced from memory.ld
# Status: (M=Muss, S=Soll, K=Kann, F=Feature, B=Bugs)
#
# Keine bekannten Bugs
Kunst={
name = "Modern Art"
author = "Berni & Immi"
numexplode = 5
numexplode[1] = 9
chaingrass = 1
pics = motiv * 5
bgcolor = 160,160,160
topcolor = 255,196,0
toptime = 50
startpic = frame
startdist = "ABBBBBBBBC"
greypic = spot
textcolor = 255,255,0
description = "Beware of ink!"
randomgreys[1] = 200
<<
var ink = 0; # Tintenmenge auf dem Blob
var internal_kind = -1; # Aussehen der Blobs, bestimmt das Verbinden (nicht für Rahmen)
var pattern = 0; # Hilfsvariable für Nachbarverbindungen
var offset = 0; # Für Wolken.
semiglobal.row_up = { offset+=1; };
semiglobal.row_down = { offset-=1; };
# Malt den Tintenfleck
paint_ink = {
if ink>0 => {
if ink<3 => { pos = ink; *; }
else => {{C*;ink@(0,0)=2;};D*,{E*;I*@(0,1);},{F*;J*@(0,1);},{G*;K*@(0,1);ink@(0,1)+=1;};};
};
};
# Berechnet das Nachbarschaftspattern
calculate_neighbours = {
pattern = 0;
if !falling ->
{
if (internal_kind@(0,0)==internal_kind@( 0,-1)) -> pattern+=1;
if (internal_kind@(0,0)==internal_kind@( 0, 1)) -> pattern+=2;
if (internal_kind@(0,0)==internal_kind@(-1, 0)) -> pattern+=4;
if (internal_kind@(0,0)==internal_kind@( 1, 0)) -> pattern+=8;
};
};
schema16 = {
switch {
pattern == 0 -> A;
pattern == 1 -> M;
pattern == 2 -> E;
pattern == 3 -> I;
pattern == 4 -> D;
pattern == 5 -> P;
pattern == 6 -> H;
pattern == 7 -> L;
pattern == 8 -> B;
pattern == 9 -> N;
pattern == 10 -> F;
pattern == 11 -> J;
pattern == 12 -> C;
pattern == 13 -> O;
pattern == 14 -> G;
pattern == 15 -> K;
};
*
};
# Schneidet bei Bunt und bei Wolkig die Ecken ab, damit diese besser zu
# den anderen Arten passen. Zuvor muss file und pos gesetzt werden.
cut_corners = {
5;
if !falling && (pattern&5) == 0 -> { qu = Q_TL;*; };
if !falling && (pattern&6) == 0 -> { qu = Q_BL;*; };
if !falling && (pattern&9) == 0 -> { qu = Q_TR;*; };
if !falling && (pattern&10) == 0 -> { qu = Q_BR;*; };
qu = Q_ALL;
};
# Zeichnet einen Blob samt Tinte, sofern notwendig
paint_all = {
# Motiv malen
file = internal_kind;
calculate_neighbours;
if falling -> {
if internal_kind==0 || internal_kind==4 -> Q
else -> A;
*;
}
else -> {
if internal_kind == 4 -> {
pos = (loc_x + 2*(loc_p==1)) % 4 + 4 * ((loc_y+offset@@) % 4);
*;
}
else
schema16;
};
# Ecken abrunden
if internal_kind==0 -> {A;cut_corners;};
if internal_kind==4 -> {B;cut_corners;};
# Fleck malen, sofern vorhanden
6; paint_ink;
if exploding==8 -> internal_kind@(0,0)=-1; # Variablen werden nicht
# automatisch gelöscht,
# also von Hand...
};
>>
frame = {
pics = "ibkRahmen.xpm","ibkTintenfleck.xpm"
<<
frame = {
# Rahmen Zeichnen
default2g;
# Tinte Zeichnen
1;paint_ink;
};
>>
}
motiv = {
pics = "ibkBunt.xpm","ibkGruen.xpm","ibkRot.xpm","ibkSchnecken.xpm","ibkWolkig.xpm",
"ibkBG.xpm","ibkTintenfleck.xpm"
<<
motiv.init = {
internal_kind = kind-motiv;
};
motiv = {
paint_all;
};
>>
}
spot = {
pics = "ibkBunt.xpm","ibkGruen.xpm","ibkRot.xpm","ibkSchnecken.xpm","ibkWolkig.xpm",
"ibkBG.xpm","ibkTintenfleck.xpm"
<<
spot.init = {
internal_kind = -1; # -1 = fallender Tropfen
ink = 1;
};
spot = {
if internal_kind==-1 ->
{
6A*;
# In den nachfolgenden Zeilen wird internal_kind auf -2 gesetzt,
# damit die entsprechenden Blobs nicht beim Nachbarschaft
# berechnen stören.
switch {
# Tinte tropft unten raus
kind@(0,1)==outside
-> {
kind@(0,0) = nothing;
internal_kind@(0,0)=-2;
};
# Tinte tropft auf einen nichtleeren Blob
(kind@(0,1)==spot && internal_kind@(0,1)!=-1)
|| kind@(0,1)==frame
|| kind@(0,1)==0..4
-> {
if kind@(0,1)!=frame ->
kind@(0,1) = spot;
ink@(0,1)+=1;
kind@(0,0) = nothing;
internal_kind@(0,0)=-2;
};
};
}
else =>
paint_all;
};
>>
}
}
|