* Added colored lights (thanks to StaticZ :-))

This commit is contained in:
Andreas Schneider 2015-05-10 11:42:05 +02:00
parent 937cfb6323
commit f3f5d12c2f
3 changed files with 1102 additions and 2 deletions

975
Client.bin/ColorLight.xml Normal file
View File

@ -0,0 +1,975 @@
<?xml version="1.0" ?>
<ColorLight Version="1 (24.08.2014)" Server="uoquint.ru" Author="StaticZ">
<Colors> <!-- NOTE: ALLOWED ONLY COLORS WITH IDs FROM 1 TO 15 -->
<Color id="1" r="0xFF" g="0xFF" b="0xFF" name="Default"/>
<Color id="2" r="0xFF" g="0xFF" b="0xFF" name="Bright White"/>
<Color id="3" r="0xE0" g="0xE0" b="0xE0" name="White"/>
<Color id="4" r="0xFF" g="0x80" b="0x00" name="Bright Orange"/>
<Color id="5" r="0xB6" g="0x5C" b="0x00" name="Thin Orange"/>
<Color id="6" r="0xFF" g="0xFF" b="0x00" name="Bright Yellow"/>
<Color id="7" r="0x80" g="0x80" b="0x00" name="Thin Yellow"/>
<Color id="8" r="0xB6" g="0xB6" b="0x00" name="Yellow"/>
<Color id="9" r="0x80" g="0x80" b="0xFF" name="Bright Lilac"/>
<Color id="10" r="0x00" g="0x00" b="0xFF" name="Bright Blue"/>
<Color id="11" r="0x00" g="0x00" b="0x80" name="Thin Blue"/>
<Color id="12" r="0x00" g="0xFF" b="0x00" name="Bright Green"/>
<Color id="13" r="0x00" g="0x80" b="0x00" name="Thin Green"/>
<Color id="14" r="0xFF" g="0x00" b="0x00" name="Bright Red"/>
<Color id="15" r="0xFF" g="0x00" b="0xFF" name="Bright Pink"/>
</Colors>
<Sources>
<!-- Original Tiles -->
<Item ID="0x398C" color="2" />
<Item ID="0x398D" color="2" />
<Item ID="0x398E" color="2" />
<Item ID="0x398F" color="2" />
<Item ID="0x3990" color="2" />
<Item ID="0x3991" color="2" />
<Item ID="0x3992" color="2" />
<Item ID="0x3993" color="2" />
<Item ID="0x3994" color="2" />
<Item ID="0x3995" color="2" />
<Item ID="0x3996" color="2" />
<Item ID="0x3997" color="2" />
<Item ID="0x3998" color="2" />
<Item ID="0x3999" color="2" />
<Item ID="0x399A" color="2" />
<Item ID="0x399B" color="2" />
<Item ID="0x399C" color="2" />
<Item ID="0x399D" color="2" />
<Item ID="0x399E" color="2" />
<Item ID="0x399F" color="2" />
<Item ID="0x088C" color="5" />
<Item ID="0x0FAC" color="4" />
<Item ID="0x0FB1" color="8" />
<Item ID="0x1647" color="7" />
<Item ID="0x19BB" color="14" />
<Item ID="0x1F2B" color="14" />
<Item ID="0x1ECD" color="13" />
<Item ID="0x1ECE" color="13" />
<Item ID="0x1ECF" color="13" />
<Item ID="0x1ED0" color="13" />
<Item ID="0x1ED1" color="13" />
<Item ID="0x1ED2" color="13" />
<Item ID="0x19AB" color="8" />
<Item ID="0x19AC" color="8" />
<Item ID="0x19AD" color="8" />
<Item ID="0x19AE" color="8" />
<Item ID="0x19AF" color="8" />
<Item ID="0x19B0" color="8" />
<Item ID="0x19B1" color="8" />
<Item ID="0x19B2" color="8" />
<Item ID="0x19B3" color="8" />
<Item ID="0x19B4" color="8" />
<Item ID="0x19B5" color="8" />
<Item ID="0x19B6" color="8" />
<Item ID="0x197A" color="8" />
<Item ID="0x197B" color="8" />
<Item ID="0x197C" color="8" />
<Item ID="0x197D" color="8" />
<Item ID="0x197E" color="8" />
<Item ID="0x197F" color="8" />
<Item ID="0x1980" color="8" />
<Item ID="0x1981" color="8" />
<Item ID="0x1982" color="8" />
<Item ID="0x1983" color="8" />
<Item ID="0x1984" color="8" />
<Item ID="0x1985" color="8" />
<Item ID="0x1986" color="8" />
<Item ID="0x1987" color="8" />
<Item ID="0x1988" color="8" />
<Item ID="0x1989" color="8" />
<Item ID="0x198A" color="8" />
<Item ID="0x198B" color="8" />
<Item ID="0x198C" color="8" />
<Item ID="0x198D" color="8" />
<Item ID="0x198E" color="8" />
<Item ID="0x198F" color="8" />
<Item ID="0x1990" color="8" />
<Item ID="0x1991" color="8" />
<Item ID="0x1992" color="8" />
<Item ID="0x1993" color="8" />
<Item ID="0x1994" color="8" />
<Item ID="0x1995" color="8" />
<Item ID="0x1996" color="8" />
<Item ID="0x1997" color="8" />
<Item ID="0x1998" color="8" />
<Item ID="0x1999" color="8" />
<Item ID="0x199A" color="8" />
<Item ID="0x199B" color="8" />
<Item ID="0x199C" color="8" />
<Item ID="0x199D" color="8" />
<Item ID="0x199E" color="8" />
<Item ID="0x199F" color="8" />
<Item ID="0x19A0" color="8" />
<Item ID="0x19A1" color="8" />
<Item ID="0x19A2" color="8" />
<Item ID="0x19A3" color="8" />
<Item ID="0x19A4" color="8" />
<Item ID="0x19A5" color="8" />
<Item ID="0x19A6" color="8" />
<Item ID="0x19A7" color="8" />
<Item ID="0x19A8" color="8" />
<Item ID="0x19A9" color="8" />
<Item ID="0x1853" color="7" />
<Item ID="0x1854" color="7" />
<Item ID="0x1855" color="7" />
<Item ID="0x1856" color="7" />
<Item ID="0x1857" color="7" />
<Item ID="0x1858" color="7" />
<Item ID="0x1859" color="7" />
<Item ID="0x185A" color="7" />
<Item ID="0x1849" color="7" />
<Item ID="0x184A" color="7" />
<Item ID="0x184B" color="7" />
<Item ID="0x184C" color="7" />
<Item ID="0x184D" color="7" />
<Item ID="0x184E" color="7" />
<Item ID="0x184F" color="7" />
<Item ID="0x1850" color="7" />
<Item ID="0x0DE1" color="5" />
<Item ID="0x0DE2" color="5" />
<Item ID="0x0DE3" color="5" />
<Item ID="0x0DE4" color="5" />
<Item ID="0x0DE5" color="5" />
<Item ID="0x0DE6" color="5" />
<Item ID="0x0DE7" color="5" />
<Item ID="0x0DE8" color="5" />
<Item ID="0x0DE9" color="5" />
<Item ID="0x0DEA" color="5" />
<Item ID="0x0B26" color="2" />
<Item ID="0x0B27" color="2" />
<Item ID="0x0B28" color="2" />
<Item ID="0x0B20" color="2" />
<Item ID="0x0B21" color="2" />
<Item ID="0x0B22" color="2" />
<Item ID="0x0B23" color="2" />
<Item ID="0x0B24" color="2" />
<Item ID="0x0B25" color="2" />
<Item ID="0x0B1A" color="2" />
<Item ID="0x0B1B" color="2" />
<Item ID="0x0B1C" color="2" />
<Item ID="0x0B1D" color="2" />
<Item ID="0x0B1E" color="2" />
<Item ID="0x0B1F" color="2" />
<Item ID="0x0A15" color="2" />
<Item ID="0x0A16" color="2" />
<Item ID="0x0A17" color="2" />
<Item ID="0x0A18" color="2" />
<Item ID="0x0A19" color="2" />
<Item ID="0x0A1A" color="2" />
<Item ID="0x0A1B" color="2" />
<Item ID="0x0A1C" color="2" />
<Item ID="0x0A1D" color="2" />
<Item ID="0x0A1E" color="2" />
<Item ID="0x0A1F" color="2" />
<Item ID="0x0A20" color="2" />
<Item ID="0x0A21" color="2" />
<Item ID="0x0A22" color="2" />
<Item ID="0x0A23" color="2" />
<Item ID="0x0A24" color="2" />
<Item ID="0x0A25" color="2" />
<Item ID="0x0A26" color="2" />
<Item ID="0x0A27" color="2" />
<Item ID="0x0A28" color="2" />
<Item ID="0x0A29" color="2" />
<Item ID="0x09FB" color="4" />
<Item ID="0x09FC" color="4" />
<Item ID="0x09FD" color="4" />
<Item ID="0x09FE" color="4" />
<Item ID="0x09FF" color="4" />
<Item ID="0x0A00" color="4" />
<Item ID="0x0A01" color="4" />
<Item ID="0x0A02" color="4" />
<Item ID="0x0A03" color="4" />
<Item ID="0x0A04" color="4" />
<Item ID="0x0A05" color="4" />
<Item ID="0x0A06" color="4" />
<Item ID="0x0A07" color="4" />
<Item ID="0x0A08" color="4" />
<Item ID="0x0A09" color="4" />
<Item ID="0x0A0A" color="4" />
<Item ID="0x0A0B" color="4" />
<Item ID="0x0A0C" color="4" />
<Item ID="0x0A0D" color="4" />
<Item ID="0x0A0E" color="4" />
<Item ID="0x0A0F" color="4" />
<Item ID="0x0A10" color="4" />
<Item ID="0x0A11" color="4" />
<Item ID="0x0A12" color="4" />
<Item ID="0x0A13" color="4" />
<Item ID="0x0A14" color="4" />
<Item ID="0x1FD4" color="9" />
<Item ID="0x0F6C" color="9" />
<Item ID="0x40FE" color="14" />
<Item ID="0x40FF" color="10" />
<Item ID="0x4100" color="12" />
<Item ID="0x4101" color="15" />
<Item ID="0x3E27" color="5" />
<Item ID="0x3E28" color="5" />
<Item ID="0x3E29" color="5" />
<Item ID="0x3E2A" color="5" />
<Item ID="0x3E2B" color="5" />
<Item ID="0x3E2C" color="5" />
<Item ID="0x3E2D" color="5" />
<Item ID="0x3E2E" color="5" />
<Item ID="0x3E2F" color="5" />
<Item ID="0x3E30" color="5" />
<Item ID="0x3E31" color="5" />
<Item ID="0x3E32" color="5" />
<Item ID="0x3E33" color="5" />
<Item ID="0x3E34" color="5" />
<Item ID="0x3E35" color="5" />
<Item ID="0x3E36" color="5" />
<Item ID="0x3E37" color="5" />
<Item ID="0x3E38" color="5" />
<Item ID="0x3E39" color="5" />
<Item ID="0x3E3A" color="5" />
<Item ID="0x3E02" color="13" />
<Item ID="0x3E03" color="13" />
<Item ID="0x3E04" color="13" />
<Item ID="0x3E05" color="13" />
<Item ID="0x3E06" color="13" />
<Item ID="0x3E07" color="13" />
<Item ID="0x3E08" color="13" />
<Item ID="0x3E09" color="13" />
<Item ID="0x3E0A" color="13" />
<Item ID="0x3E0B" color="13" />
<Item ID="0x398C" color="5" />
<Item ID="0x398D" color="5" />
<Item ID="0x398E" color="5" />
<Item ID="0x398F" color="5" />
<Item ID="0x3990" color="5" />
<Item ID="0x3991" color="5" />
<Item ID="0x3992" color="5" />
<Item ID="0x3993" color="5" />
<Item ID="0x3994" color="5" />
<Item ID="0x3995" color="5" />
<Item ID="0x3996" color="5" />
<Item ID="0x3997" color="5" />
<Item ID="0x3998" color="5" />
<Item ID="0x3999" color="5" />
<Item ID="0x399A" color="5" />
<Item ID="0x399B" color="5" />
<Item ID="0x399C" color="5" />
<Item ID="0x399D" color="5" />
<Item ID="0x399E" color="5" />
<Item ID="0x399F" color="5" />
<Item ID="0x3967" color="11" />
<Item ID="0x3968" color="11" />
<Item ID="0x3969" color="11" />
<Item ID="0x396A" color="11" />
<Item ID="0x396B" color="11" />
<Item ID="0x396C" color="11" />
<Item ID="0x396D" color="11" />
<Item ID="0x396E" color="11" />
<Item ID="0x396F" color="11" />
<Item ID="0x3970" color="11" />
<Item ID="0x3971" color="11" />
<Item ID="0x3972" color="11" />
<Item ID="0x3973" color="11" />
<Item ID="0x3974" color="11" />
<Item ID="0x3975" color="11" />
<Item ID="0x3976" color="11" />
<Item ID="0x3977" color="11" />
<Item ID="0x3978" color="11" />
<Item ID="0x3979" color="11" />
<Item ID="0x397A" color="11" />
<Item ID="0x3946" color="11" />
<Item ID="0x3947" color="11" />
<Item ID="0x3948" color="11" />
<Item ID="0x3949" color="11" />
<Item ID="0x394A" color="11" />
<Item ID="0x394B" color="11" />
<Item ID="0x394C" color="11" />
<Item ID="0x394D" color="11" />
<Item ID="0x394E" color="11" />
<Item ID="0x394F" color="11" />
<Item ID="0x3950" color="11" />
<Item ID="0x3951" color="11" />
<Item ID="0x3952" color="11" />
<Item ID="0x3953" color="11" />
<Item ID="0x3954" color="11" />
<Item ID="0x3955" color="11" />
<Item ID="0x3956" color="11" />
<Item ID="0x3957" color="11" />
<Item ID="0x3958" color="11" />
<Item ID="0x3959" color="11" />
<Item ID="0x395A" color="11" />
<Item ID="0x395B" color="11" />
<Item ID="0x395C" color="11" />
<Item ID="0x395D" color="11" />
<Item ID="0x395E" color="11" />
<Item ID="0x395F" color="11" />
<Item ID="0x3960" color="11" />
<Item ID="0x3961" color="11" />
<Item ID="0x3962" color="11" />
<Item ID="0x3963" color="11" />
<Item ID="0x3964" color="11" />
<Item ID="0x3914" color="13" />
<Item ID="0x3915" color="13" />
<Item ID="0x3916" color="13" />
<Item ID="0x3917" color="13" />
<Item ID="0x3918" color="13" />
<Item ID="0x3919" color="13" />
<Item ID="0x391A" color="13" />
<Item ID="0x391B" color="13" />
<Item ID="0x391C" color="13" />
<Item ID="0x391D" color="13" />
<Item ID="0x391E" color="13" />
<Item ID="0x391F" color="13" />
<Item ID="0x3920" color="13" />
<Item ID="0x3921" color="13" />
<Item ID="0x3922" color="13" />
<Item ID="0x3923" color="13" />
<Item ID="0x3924" color="13" />
<Item ID="0x3925" color="13" />
<Item ID="0x3926" color="13" />
<Item ID="0x3927" color="13" />
<Item ID="0x3928" color="13" />
<Item ID="0x3929" color="13" />
<Item ID="0x3547" color="5" />
<Item ID="0x3548" color="5" />
<Item ID="0x3549" color="5" />
<Item ID="0x354A" color="5" />
<Item ID="0x354B" color="5" />
<Item ID="0x354C" color="5" />
<Item ID="0x343B" color="5" />
<Item ID="0x343C" color="5" />
<Item ID="0x343D" color="5" />
<Item ID="0x343E" color="5" />
<Item ID="0x343F" color="5" />
<Item ID="0x3440" color="5" />
<Item ID="0x3441" color="5" />
<Item ID="0x3442" color="5" />
<Item ID="0x3443" color="5" />
<Item ID="0x3444" color="5" />
<Item ID="0x3445" color="5" />
<Item ID="0x3446" color="5" />
<Item ID="0x3447" color="5" />
<Item ID="0x3448" color="5" />
<Item ID="0x3449" color="5" />
<Item ID="0x344A" color="5" />
<Item ID="0x344B" color="5" />
<Item ID="0x344C" color="5" />
<Item ID="0x344D" color="5" />
<Item ID="0x344E" color="5" />
<Item ID="0x344F" color="5" />
<Item ID="0x3450" color="5" />
<Item ID="0x3451" color="5" />
<Item ID="0x3452" color="5" />
<Item ID="0x3453" color="5" />
<Item ID="0x3454" color="5" />
<Item ID="0x3455" color="5" />
<Item ID="0x3456" color="5" />
<Item ID="0x3457" color="5" />
<Item ID="0x3458" color="5" />
<Item ID="0x3459" color="5" />
<Item ID="0x345A" color="5" />
<Item ID="0x345B" color="5" />
<Item ID="0x345C" color="5" />
<Item ID="0x345D" color="5" />
<Item ID="0x345E" color="5" />
<Item ID="0x345F" color="5" />
<Item ID="0x3460" color="5" />
<Item ID="0x3461" color="5" />
<Item ID="0x3462" color="5" />
<Item ID="0x3463" color="5" />
<Item ID="0x3464" color="5" />
<Item ID="0x3465" color="5" />
<Item ID="0x3466" color="5" />
<Item ID="0x3467" color="5" />
<Item ID="0x3468" color="5" />
<Item ID="0x3469" color="5" />
<Item ID="0x346A" color="5" />
<Item ID="0x346B" color="5" />
<Item ID="0x346C" color="5" />
<Item ID="0x306A" color="5" />
<Item ID="0x306B" color="5" />
<Item ID="0x306C" color="5" />
<Item ID="0x306D" color="5" />
<Item ID="0x306E" color="5" />
<Item ID="0x306F" color="5" />
<Item ID="0x3070" color="5" />
<Item ID="0x3071" color="5" />
<Item ID="0x3072" color="5" />
<Item ID="0x3073" color="5" />
<Item ID="0x3074" color="5" />
<Item ID="0x3075" color="5" />
<Item ID="0x3076" color="5" />
<Item ID="0x3077" color="5" />
<Item ID="0x3078" color="5" />
<Item ID="0x3079" color="5" />
<Item ID="0x307A" color="5" />
<Item ID="0x307B" color="5" />
<Item ID="0x307C" color="5" />
<Item ID="0x307D" color="5" />
<Item ID="0x307E" color="5" />
<Item ID="0x307F" color="5" />
<Item ID="0x3080" color="5" />
<Item ID="0x3081" color="5" />
<Item ID="0x3082" color="5" />
<Item ID="0x3083" color="5" />
<Item ID="0x3084" color="5" />
<Item ID="0x3085" color="5" />
<Item ID="0x3086" color="5" />
<Item ID="0x3087" color="5" />
<Item ID="0x3088" color="5" />
<Item ID="0x3089" color="5" />
<Item ID="0x308A" color="5" />
<Item ID="0x308B" color="5" />
<Item ID="0x308C" color="5" />
<Item ID="0x308D" color="5" />
<Item ID="0x308E" color="5" />
<Item ID="0x308F" color="5" />
<Item ID="0x3090" color="5" />
<Item ID="0x3091" color="5" />
<Item ID="0x3092" color="5" />
<Item ID="0x3093" color="5" />
<Item ID="0x3094" color="5" />
<Item ID="0x3095" color="5" />
<Item ID="0x3096" color="5" />
<Item ID="0x3097" color="5" />
<Item ID="0x3098" color="5" />
<Item ID="0x3099" color="5" />
<Item ID="0x309A" color="5" />
<Item ID="0x309B" color="5" />
<Item ID="0x309C" color="5" />
<Item ID="0x309D" color="5" />
<Item ID="0x309E" color="5" />
<Item ID="0x309F" color="5" />
<Item ID="0x30A0" color="5" />
<Item ID="0x30A1" color="5" />
<Item ID="0x30A2" color="5" />
<Item ID="0x30A3" color="5" />
<Item ID="0x30A4" color="5" />
<Item ID="0x30A5" color="5" />
<Item ID="0x30A6" color="5" />
<Item ID="0x30A7" color="5" />
<Item ID="0x30A8" color="5" />
<Item ID="0x30A9" color="5" />
<Item ID="0x30AA" color="5" />
<Item ID="0x30AB" color="5" />
<Item ID="0x30AC" color="5" />
<Item ID="0x30AD" color="5" />
<Item ID="0x30AE" color="5" />
<Item ID="0x30AF" color="5" />
<Item ID="0x30B0" color="5" />
<Item ID="0x30B1" color="5" />
<Item ID="0x30B2" color="5" />
<Item ID="0x30B3" color="5" />
<Item ID="0x30B4" color="5" />
<Item ID="0x30B5" color="5" />
<Item ID="0x30B6" color="5" />
<Item ID="0x30B7" color="5" />
<Item ID="0x30B8" color="5" />
<Item ID="0x30B9" color="5" />
<Item ID="0x30BA" color="5" />
<Item ID="0x30BB" color="5" />
<Item ID="0x30BC" color="5" />
<Item ID="0x30BD" color="5" />
<Item ID="0x30BE" color="5" />
<Item ID="0x30BF" color="5" />
<Item ID="0x30C0" color="5" />
<Item ID="0x30C1" color="5" />
<Item ID="0x30C2" color="5" />
<Item ID="0x30C3" color="5" />
<Item ID="0x30C4" color="5" />
<Item ID="0x30C5" color="5" />
<Item ID="0x30C6" color="5" />
<Item ID="0x30C7" color="5" />
<Item ID="0x30C8" color="5" />
<Item ID="0x30C9" color="5" />
<Item ID="0x30CA" color="5" />
<Item ID="0x30CB" color="5" />
<Item ID="0x30CC" color="5" />
<Item ID="0x30CD" color="5" />
<Item ID="0x30CE" color="5" />
<Item ID="0x30CF" color="5" />
<Item ID="0x30D0" color="5" />
<Item ID="0x30D1" color="5" />
<Item ID="0x30D2" color="5" />
<Item ID="0x30D3" color="5" />
<Item ID="0x30D4" color="5" />
<Item ID="0x30D5" color="5" />
<Item ID="0x30D6" color="5" />
<Item ID="0x30D7" color="5" />
<Item ID="0x30D8" color="5" />
<Item ID="0x30D9" color="5" />
<Item ID="0x30DA" color="5" />
<Item ID="0x30DB" color="5" />
<Item ID="0x30DC" color="5" />
<Item ID="0x30DD" color="5" />
<Item ID="0x30DE" color="5" />
<Item ID="0x30DF" color="5" />
<Item ID="0x30E0" color="5" />
<Item ID="0x30E1" color="5" />
<Item ID="0x30E2" color="5" />
<Item ID="0x30E3" color="5" />
<Item ID="0x30E4" color="5" />
<Item ID="0x30E5" color="5" />
<Item ID="0x30E6" color="5" />
<Item ID="0x30E7" color="5" />
<Item ID="0x30E8" color="5" />
<Item ID="0x30E9" color="5" />
<Item ID="0x30EA" color="5" />
<Item ID="0x30EB" color="5" />
<Item ID="0x30EC" color="5" />
<Item ID="0x30ED" color="5" />
<Item ID="0x30EE" color="5" />
<Item ID="0x30EF" color="5" />
<Item ID="0x30F0" color="5" />
<Item ID="0x30F1" color="5" />
<Item ID="0x30F2" color="5" />
<Item ID="0x30F3" color="5" />
<Item ID="0x30F4" color="5" />
<Item ID="0x30F5" color="5" />
<Item ID="0x30F6" color="5" />
<Item ID="0x30F7" color="5" />
<Item ID="0x30F8" color="5" />
<Item ID="0x30F9" color="5" />
<Item ID="0x30FA" color="5" />
<Item ID="0x30FB" color="5" />
<Item ID="0x30FC" color="5" />
<Item ID="0x30FD" color="5" />
<Item ID="0x30FE" color="5" />
<Item ID="0x30FF" color="5" />
<Item ID="0x3100" color="5" />
<Item ID="0x3101" color="5" />
<Item ID="0x3102" color="5" />
<Item ID="0x3103" color="5" />
<Item ID="0x3104" color="5" />
<Item ID="0x3105" color="5" />
<Item ID="0x3106" color="5" />
<Item ID="0x3107" color="5" />
<Item ID="0x3108" color="5" />
<Item ID="0x3109" color="5" />
<Item ID="0x310A" color="5" />
<Item ID="0x310B" color="5" />
<Item ID="0x310C" color="5" />
<Item ID="0x310D" color="5" />
<Item ID="0x310E" color="5" />
<Item ID="0x310F" color="5" />
<Item ID="0x3110" color="5" />
<Item ID="0x3111" color="5" />
<Item ID="0x3112" color="5" />
<Item ID="0x3113" color="5" />
<Item ID="0x3114" color="5" />
<Item ID="0x3115" color="5" />
<Item ID="0x3116" color="5" />
<Item ID="0x3117" color="5" />
<Item ID="0x3118" color="5" />
<Item ID="0x3119" color="5" />
<Item ID="0x311A" color="5" />
<Item ID="0x311B" color="5" />
<Item ID="0x311C" color="5" />
<Item ID="0x311D" color="5" />
<Item ID="0x311E" color="5" />
<Item ID="0x311F" color="5" />
<Item ID="0x3120" color="5" />
<Item ID="0x3121" color="5" />
<Item ID="0x3122" color="5" />
<Item ID="0x3123" color="5" />
<Item ID="0x3124" color="5" />
<Item ID="0x3127" color="5" />
<Item ID="0x3128" color="5" />
<Item ID="0x3129" color="5" />
<Item ID="0x312A" color="5" />
<Item ID="0x312D" color="5" />
<Item ID="0x312E" color="5" />
<Item ID="0x312F" color="5" />
<Item ID="0x3130" color="5" />
<Item ID="0x314C" color="5" />
<Item ID="0x314D" color="5" />
<Item ID="0x314E" color="5" />
<Item ID="0x314F" color="5" />
<Item ID="0x3150" color="5" />
<Item ID="0x3151" color="5" />
<Item ID="0x3152" color="5" />
<Item ID="0x3153" color="5" />
<Item ID="0x3154" color="5" />
<Item ID="0x3155" color="5" />
<Item ID="0x3156" color="5" />
<Item ID="0x3157" color="5" />
<Item ID="0x3158" color="5" />
<Item ID="0x3159" color="5" />
<Item ID="0x315A" color="5" />
<Item ID="0x315B" color="5" />
<Item ID="0x315C" color="5" />
<Item ID="0x315D" color="5" />
<Item ID="0x315E" color="5" />
<Item ID="0x315F" color="5" />
<Item ID="0x3160" color="5" />
<Item ID="0x3161" color="5" />
<Item ID="0x3162" color="5" />
<Item ID="0x3163" color="5" />
<Item ID="0x3164" color="5" />
<Item ID="0x3165" color="5" />
<Item ID="0x3166" color="5" />
<Item ID="0x3167" color="5" />
<Item ID="0x3168" color="5" />
<Item ID="0x3169" color="5" />
<Item ID="0x316A" color="5" />
<Item ID="0x316B" color="5" />
<Item ID="0x316C" color="5" />
<Item ID="0x316D" color="5" />
<Item ID="0x316E" color="5" />
<Item ID="0x316F" color="5" />
<Item ID="0x3170" color="5" />
<Item ID="0x3171" color="5" />
<Item ID="0x3172" color="5" />
<Item ID="0x3173" color="5" />
<Item ID="0x3174" color="5" />
<Item ID="0x3175" color="5" />
<Item ID="0x3176" color="5" />
<Item ID="0x3177" color="5" />
<Item ID="0x3178" color="5" />
<Item ID="0x3179" color="5" />
<Item ID="0x317A" color="5" />
<Item ID="0x317B" color="5" />
<Item ID="0x317C" color="5" />
<Item ID="0x317D" color="5" />
<Item ID="0x317E" color="5" />
<Item ID="0x317F" color="5" />
<Item ID="0x3180" color="5" />
<Item ID="0x3181" color="5" />
<Item ID="0x3183" color="5" />
<Item ID="0x3184" color="5" />
<Item ID="0x3185" color="5" />
<Item ID="0x3186" color="5" />
<Item ID="0x3187" color="5" />
<Item ID="0x3188" color="5" />
<Item ID="0x3189" color="5" />
<Item ID="0x318A" color="5" />
<Item ID="0x318B" color="5" />
<Item ID="0x318C" color="5" />
<Item ID="0x318D" color="5" />
<Item ID="0x318E" color="5" />
<Item ID="0x318F" color="5" />
<Item ID="0x3190" color="5" />
<Item ID="0x3191" color="5" />
<Item ID="0x3192" color="5" />
<Item ID="0x3193" color="5" />
<Item ID="0x3194" color="5" />
<Item ID="0x3195" color="5" />
<Item ID="0x3196" color="5" />
<Item ID="0x3197" color="5" />
<Item ID="0x3198" color="5" />
<Item ID="0x3199" color="5" />
<Item ID="0x319A" color="5" />
<Item ID="0x319B" color="5" />
<Item ID="0x319C" color="5" />
<Item ID="0x319D" color="5" />
<Item ID="0x319E" color="5" />
<Item ID="0x319F" color="5" />
<Item ID="0x31A0" color="5" />
<Item ID="0x31A1" color="5" />
<Item ID="0x31A2" color="5" />
<Item ID="0x31A3" color="5" />
<Item ID="0x31A4" color="5" />
<Item ID="0x31A5" color="5" />
<Item ID="0x31A6" color="5" />
<Item ID="0x31A7" color="5" />
<Item ID="0x31A8" color="5" />
<Item ID="0x31A9" color="5" />
<Item ID="0x31AA" color="5" />
<Item ID="0x31AB" color="5" />
<Item ID="0x31AC" color="5" />
<Item ID="0x31AD" color="5" />
<Item ID="0x31AE" color="5" />
<Item ID="0x31AF" color="5" />
<Item ID="0x31F4" color="5" />
<Item ID="0x31F5" color="5" />
<Item ID="0x31F6" color="5" />
<Item ID="0x31F7" color="5" />
<Item ID="0x31F8" color="5" />
<Item ID="0x31F9" color="5" />
<Item ID="0x31FA" color="5" />
<Item ID="0x31FB" color="5" />
<Item ID="0x3209" color="5" />
<Item ID="0x320A" color="5" />
<Item ID="0x320D" color="5" />
<Item ID="0x320E" color="5" />
<Item ID="0x320F" color="5" />
<Item ID="0x3210" color="5" />
<Item ID="0x3211" color="5" />
<Item ID="0x3213" color="5" />
<Item ID="0x3214" color="5" />
<Item ID="0x3215" color="5" />
<Item ID="0x3216" color="5" />
<Item ID="0x3217" color="5" />
<Item ID="0x3218" color="5" />
<Item ID="0x321A" color="5" />
<Item ID="0x321B" color="5" />
<Item ID="0x321C" color="5" />
<Item ID="0x321D" color="5" />
<Item ID="0x321E" color="5" />
<Item ID="0x3220" color="5" />
<Item ID="0x3221" color="5" />
<Item ID="0x3222" color="5" />
<Item ID="0x3223" color="5" />
<Item ID="0x3224" color="5" />
<Item ID="0x3226" color="5" />
<Item ID="0x3227" color="5" />
<Item ID="0x3228" color="5" />
<Item ID="0x3229" color="5" />
<Item ID="0x322A" color="5" />
<Item ID="0x322C" color="5" />
<Item ID="0x322D" color="5" />
<Item ID="0x322E" color="5" />
<Item ID="0x322F" color="5" />
<Item ID="0x3230" color="5" />
<Item ID="0x3231" color="5" />
<Item ID="0x3232" color="5" />
<Item ID="0x3233" color="5" />
<Item ID="0x3234" color="5" />
<Item ID="0x3236" color="5" />
<Item ID="0x3237" color="5" />
<Item ID="0x3238" color="5" />
<Item ID="0x3239" color="5" />
<Item ID="0x323A" color="5" />
<Item ID="0x323B" color="5" />
<Item ID="0x323C" color="5" />
<Item ID="0x323D" color="5" />
<Item ID="0x323E" color="5" />
<Item ID="0x323F" color="5" />
<Item ID="0x3241" color="5" />
<Item ID="0x3242" color="5" />
<Item ID="0x3243" color="5" />
<Item ID="0x3244" color="5" />
<Item ID="0x3245" color="5" />
<Item ID="0x3246" color="5" />
<Item ID="0x3247" color="5" />
<Item ID="0x3248" color="5" />
<Item ID="0x3249" color="5" />
<Item ID="0x324A" color="5" />
<Item ID="0x324B" color="5" />
<Item ID="0x324C" color="5" />
<Item ID="0x324D" color="5" />
<Item ID="0x324E" color="5" />
<Item ID="0x324F" color="5" />
<Item ID="0x3250" color="5" />
<Item ID="0x3251" color="5" />
<Item ID="0x3252" color="5" />
<Item ID="0x3253" color="5" />
<Item ID="0x3254" color="5" />
<Item ID="0x3255" color="5" />
<Item ID="0x3256" color="5" />
<Item ID="0x3257" color="5" />
<Item ID="0x3258" color="5" />
<Item ID="0x3259" color="5" />
<Item ID="0x325A" color="5" />
<Item ID="0x325B" color="5" />
<Item ID="0x325C" color="5" />
<Item ID="0x325D" color="5" />
<Item ID="0x325E" color="5" />
<Item ID="0x325F" color="5" />
<Item ID="0x3260" color="5" />
<Item ID="0x3261" color="5" />
<Item ID="0x3262" color="5" />
<Item ID="0x3263" color="5" />
<Item ID="0x3264" color="5" />
<Item ID="0x3265" color="5" />
<Item ID="0x3266" color="5" />
<Item ID="0x3267" color="5" />
<Item ID="0x3268" color="5" />
<Item ID="0x3269" color="5" />
<Item ID="0x326A" color="5" />
<Item ID="0x326B" color="5" />
<Item ID="0x326C" color="5" />
<Item ID="0x326D" color="5" />
<Item ID="0x326E" color="5" />
<Item ID="0x326F" color="5" />
<Item ID="0x3270" color="5" />
<Item ID="0x3271" color="5" />
<Item ID="0x3272" color="5" />
<Item ID="0x3273" color="5" />
<Item ID="0x3274" color="5" />
<Item ID="0x3275" color="5" />
<Item ID="0x3276" color="5" />
<Item ID="0x3277" color="5" />
<Item ID="0x3278" color="5" />
<Item ID="0x3279" color="5" />
<Item ID="0x327A" color="5" />
<Item ID="0x327B" color="5" />
<Item ID="0x327C" color="5" />
<Item ID="0x327D" color="5" />
<Item ID="0x327E" color="5" />
<Item ID="0x327F" color="5" />
<Item ID="0x3280" color="5" />
<Item ID="0x3281" color="5" />
<Item ID="0x3282" color="5" />
<Item ID="0x3283" color="5" />
<Item ID="0x3284" color="5" />
<Item ID="0x3285" color="5" />
<Item ID="0x3286" color="5" />
<Item ID="0x3287" color="5" />
<Item ID="0x3288" color="5" />
<Item ID="0x3289" color="5" />
<Item ID="0x328A" color="5" />
<Item ID="0x328B" color="5" />
<Item ID="0x328C" color="5" />
<Item ID="0x328D" color="5" />
<Item ID="0x328E" color="5" />
<Item ID="0x328F" color="5" />
<Item ID="0x3290" color="5" />
<Item ID="0x3291" color="5" />
<Item ID="0x3292" color="5" />
<Item ID="0x3293" color="5" />
<Item ID="0x3294" color="5" />
<Item ID="0x3295" color="5" />
<Item ID="0x3296" color="5" />
<Item ID="0x3297" color="5" />
<Item ID="0x3298" color="5" />
<Item ID="0x3299" color="5" />
<Item ID="0x329A" color="5" />
<Item ID="0x329B" color="5" />
<Item ID="0x12EE" color="5" />
<Item ID="0x12EF" color="5" />
<Item ID="0x12F0" color="5" />
<Item ID="0x12F1" color="5" />
<Item ID="0x12F2" color="5" />
<Item ID="0x12F4" color="5" />
<Item ID="0x12F5" color="5" />
<Item ID="0x12F6" color="5" />
<Item ID="0x12F7" color="5" />
<Item ID="0x12F8" color="5" />
<Item ID="0x12F9" color="5" />
<Item ID="0x12FA" color="5" />
<Item ID="0x12FB" color="5" />
<Item ID="0x12FC" color="5" />
<Item ID="0x12FD" color="5" />
<Item ID="0x12FE" color="5" />
<Item ID="0x1300" color="5" />
<Item ID="0x1301" color="5" />
<Item ID="0x1302" color="5" />
<Item ID="0x1303" color="5" />
<Item ID="0x1304" color="5" />
<Item ID="0x1306" color="5" />
<Item ID="0x1307" color="5" />
<Item ID="0x1308" color="5" />
<Item ID="0x1309" color="5" />
<Item ID="0x130A" color="5" />
<Item ID="0x130C" color="5" />
<Item ID="0x130D" color="5" />
<Item ID="0x130E" color="5" />
<Item ID="0x130F" color="5" />
<Item ID="0x1310" color="5" />
<Item ID="0x1312" color="5" />
<Item ID="0x1313" color="5" />
<Item ID="0x1314" color="5" />
<Item ID="0x1315" color="5" />
<Item ID="0x1316" color="5" />
<Item ID="0x1318" color="5" />
<Item ID="0x1319" color="5" />
<Item ID="0x131A" color="5" />
<Item ID="0x131B" color="5" />
<Item ID="0x131C" color="5" />
<Item ID="0x131E" color="5" />
<Item ID="0x131F" color="5" />
<Item ID="0x1320" color="5" />
<Item ID="0x1321" color="5" />
<Item ID="0x1322" color="5" />
<Item ID="0x1323" color="5" />
<Item ID="0x1324" color="5" />
<Item ID="0x1325" color="5" />
<Item ID="0x1326" color="5" />
<Item ID="0x1327" color="5" />
<Item ID="0x1328" color="5" />
<Item ID="0x1329" color="5" />
<Item ID="0x132A" color="5" />
<Item ID="0x132B" color="5" />
<Item ID="0x132C" color="5" />
<Item ID="0x132D" color="5" />
<Item ID="0x132E" color="5" />
<Item ID="0x132F" color="5" />
<Item ID="0x1330" color="5" />
<Item ID="0x1331" color="5" />
<Item ID="0x1332" color="5" />
<Item ID="0x1333" color="5" />
<Item ID="0x1334" color="5" />
<Item ID="0x1335" color="5" />
<Item ID="0x1336" color="5" />
<Item ID="0x1337" color="5" />
<Item ID="0x1338" color="5" />
<Item ID="0x1339" color="5" />
<Item ID="0x133A" color="5" />
<Item ID="0x133B" color="5" />
<Item ID="0x133C" color="5" />
<Item ID="0x133D" color="5" />
<Item ID="0x133E" color="5" />
<Item ID="0x133F" color="5" />
<Item ID="0x1340" color="5" />
<Item ID="0x1341" color="5" />
<Item ID="0x1342" color="5" />
<Item ID="0x1343" color="5" />
<Item ID="0x1344" color="5" />
<Item ID="0x1345" color="5" />
<Item ID="0x1346" color="5" />
<Item ID="0x1347" color="5" />
<Item ID="0x1348" color="5" />
<Item ID="0x1349" color="5" />
<Item ID="0x134A" color="5" />
<Item ID="0x134B" color="5" />
<Item ID="0x134C" color="5" />
<Item ID="0x134D" color="5" />
<Item ID="0x0E5C" color="11" />
<Item ID="0x0E5D" color="11" />
<Item ID="0x0E5E" color="11" />
<Item ID="0x0E5F" color="11" />
<Item ID="0x0E60" color="11" />
<Item ID="0x0E61" color="11" />
<Item ID="0x0E62" color="11" />
<Item ID="0x0E63" color="11" />
<Item ID="0x0E64" color="11" />
<Item ID="0x0E65" color="11" />
<Item ID="0x0E66" color="11" />
<Item ID="0x0E67" color="11" />
<Item ID="0x0E68" color="11" />
<Item ID="0x0E69" color="11" />
<Item ID="0x0E6A" color="11" />
<Item ID="0x0E31" color="14" />
<Item ID="0x0E32" color="14" />
<Item ID="0x0E33" color="14" />
<Item ID="0x0E2D" color="3" />
<Item ID="0x0E2E" color="3" />
<Item ID="0x0E2F" color="3" />
<Item ID="0x0E30" color="3" />
<!-- Original virtual sources -->
<Item ID="0x1646" color="2"/>
<Item ID="0x1647" color="2"/>
</Sources>
</ColorLight>

View File

@ -21,7 +21,8 @@
* CDDL HEADER END
*
*
* Portions Copyright 2012 Andreas Schneider
* Portions Copyright 2015 Andreas Schneider
* Portions Copyright 2015 StaticZ
*)
unit ULightManager;
@ -32,10 +33,22 @@ interface
uses
Classes, SysUtils, Imaging, ImagingTypes, ImagingClasses, ImagingCanvases,
ImagingOpenGL, GL, GLu, GLext, Math, heContnrs, ULandscape, UWorldItem,
UCacheManager;
UCacheManager, DOM, XMLRead;
const
ColorsCount = 15;
type
TLightColor = record
r: Float;
g: Float;
b: Float;
end;
PLightColor = ^TLightColor;
TColorRefArray = array of Byte;
TCalculateOffset = procedure(AX, AY: Integer; out DrawX, DrawY: Integer) of object;
{ TLightMaterial }
@ -59,11 +72,13 @@ type
constructor Create(AManager: TLightManager; AWorldItem: TWorldItem);
destructor Destroy; override;
protected
FColorID: Byte;
FX: Integer;
FY: Integer;
FZ: SmallInt;
FMaterial: TLightMaterial;
public
property ColorID: Byte read FColorID;
property X: Integer read FX;
property Y: Integer read FY;
property Z: SmallInt read FZ;
@ -87,15 +102,20 @@ type
FLightCache: TLightCache;
FUseFBO: Boolean;
FInitialized: Boolean;
FLightColors: array[1..ColorsCount] of TLightColor;
FTileCol: TColorRefArray;
function GetLight(AID: Integer): TLightMaterial;
procedure SetLightLevel(AValue: Byte);
procedure UpdateOverlay(AScreenRect: TRect);
private
property TileCol: TColorRefArray read FTileCol;
public
property LightLevel: Byte read FLightLevel write SetLightLevel;
procedure InitGL;
procedure UpdateLightMap(ALeft, AWidth, ATop, AHeight: Integer;
AScreenBuffer: TScreenBuffer);
procedure Draw(AScreenRect: TRect);
procedure LoadConfig(AFileName: String);
end;
implementation
@ -154,6 +174,7 @@ var
lightMaterial: TLightMaterial;
colorGL: GLclampf;
fbo: GLuint;
colorref: PLightColor;
begin
glDeleteTextures(1, @FOverlayTexture);
if FUseFBO then
@ -183,7 +204,9 @@ begin
lightMaterial := FLightSources[i].Material;
if lightMaterial <> nil then
begin
colorref := @FLightColors[FLightSources[i].ColorID];
glBindTexture(GL_TEXTURE_2D, lightMaterial.Texture);
glColor3f(colorref^.R, colorref^.G, colorref^.B);
glBegin(GL_QUADS);
glTexCoord2i(0, 0);
glVertex2i(FLightSources[i].FX - lightMaterial.RealWidth div 2,
@ -340,6 +363,104 @@ begin
glEnd;
end;
procedure TLightManager.LoadConfig(AFileName: String);
var
XMLDoc: TXMLDocument;
iNode, node: TDOMNode;
s: string;
i, id, col, r, g, b: Integer;
begin
writeln('Loading Colors from ', AFileName); //TODO
for i := 1 to ColorsCount do begin
FLightColors[i].R := 1.0;
FLightColors[i].G := 1.0;
FLightColors[i].B := 1.0;
end;
SetLength(FTileCol, ResMan.Landscape.MaxStaticID + 1);
for i := 0 to ResMan.Landscape.MaxStaticID do
FTileCol[i] := 1;
//frmInitialize.SetStatusLabel(Format(frmInitialize.SplashLoading, ['ColorLight.xml']));
// Read xml file from your hard drive
ReadXMLFile(XMLDoc, AFileName);
if LowerCase(XMLDoc.DocumentElement.NodeName) = 'colorlight' then
begin
iNode := XMLDoc.DocumentElement.FirstChild;
while iNode <> nil do
begin
if LowerCase(iNode.NodeName) = 'colors' then
begin
node := iNode.FirstChild;
while node <> nil do
begin
if (LowerCase(node.NodeName) = 'color') then
begin
id := -1;
r := 255;
g := 255;
b := 255;
for i := node.Attributes.Length - 1 downto 0 do
begin
s := LowerCase(node.Attributes[i].NodeName);
if (s = 'id') then
TryStrToInt(node.Attributes[i].NodeValue, id);
if (s = 'r') then
TryStrToInt(node.Attributes[i].NodeValue, r);
if (s = 'g') then
TryStrToInt(node.Attributes[i].NodeValue, g);
if (s = 'b') then
TryStrToInt(node.Attributes[i].NodeValue, b);
end;
if (id > 0) and (id <= ColorsCount) then
begin
if (r < 0) then r := 0;
if (g < 0) then g := 0;
if (b < 0) then b := 0;
if (r > 255) then r := 255;
if (g > 255) then g := 255;
if (b > 255) then b := 255;
FLightColors[id].R := (Float(r)) / 255.0;
FLightColors[id].G := (Float(g)) / 255.0;
FLightColors[id].B := (Float(b)) / 255.0;
end;
end;
node := node.NextSibling;
end;
end;
if LowerCase(iNode.NodeName) = 'sources' then
begin
node := iNode.FirstChild;
while node <> nil do
begin
s := LowerCase(node.NodeName);
if (s = 'tile') or (s = 'item') then begin
col := 1;
id := -1;
for i := node.Attributes.Length - 1 downto 0 do begin
if LowerCase(node.Attributes[i].NodeName) = 'id' then
if TryStrToInt(node.Attributes[i].NodeValue, id) then
begin
if s = 'tile' then
Dec(id, $4000);
end;
if LowerCase(node.Attributes[i].NodeName) = 'color' then
if TryStrToInt(node.Attributes[i].NodeValue, col) then
begin
if (col < 1) or (col > ColorsCount) then
col := 1;
end;
end;
if (id >= 0) and (id <= ResMan.Landscape.MaxStaticID) then
FTileCol[id] := col;
end;
node := node.NextSibling;
end;
end;
iNode := iNode.NextSibling;
end;
end;
end;
{ TLightSource }
constructor TLightSource.Create(AManager: TLightManager; AWorldItem: TWorldItem);
@ -350,6 +471,9 @@ begin
FMaterial := AManager.GetLight(lightID);
if FMaterial <> nil then
begin
FColorID := AManager.TileCol[AWorldItem.TileID];
if (FColorID < 1) or (FColorID > ColorsCount) then
FColorID := 1;
AManager.FCalculateOffset(AWorldItem.X, AWorldItem.Y, FX, FY);
FZ := AWorldItem.Z * 4;
FY := FY + 22 - FZ;

View File

@ -922,6 +922,7 @@ begin
edY.MaxValue := FLandscape.CellHeight;
FOverlayUI := TOverlayUI.Create;
FLightManager := TLightManager.Create(@GetDrawOffset);
FLightManager.LoadConfig(FAppDir + 'ColorLight.xml');
ProcessAccessLevel;