From 89656e1787faf956c3c122693edc7bb00b1908a3 Mon Sep 17 00:00:00 2001 From: Przemyslaw Date: Mon, 1 Apr 2024 08:55:31 +0200 Subject: Init --- .trixrc | 2 + DEBIAN/HOWTO.txt | 2 + DEBIAN/debian.changelog | 5 + DEBIAN/debian.control | 14 + DEBIAN/debian.rules | 36 ++ DEBIAN/format.sh | 2 + DEBIAN/trix.dsc | 41 +++ Makefile | 47 +++ Makefile.win | 39 +++ PKG/PKGBUILD | 23 ++ RPM/trix.spec | 95 ++++++ Trix.desktop | 15 + ZapfHumanist.ttf | Bin 0 -> 41400 bytes hiscores.txt | 5 + img/about.xpm | 159 +++++++++ img/banner.xpm | 533 +++++++++++++++++++++++++++++ img/bg/AUTHOR.txt | 2 + img/bg/catalogue.txt | 6 + img/bg/image1.jpeg | Bin 0 -> 39075 bytes img/bg/image2.jpeg | Bin 0 -> 29857 bytes img/bg/image3.jpeg | Bin 0 -> 28309 bytes img/bg/image4.jpeg | Bin 0 -> 23494 bytes img/bg/image5.jpeg | Bin 0 -> 24236 bytes img/bg/image6.jpeg | Bin 0 -> 42613 bytes img/icons.bmp | Bin 0 -> 14454 bytes img/trix-icon.bmp | Bin 0 -> 37002 bytes img/trix-icon.ico | Bin 0 -> 11454 bytes img/trix-icon.png | Bin 0 -> 4464 bytes img/trix-icon.xcf | Bin 0 -> 13288 bytes settings.txt | 2 + src/game.c | 813 ++++++++++++++++++++++++++++++++++++++++++++ src/main.c | 652 +++++++++++++++++++++++++++++++++++ src/menu.c | 879 ++++++++++++++++++++++++++++++++++++++++++++++++ src/trix.h | 156 +++++++++ trix.rc | 26 ++ 35 files changed, 3554 insertions(+) create mode 100644 .trixrc create mode 100644 DEBIAN/HOWTO.txt create mode 100644 DEBIAN/debian.changelog create mode 100644 DEBIAN/debian.control create mode 100644 DEBIAN/debian.rules create mode 100755 DEBIAN/format.sh create mode 100644 DEBIAN/trix.dsc create mode 100644 Makefile create mode 100644 Makefile.win create mode 100644 PKG/PKGBUILD create mode 100644 RPM/trix.spec create mode 100644 Trix.desktop create mode 100644 ZapfHumanist.ttf create mode 100644 hiscores.txt create mode 100644 img/about.xpm create mode 100644 img/banner.xpm create mode 100644 img/bg/AUTHOR.txt create mode 100644 img/bg/catalogue.txt create mode 100644 img/bg/image1.jpeg create mode 100644 img/bg/image2.jpeg create mode 100644 img/bg/image3.jpeg create mode 100644 img/bg/image4.jpeg create mode 100644 img/bg/image5.jpeg create mode 100644 img/bg/image6.jpeg create mode 100644 img/icons.bmp create mode 100644 img/trix-icon.bmp create mode 100644 img/trix-icon.ico create mode 100644 img/trix-icon.png create mode 100644 img/trix-icon.xcf create mode 100644 settings.txt create mode 100644 src/game.c create mode 100644 src/main.c create mode 100644 src/menu.c create mode 100644 src/trix.h create mode 100644 trix.rc diff --git a/.trixrc b/.trixrc new file mode 100644 index 0000000..f92b523 --- /dev/null +++ b/.trixrc @@ -0,0 +1,2 @@ +start 1 +net 1 diff --git a/DEBIAN/HOWTO.txt b/DEBIAN/HOWTO.txt new file mode 100644 index 0000000..a371e0b --- /dev/null +++ b/DEBIAN/HOWTO.txt @@ -0,0 +1,2 @@ +foramt zapisu nazwy pliku: + photocrop_0.221225-0~alpha.tar.gz diff --git a/DEBIAN/debian.changelog b/DEBIAN/debian.changelog new file mode 100644 index 0000000..53b91a3 --- /dev/null +++ b/DEBIAN/debian.changelog @@ -0,0 +1,5 @@ +trix (2.230821-0~beta) unstable; urgency=low + + * Last release + + -- Przemysław R. Pietraszczyk Sat, 15 Aug 2022 21:41:41 +0200 diff --git a/DEBIAN/debian.control b/DEBIAN/debian.control new file mode 100644 index 0000000..869d0cb --- /dev/null +++ b/DEBIAN/debian.control @@ -0,0 +1,14 @@ +Source: trix +Section: devel +Priority: extra +Maintainer: Przemysław R. Pietraszczyk +Build-Depends: debhelper-compat (= 12), libsdl2-dev, libsdl2-ttf-dev, libsdl2-image-dev, fakeroot, g++ +Standards-Version: 2.230821-1 +Homepage: https://prymula.ct8.pl + + +Package: trix +Architecture: amd64 +Depends: ${misc:Depends}, libsdl2-2.0-0, libsdl2-ttf-2.0-0, libsdl2-image-2.0-0 +Description: My implementation of the cult game + diff --git a/DEBIAN/debian.rules b/DEBIAN/debian.rules new file mode 100644 index 0000000..081ded8 --- /dev/null +++ b/DEBIAN/debian.rules @@ -0,0 +1,36 @@ +#!/usr/bin/make -f + +export DH_VERBOSE = 1 + +clean: + make clean + +build: + make + +binary: + mkdir -pm 0755 debian/trix + mkdir -pm 0755 debian/trix/usr + mkdir -pm 0755 debian/trix/usr/bin + mkdir -pm 0755 debian/trix/usr/share + mkdir -pm 0755 debian/trix/usr/share/trix + mkdir -pm 0755 debian/trix/usr/share/trix/img + mkdir -pm 0755 debian/trix/usr/share/trix/img/bg + mkdir -pm 0755 debian/trix/usr/share/applications + cp trix debian/trix/usr/bin + cp img/trix-icon.png debian/trix/usr/share/trix/img + cp img/trix-icon.bmp debian/trix/usr/share/trix/img + cp img/icons.bmp debian/trix/usr/share/trix/img + cp img/bg/image1.jpeg debian/trix/usr/share/trix/img/bg + cp img/bg/image2.jpeg debian/trix/usr/share/trix/img/bg + cp img/bg/image3.jpeg debian/trix/usr/share/trix/img/bg + cp img/bg/image4.jpeg debian/trix/usr/share/trix/img/bg + cp img/bg/image5.jpeg debian/trix/usr/share/trix/img/bg + cp img/bg/image6.jpeg debian/trix/usr/share/trix/img/bg + cp img/bg/catalogue.txt debian/trix/usr/share/trix/img/bg + cp img/bg/AUTHOR.txt debian/trix/usr/share/trix/img/bg + cp ZapfHumanist.ttf debian/trix/usr/share/trix + cp Trix.desktop debian/trix/usr/share/applications + dh_gencontrol + dh_builddeb + diff --git a/DEBIAN/format.sh b/DEBIAN/format.sh new file mode 100755 index 0000000..e4ec9ef --- /dev/null +++ b/DEBIAN/format.sh @@ -0,0 +1,2 @@ +mkdir exec +exec /usr/lib/build/debtransform ./ ./trix.dsc ./exec diff --git a/DEBIAN/trix.dsc b/DEBIAN/trix.dsc new file mode 100644 index 0000000..d0c0f26 --- /dev/null +++ b/DEBIAN/trix.dsc @@ -0,0 +1,41 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +Format: 1.0 +Source: trix +Binary: trix +Architecture: amd64 +Version: 0.230821-1 +Maintainer: Przemysław R. Pietraszczyk +Homepage: http://prymula.ct8.pl + +DEBTRANSFORM-TAR: trix-0.230821-1.tar.gz + +Standards-Version: 0.230821-1 +Build-Depends: debhelper-compat (>= 12), libsdl2-dev, libsdl2-ttf-dev, libsdl2-image-dev, fakeroot, g++ +Package-List: + lamertetris deb x11 optional arch=amd64 arch=armv7l +Files: + b31649bc23b2b7bca9ab70ea3410711a 128820 trix-0.230821-1.tar.gz + 29e7e7e60bc81891e3da3871b9eeb549 764 trix-0.230821-1.debian.tar.xz + +-----BEGIN PGP SIGNATURE----- + +mQENBGEf/c4BCAC2d4ymW0pRZV36qLtlt/WGb83kos5UX5UbwvkQrbUjAbOPOY8w +DT3M1neYOAPZx38924aPTFKbZPcz+rK/7Wcv1kzgfux5zXQJTLeqpkhUYAgXUg2p +oK9ZXsai82fOicTrClOyJLLYQ8C1vj8yUh7e3ERljEyp5Nxg/lY92rwcZ4WYR193 +nGDInlDl5JlWUcLlk/RFnC5bB+T6ZZr5FBX/eDnKAPEl+N3MWpDs2JLDy7EUPhcG +U/60X0wuXHPTwMoNbB3ep/bWRxwEej0sFad5GXeCh7hKCroi/kLmLTDIxSD8lsRr +Y4H/8H2lBBsQq7bRL88N6ZDGCocPo11V83kFABEBAAG0NmhvbWU6cHJ6ZW0gT0JT +IFByb2plY3QgPGhvbWU6cHJ6ZW1AYnVpbGQub3BlbnN1c2Uub3JnPokBPgQTAQgA +KAUCYR/9zgIbAwUJBB6wAAYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQcXEc +NPcNefFEAAf+Kg4cs/C99kEIMv/PO85VW+p8rcTwCViOFUX5WrBhwsRyPAKrJPPG +KD6PdnvoplcNQwhQ8nRsRiiaiUtPcj8Bvi6EdPgSgXXObKKJtCyaAa1rURdlb9iW +CfvXA6oW+PGlii9BMnXOAtkeFIzZooO9oXd+wez66P+4VWFiFzxanLfLn/hwbWxQ +68rlO3QNGbrMeODBgwh9s83XGmAg47mn2fldTAmTbJDf9tMi1LhX2MmLyN9wjqsd +4IZ9JMri2JTnIhYfxWdKT9gsu7q0g8LqonaXMvlOEyHFRF1YQ0i7G6fFbvDcKCZN +W1Eja55FdN7smv5Eck6UTIIYyWPuAv45uohGBBMRAgAGBQJhH/3PAAoJEDswEbdr +nWUj4M0AniJ389dyvUjjgS91AcOb08E4moV9AJ9WDL3/7GYYUL/Azw43QucWPnXr +uw== +=+lfH +-----END PGP SIGNATURE----- diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c282727 --- /dev/null +++ b/Makefile @@ -0,0 +1,47 @@ +APP_BIN=trix +OBJF = ./src/main.o \ + ./src/menu.o \ + ./src/game.o + + +LIBS=sdl2 SDL2_ttf SDL2_image + +#CXXFLAGS += -I./ -I Sources + +PACKAGES = $(LIBS) +# CXXFLAGS += `pkg-config --cflags $(PACKAGES)` -mthreads +CFLAGS += -g -Wall `pkg-config --cflags $(PACKAGES)` -DLINUX +#LDFLAGS += -ldl +PREFIX = /usr + +all: $(APP_BIN) + +$(APP_BIN): $(OBJF) + $(CC) $(CXXFLAGS) $(OBJF) -o $(APP_BIN) `pkg-config --libs $(PACKAGES)` -g $(EXTRA_LIBS) + +clean: + rm -f $(OBJF) $(APP_BIN) + +%.o : %.C + $(CC) $(CFLAGS) -c $< -o $@ + +install: + install -d $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/share/trix $(DESTDIR)$(PREFIX)/share/trix/img $(DESTDIR)$(PREFIX)/share/trix/img/bg + install trix $(DESTDIR)$(PREFIX)/bin + install ZapfHumanist.ttf $(DESTDIR)$(PREFIX)/share/trix + install img/*.bmp $(DESTDIR)$(PREFIX)/share//trix/img + install img/bg/*.txt $(DESTDIR)$(PREFIX)/share/trix/img/bg + install img/bg/*.jpeg $(DESTDIR)$(PREFIX)/share/trix/img/bg + install img/*.png $(DESTDIR)$(PREFIX)/share/trix/img + install Trix.desktop $(DESTDIR)/usr/share/applications + + +uninstall: + rm $(PREFIX)/bin/trix + rm -r $(PREFIX)/share/trix + rm /usr/share/applications/Trix.desktop + + + +# EOF # + diff --git a/Makefile.win b/Makefile.win new file mode 100644 index 0000000..0676715 --- /dev/null +++ b/Makefile.win @@ -0,0 +1,39 @@ + -Dmain=SDL_main# Project: trix +# Makefile created by Dev-C++ 4.9.9.2 + +CPP = g++.exe +CC = i686-w64-mingw32-gcc +WINDRES = i686-w64-mingw32-windres +RES = +OBJ = main.o menu.o game.o $(RES) +LINKOBJ = main.o menu.o game.o $(RES) +LIBS = -L"/usr/i686-w64-mingw32/sys-root/mingw/lib" -mwindows -lmingw32 -lSDL2main -lSDL2 -lSDL2_ttf -lSDL2_image -static-libgcc +#LIBS = -L"C:\Program Files (x86)\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\i686-w64-mingw32\pietraszczyk\lib" -mwindows -lmingw32 -lSDL2main -lSDL2 -lSDL2_ttf -lSDL2_image -static-libgcc +INCS = -I"/usr/i686-w64-mingw32/sys-root/mingw/include" -Dmain=SDL2_main +#INCS = -I"C:\Program Files (x86)\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\i686-w64-mingw32\pietraszczyk\include" -Dmain=SDL_main +CXXINCS = +BIN = trix.exe +CXXFLAGS = $(CXXINCS) -g +CFLAGS = $(INCS) -g +RM = rm -f + +.PHONY: all all-before all-after clean clean-custom + +all: all-before trix.exe all-after + + +clean: clean-custom + ${RM} $(OBJ) $(BIN) + +$(BIN): $(OBJ) + $(WINDRES) trix.rc -O coff -o icon.o + $(CC) $(LINKOBJ) -o "trix.exe" $(LIBS) icon.o + +main.o: main.c + $(CC) -c main.c -o main.o $(CFLAGS) -DWINDOWS + +menu.o: menu.c + $(CC) -c menu.c -o menu.o $(CFLAGS) -DWINDOWS + +game.o: game.c + $(CC) -c game.c -o game.o $(CFLAGS) -DWINDOWS diff --git a/PKG/PKGBUILD b/PKG/PKGBUILD new file mode 100644 index 0000000..a54d337 --- /dev/null +++ b/PKG/PKGBUILD @@ -0,0 +1,23 @@ +# Maintainer: Przemyslaw R. Pietraszczyk + +pkgname=trix +pkgver=0.230821 +pkgrel=1 +pkgdesc="Clicking on blocks" +arch=('x86_64') +url="prymula.ct8.pl" +license=('Public Domain') +provides=('trix') +depends=('sdl2' 'sdl2_ttf' 'sdl2_image') +makedepends=('make' 'gcc' 'pkg-config' 'sdl2' 'sdl2_ttf' 'sdl2_image') +source=("${pkgname}-${pkgver}-${pkgrel}.tar.gz::file://${pkgname}-${pkgver}-${pkgrel}.tar.gz") +sha256sums=('e241943d95a625e6ca579783cd078dc98b764338a196eda443dcdaa4e35d0ba4') #generate with 'makepkg -g' || sha256sum +build() { + cd "$srcdir/${pkgname}-${pkgver}-${pkgrel}" + make +} + +package() { + cd "$srcdir/${pkgname}-${pkgver}-${pkgrel}" + make DESTDIR="${pkgdir}" install +} diff --git a/RPM/trix.spec b/RPM/trix.spec new file mode 100644 index 0000000..dceab94 --- /dev/null +++ b/RPM/trix.spec @@ -0,0 +1,95 @@ +# +# spec file for package trix +# +# Copyright (c) 2020 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + +%define unmangled_version 0.230821-1 +Name: trix +Version: 0.230821 +Release: 1 +Summary: Clicking on blocks +License: CC-PDDC +URL: http://prymula.ct8.pl +Source0: %{name}-%{unmangled_version}.tar.gz +%if 0%{?suse_version}==1530 +BuildRequires: libSDL2-devel, libSDL2_ttf-devel, libSDL2_image-devel, pkgconfig, pkgconfig(sdl2) +Requires: libSDL2-2_0-0, libSDL2_ttf-2_0-0, libSDL2_image-2_0-0 +%else +BuildRequires: SDL2-devel, SDL2_ttf-devel, SDL2_image-devel, pkgconfig, pkgconfig(sdl2) +Requires: SDL2, SDL2_ttf, SDL_image +%endif +BuildArch: x86_64 + +%description + + +%prep +%setup -n %{name}-%{unmangled_version} -n %{name}-%{unmangled_version} + +%build +make + +%install +mkdir -p %{buildroot}%{_bindir} +mkdir -p %{buildroot}%{_datadir} +mkdir -p %{buildroot}%{_datadir}/trix +mkdir -p %{buildroot}%{_datadir}/trix/img +mkdir -p %{buildroot}%{_datadir}/trix/img/bg + +#mkdir -p %{buildroot}/usr +#mkdir -p %{buildroot}/usr/share +mkdir -p %{buildroot}%{_datadir}/applications + +#%make_install + +install -m 0755 trix %{buildroot}%{_bindir} +install -m 0644 img/trix-icon.png %{buildroot}%{_datadir}/trix/img +install -m 0644 img/trix-icon.bmp %{buildroot}%{_datadir}/trix/img +install -m 0644 img/icons.bmp %{buildroot}%{_datadir}/trix/img +install -m 0644 img/bg/image1.jpeg %{buildroot}%{_datadir}/trix/img/bg +install -m 0644 img/bg/image2.jpeg %{buildroot}%{_datadir}/trix/img/bg +install -m 0644 img/bg/image3.jpeg %{buildroot}%{_datadir}/trix/img/bg +install -m 0644 img/bg/image4.jpeg %{buildroot}%{_datadir}/trix/img/bg +install -m 0644 img/bg/image5.jpeg %{buildroot}%{_datadir}/trix/img/bg +install -m 0644 img/bg/image6.jpeg %{buildroot}%{_datadir}/trix/img/bg +install -m 0644 img/bg/catalogue.txt %{buildroot}%{_datadir}/trix/img/bg +install -m 0644 img/bg/AUTHOR.txt %{buildroot}%{_datadir}/trix/img/bg +install -m 0644 Trix.desktop %{buildroot}/usr/share/applications +install -m 0644 ZapfHumanist.ttf %{buildroot}%{_datadir}/trix + + + +%files +%defattr(0755,root,root) +%{_bindir}/trix +%{_datadir}/trix/ +%{_datadir}/trix/img/ +%{_datadir}/trix/img/bg/ +%defattr(0644,root,root) +%{_datadir}/trix/img/trix-icon.png +%{_datadir}/trix/img/trix-icon.bmp +%{_datadir}/trix/img/icons.bmp +%{_datadir}/trix/img/bg/image1.jpeg +%{_datadir}/trix/img/bg/image2.jpeg +%{_datadir}/trix/img/bg/image3.jpeg +%{_datadir}/trix/img/bg/image4.jpeg +%{_datadir}/trix/img/bg/image5.jpeg +%{_datadir}/trix/img/bg/image6.jpeg +%{_datadir}/trix/img/bg/catalogue.txt +%{_datadir}/trix/img/bg/AUTHOR.txt +%{_datadir}/applications/Trix.desktop +%{_datadir}/trix/ZapfHumanist.ttf + +%changelog diff --git a/Trix.desktop b/Trix.desktop new file mode 100644 index 0000000..863af5e --- /dev/null +++ b/Trix.desktop @@ -0,0 +1,15 @@ +#!/usr/bin/env xdg-open + +[Desktop Entry] +Encoding=UTF-8 +Type=Application +Categories=Game; + +Name=Trix + +Exec=/usr/bin/trix +#Exec=gnome-terminal -e "bash -c 'gdb /opt/pietraszczyk/arkanoid/arkanoid;$SHELL'" +Terminal=false +Icon=/usr/share/trix/img/trix-icon.png + +Name[pl_PL]=Trix diff --git a/ZapfHumanist.ttf b/ZapfHumanist.ttf new file mode 100644 index 0000000..f751c1c Binary files /dev/null and b/ZapfHumanist.ttf differ diff --git a/hiscores.txt b/hiscores.txt new file mode 100644 index 0000000..5635b1f --- /dev/null +++ b/hiscores.txt @@ -0,0 +1,5 @@ +przemek 250 +przemek 200 +przemek 150 +przemek 100 +przemek 50 diff --git a/img/about.xpm b/img/about.xpm new file mode 100644 index 0000000..9dee232 --- /dev/null +++ b/img/about.xpm @@ -0,0 +1,159 @@ +/* XPM */ +static char * about_xpm[] = { +"242 145 11 1", +" c None", +". c #000000", +"+ c #555555", +"@ c #383838", +"# c #8D8D8D", +"$ c #AAAAAA", +"% c #717171", +"& c #1C1C1C", +"* c #FFFFFF", +"= c #E2E2E2", +"- c #C6C6C6", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..+++++++++@.......@+++++++++@.............+#$$$#+..............+#$$$$%@......@+++++++++@............&+++++........@+++++........@+++++....+++++@........+++++@...&++++++++++++@...+++++++++..................&+++++++++@.....@+++++......&+++++&.", +"..***********#&....$***********#&........%=*******=%.........&#*********=%&...$***********#&.........#*****@.......$*****%.......-*****....******&......&*****$...+************$...**********=#&..............+***********#...@*****@.....#****-..", +"..************=&...$************=&......$***********$.......&=************$...$************=&........=*****#.......$*****=......@******....******#......#*****$...+************$...*************%.............+************-...#****-....&*****@..", +"..*************=...$*************-.....$*************$.....&=*************$...$*************-.......@******=.......$******@.....-******....******=.....&******$...+************$...**************$............+*************+..&=****@...#****#...", +"..****-++%-*****+..$****+++%-*****@...+*****#&.&#*****+....=*****#@...+-**$...$****+++%-*****@......#*******@......$******-....&*******....*******%....%******$...+****#+++++++@...****-+++$******+...........+****#++%=****$...%****=..@****=&...", +"..****$....-****$..$****.....=****+...-****#.....#****=...%*****+.......+=$...$****.....=****+......=*******#......$*******@...#*******....*******=....=******$...+****+...........****$....&-****=...........+****+...&****$....-****%.-****%....", +"..****$....+****$..$****.....$****+..@*****.......*****@..-****#.........&%...$****.....$****+.....@********=......$*******$..&********....********+..%*******$...+****+...........****$.....&=****%..........+****+....****%....@****=@****-.....", +"..****$....+****$..$****.....=****&..+****$.......$****+..*****&..............$****.....=****&.....#****+****@.....$****=***&.#***=****....****=***-..=**=****$...+****#+++++++....****$......%****$..........+****+...%****&.....$*********@.....", +"..****$....-****%..$****...@$****=...$****+.......+****$.+****-...............$****...@$****=......=***$.****#.....$****%***#.=**-$****....****$-***@@***%****$...+************....****$......&*****..........+****-$$-****+......&********#......", +"..****-++%-*****&..$*************@...$****+.......+****$.+****$...%$$$$$$$%...$*************@.....@****+.$***=.....$****.****#***+$****....****$+***--***.****$...+************....****$.......*****..........+***********#&.......%******=&......", +"..*************#...$***********=+....$****+.......+****$.+****$...$*******$...$***********=+......#****..+****@....$****.#******=.$****....****$.=******#.****$...+************....****$.......*****..........+*************+.......=*****%.......", +"..************#....$**********-&.....$****+.......+****$.+****$...$*******$...$**********-&.......=***-..&****#....$****.&******%.$****....****$.%******&.****$...+****#+++++++....****$.......*****..........+****-$$$=*****+......@****-........", +"..**********-@.....$****$$*****+.....%****#.......#****%.&*****...$*******$...$****$$*****+......@****=$$$****=....$****..-*****&.$****....****$.&*****-..****$...+****+...........****$......+****$..........+****+....%****-.......****$........", +"..****-++++........$****..$*****&....+****=.......-****+..=****%......****$...$****..$*****&.....#*************@...$****..@****#..$****....****$..#****@..****$...+****+...........****$......-****%..........+****+.....*****.......****$........", +"..****$............$****...=****=&....=****+.....+*****...#****=&.....****$...$****...=****=&....=*************#...$****...=***@..$****....****$..@***=...****$...+****+...........****$.....%*****&..........+****+....&*****.......****$........", +"..****$............$****...&*****$....#****=@...@=****#...&*****=%....****$...$****...&*****$...@**************=...$****...@+++...$****....****$...+++@...****$...+****+...........****$...@$*****#...........+****+...@=****-.......****$........", +"..****$............$****....+*****%....=*****-$-*****=.....%*******$$$****$...$****....+*****%..#****@.....#****@..$****..........$****....****$..........****$...+************$...**************$............+**************%.......****$........", +"..****$............$****.....$*****+...&=***********=&......$*************$...$****.....$*****+.=***=......@****#..$****..........$****....****$..........****$...+************$...*************$.............+*************$........****$........", +"..****$............$****......=****=&...&-*********-&........+=***********%...$****......=****=+****$.......****=..$****..........$****....****$..........****$...+************$...***********=%..............+************%.........****$........", +"..$$$$%............%$$$$......&$$$$$#.....@$=***=$@............+$=***=$#@.....%$$$$......&$$$$$$$$$$@.......%$$$$&.%$$$$..........%$$$$....$$$$%..........$$$$%...@$$$$$$$$$$$$%...$$$$$$$$$+@................@$$$$$$$$$#+...........$$$$%........", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"............................+++++++++@.......@+++++++++@.......@+++++++++++++@..&++++++++++++@...+++++@........+++++@.@+++++......&+++++&.....+#$$$$+@.....@++++...............+++++&......+++++.....&++++@.....@++++&............................", +"............................***********#&....$***********#&....$*************$..+************$...******&......&*****$.@*****@.....#****-....#*********=#...$****..............@*****#......-****.....+****-.....$****&............................", +"............................************=&...$************=&...$*************$..+************$...******#......#*****$..#****-....&*****@..&=************...$****..............#*****=......#****@....$*****.....=***=.............................", +"............................*************=...$*************-...$*************$..+************$...******=.....&******$..&=****@...#****#...=*************...$****..............=******@.....+****+....=*****+...&****$.............................", +"............................****-++%-*****+..$****+++%-*****@..@+++++++#*****#..+****#+++++++@...*******%....%******$...%****=..@****=&..+****=%...@%-**...$****.............@*******#......****$...&******#...+****+.............................", +"............................****$....-****$..$****.....=****+.........&=****-...+****+...........*******=....=******$....-****%.-****%...$****+.......@=...$****...&.........#*******=......-***-...+******-...#****&.............................", +"............................****$....+****$..$****.....$****+.........$****=&...+****+...........********+..%*******$....@****=@****-....$****#............$****..%=.........=********@.....#****...$*******...$***=..............................", +"............................****$....+****$..$****.....=****&........%*****+....+****#+++++++....****=***-..=**=****$.....$*********@....#*****-%@.........$****@-**........@****+****#.....+****+..=*******+..****$..............................", +"............................****$....-****%..$****...@$****=........+*****%.....+************....****$-***@@***%****$.....&********#.....@*********-%&.....$*******=........#****.$***=......****%.&****$***#.@****+..............................", +"............................****-++%-*****&..$*************@.......&=****$......+************....****$+***--***.****$......%******=&......$***********#....$******#&........=***$.+****@.....$***$.+***$%***$.+****...............................", +"............................*************#...$***********=+........-****=&......+************....****$.=******#.****$.......=*****%.......&$***********$...-****-@.........@****+..****#.....%***=.$***%@****.$***-...............................", +"............................************#....$**********-&........#*****@.......+****#+++++++....****$.%******&.****$.......@****-..........@$**********@@=*****...........#****&..-***=.....@****.=***&.****@=***#...............................", +"............................**********-@.....$****$$*****+.......+*****%........+****+...........****$.&*****-..****$........****$.............@%$******#*******...........=****$$$=****@.....****%***=..$***%****+...............................", +"............................****-++++........$****..$*****&.....&=****$.........+****+...........****$..#****@..****$........****$................&-****$**=****..........@*************#.....$***-***$..+********................................", +"............................****$............$****...=****=&....-****=&.........+****+...........****$..@***=...****$........****$.......$%........+****$-@$****..........#*************=.....%*******+..&*******-................................", +"............................****$............$****...&*****$...#*****@..........+****+...........****$...+++@...****$........****$.......$*=%&....&$****%..$****..........=**************@....@*******....=******#................................", +"............................****$............$****....+*****%..***************+.+************$...****$..........****$........****$.......$****=$$$*****=...$************+@****#.....@****#.....******-....#******+................................", +"............................****$............$****.....$*****+.***************+.+************$...****$..........****$........****$.......$*************+...$************+#****@......=***=.....$*****#....+******.................................", +"............................****$............$****......=****=&***************+.+************$...****$..........****$........****$.......%***********=@....$************+=****.......$****@....%*****+.....*****-.................................", +"............................$$$$%............%$$$$......&$$$$$#$$$$$$$$$$$$$$$@.@$$$$$$$$$$$$%...$$$$%..........$$$$%........$$$$%.........+$-****=$+......%$$$$$$$$$$$$+$$$$%.......@$$$$+....@$$$$$......#$$$$%.................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +".....................+++++++++@......&+++++++++@...+++++++++++++.@+++++++++++++++&.@+++++++++@............&+++++............+#$$$$+@....++++++++++++++&.......@%$$$$+&....++++++++++++++&+++++@......@+++++..++++@.....&+++++&....................", +".....................***********#&...+*********$...*************.$***************+.$***********#&.........#*****@.........#*********=#..**************+.....+=********-%..**************+#****=......=****%..****$.....-****$.....................", +".....................************=&..+*********$...*************.$***************+.$************=&........=*****#.......&=************..**************+....$************..**************+.=****%....%****=...****$....%****=&.....................", +".....................*************=..+*********$...*************.$***************+.$*************-.......@******=.......=*************..**************+...$*************..**************+.+****=....=****@...****$...@*****&......................", +".....................****-++%-*****+....$****......****-++++++++.@+++++****-+++++&.$****+++%-*****@......#*******@.....+****=%...@%-**..++++++++-*****@..@*****=+..&%=**..++++++++-*****@..-****#..#****$....****$...=****+.......................", +".....................****$....-****$....$****......****$...............****$.......$****.....=****+......=*******#.....$****+.......@=.........+*****%...-****=&......#*.........+*****%...&*****&&*****&....****$..$****$........................", +".....................****$....+****$....$****......****$...............****$.......$****.....$****+.....@********=.....$****#.................&=****$...&*****&........@........&=****$.....#****##****%.....****$.+****-.........................", +".....................****$....+****$....$****......****-+++++++&.......****$.......$****.....=****&.....#****+****@....#*****-%@..............-****=&...+****-..................-****=&.....&=********=......****$&****=&.........................", +".....................****$....-****%....$****......************+.......****$.......$****...@$****=......=***$.****#....@*********-%&.........$*****&....$****%.................$*****&.......%********@......****$-****+..........................", +".....................****-++%-*****&....$****......************+.......****$.......$*************@.....@****+.$***=.....$***********#.......+*****+.....$****+................+*****+.........-******$.......*********$...........................", +".....................*************#.....$****......************+.......****$.......$***********=+......#****..+****@....&$***********$.....&*****$......$****+...............&*****$..........@******&.......**********@..........................", +".....................************#......$****......****-+++++++&.......****$.......$**********-&.......=***-..&****#......@$**********@....=****=.......$****+...............=****=............#****%........*****=****=..........................", +".....................**********-@.......$****......****$...............****$.......$****$$*****+......@****=$$$****=.........@%$******#...$*****&.......%****$..............$*****&............+****+........*****@#****$.........................", +".....................****-++++..........$****......****$...............****$.......$****..$*****&.....#*************@...........&-****$..+*****+........+****=.............+*****+.............+****+........****$..-****+........................", +".....................****$..............$****......****$...............****$.......$****...=****=&....=*************#..$%........+****$.&*****$..........*****$.......&=..&*****$..............+****+........****$..&****=&.......................", +".....................****$..............$****......****$...............****$.......$****...&*****$...@**************=..$*=%&....&$****%.=****=...........#*****$&...&#**..=****=...............+****+........****$...%****-.......................", +".....................****$...........@$$=****$$%...*************.......****$.......$****....+*****%..#****@.....#****@.$****=$$$*****=.+***************...=******$$-****.+***************......+****+........****$....-****%......................", +".....................****$...........+*********$...*************.......****$.......$****.....$*****+.=***=......@****#.$*************+.+***************...&=************.+***************......+****+........****$....&*****&.....................", +".....................****$...........+*********$...*************.......****$.......$****......=****=+****$.......****=.%***********=@..+***************....&-**********#.+***************......+****+........****$.....%****=.....................", +".....................$$$$%...........@$$$$$$$$$%...$$$$$$$$$$$$$.......$$$$%.......%$$$$......&$$$$$$$$$$@.......%$$$$&..+$-****=$+....@$$$$$$$$$$$$$$$......@#-****$%&..@$$$$$$$$$$$$$$$......@$$$$@........$$$$%......#$$$$+....................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +"..................................................................................................................................................................................................................................................", +".................................................................................................................................................................................................................................................."}; diff --git a/img/banner.xpm b/img/banner.xpm new file mode 100644 index 0000000..e39a46b --- /dev/null +++ b/img/banner.xpm @@ -0,0 +1,533 @@ +/* XPM */ +static char * banner_xpm[] = { +"200 100 430 2", +" c None", +". c #000000", +"+ c #024771", +"@ c #006AAA", +"# c #253D52", +"$ c #778489", +"% c #7C9192", +"& c #767D83", +"* c #7A8A8C", +"= c #62879A", +"- c #15217A", +"; c #3D3595", +"> c #1680A4", +", c #39819B", +"' c #415363", +") c #243847", +"! c #050972", +"~ c #263F54", +"{ c #007CAA", +"] c #4F7289", +"^ c #192A38", +"/ c #3D4546", +"( c #29819F", +"_ c #0065AA", +": c #757B83", +"< c #1D4F4E", +"[ c #576572", +"} c #0020AA", +"| c #777F86", +"1 c #0076AA", +"2 c #0003AA", +"3 c #0C69A7", +"4 c #7A9494", +"5 c #7D9393", +"6 c #2C475D", +"7 c #7C8F91", +"8 c #525F60", +"9 c #009FFF", +"0 c #385C7B", +"a c #B3C6CE", +"b c #BADADB", +"c c #B1BCC5", +"d c #B7CFD2", +"e c #93CAE7", +"f c #2031B7", +"g c #5B4FE0", +"h c #21C0F6", +"i c #56C2E9", +"j c #617D95", +"k c #4A7495", +"l c #394D5F", +"m c #080EAB", +"n c #395F7E", +"o c #00BAFF", +"p c #4AC2ED", +"q c #788EA4", +"r c #95CEEE", +"s c #64899F", +"t c #5A7585", +"u c #262F35", +"v c #3DC1EE", +"w c #0098FF", +"x c #B7DEDE", +"y c #BBDCDD", +"z c #3A434C", +"A c #8397AB", +"B c #0030FF", +"C c #B2BFC9", +"D c #00B1FF", +"E c #0005FF", +"F c #00038D", +"G c #4C6C79", +"H c #06BEFD", +"I c #426A8B", +"J c #41698A", +"K c #BAD7D9", +"L c #B9D6D8", +"M c #A7D3D5", +"N c #111717", +"O c #6494B7", +"P c #A8B2BE", +"Q c #B6CDD2", +"R c #99D0EE", +"S c #99C0D6", +"T c #55646C", +"U c #005AC6", +"V c #0074FF", +"W c #006DFF", +"X c #00011C", +"Y c #283131", +"Z c #416A8B", +"` c #1D2F3E", +" . c #93CCF0", +".. c #426482", +"+. c #9ED2EF", +"@. c #A5C6D7", +"#. c #444D52", +"$. c #02151B", +"%. c #14BFF9", +"&. c #0004C6", +"*. c #8EACAC", +"=. c #32526C", +"-. c #70C3E2", +";. c #71C3E2", +">. c #89CDE7", +",. c #5F7A84", +"'. c #0B6A8A", +"). c #000271", +"!. c #505A5D", +"~. c #B4CBD2", +"{. c #070C0F", +"]. c #B0B9C4", +"^. c #B0BAC4", +"/. c #30C0F2", +"(. c #7FB6D9", +"_. c #B2BEC7", +":. c #6C9FC2", +"<. c #9CD1EF", +"[. c #7792A1", +"}. c #12A9DD", +"|. c #B9D6D7", +"1. c #88C4DB", +"2. c #00A8FF", +"3. c #00121C", +"4. c #141617", +"5. c #B3C4CD", +"6. c #243B4D", +"7. c #B2C0C9", +"8. c #B7CED2", +"9. c #B8D3D5", +"0. c #97CFEE", +"a. c #4A5F6A", +"b. c #042A37", +"c. c #93C9E6", +"d. c #1A95BF", +"e. c #8B989F", +"f. c #A5BFC0", +"g. c #658BA3", +"h. c #97D0F4", +"i. c #8F9FB0", +"j. c #314D63", +"k. c #96CEEE", +"l. c #222E34", +"m. c #3B4043", +"n. c #4F575B", +"o. c #292F30", +"p. c #527EA0", +"q. c #96CEF0", +"r. c #85B7D3", +"s. c #9EA9B2", +"t. c #141516", +"u. c #62686D", +"v. c #56748E", +"w. c #9CA9B7", +"x. c #94CBE9", +"y. c #92C8E2", +"z. c #90C4DB", +"A. c #425B69", +"B. c #074053", +"C. c #778389", +"D. c #3A5E7B", +"E. c #131516", +"F. c #0049FF", +"G. c #007DFF", +"H. c #84B7D3", +"I. c #1094C1", +"J. c #3B3F42", +"K. c #32454F", +"L. c #282F37", +"M. c #B2C2CB", +"N. c #002938", +"O. c #003E55", +"P. c #212D34", +"Q. c #0B0E10", +"R. c #9EA8B0", +"S. c #00141C", +"T. c #516F7D", +"U. c #516262", +"V. c #00458D", +"W. c #6C859C", +"X. c #2080A1", +"Y. c #072A36", +"Z. c #202A32", +"`. c #0039C6", +" + c #1DAADA", +".+ c #566F84", +"++ c #75A2BD", +"@+ c #7B8D8E", +"#+ c #91C7E0", +"$+ c #1E2B30", +"%+ c #63899F", +"&+ c #517080", +"*+ c #0F556D", +"=+ c #126A88", +"-+ c #82B3CD", +";+ c #04151B", +">+ c #5B8AAC", +",+ c #005271", +"'+ c #202C33", +")+ c #335470", +"!+ c #68717A", +"~+ c #0D151C", +"{+ c #3C4446", +"]+ c #101619", +"^+ c #003355", +"/+ c #B6CDD3", +"(+ c #79838E", +"_+ c #21313D", +":+ c #0085FF", +"<+ c #9DA7AF", +"[+ c #3B4144", +"}+ c #B7CDD4", +"|+ c #899299", +"1+ c #B4C9D0", +"2+ c #27292B", +"3+ c #454B51", +"4+ c #8A96A2", +"5+ c #0D7FA6", +"6+ c #4E5357", +"7+ c #4CACCF", +"8+ c #7A898C", +"9+ c #35497B", +"0+ c #1D414E", +"a+ c #111829", +"b+ c #3D5590", +"c+ c #4F6EB9", +"d+ c #00A5E2", +"e+ c #43637A", +"f+ c #2C3239", +"g+ c #070A3B", +"h+ c #2C3D66", +"i+ c #3E494A", +"j+ c #141FB0", +"k+ c #093B3C", +"l+ c #1BB2B4", +"m+ c #B4CCD2", +"n+ c #002A55", +"o+ c #BCDEDE", +"p+ c #2C43BD", +"q+ c #0F163F", +"r+ c #273CDE", +"s+ c #5870B0", +"t+ c #0015FF", +"u+ c #3C4270", +"v+ c #6489A0", +"w+ c #05151B", +"x+ c #304149", +"y+ c #A2B7BA", +"z+ c #729DB3", +"A+ c #2B4760", +"B+ c #111314", +"C+ c #525E5E", +"D+ c #395A74", +"E+ c #111A21", +"F+ c #A3BBBD", +"G+ c #141717", +"H+ c #213342", +"I+ c #080D10", +"J+ c #0F1550", +"K+ c #1C186E", +"L+ c #3C4245", +"M+ c #61696F", +"N+ c #3D4647", +"O+ c #322BC7", +"P+ c #636D72", +"Q+ c #3C4345", +"R+ c #426784", +"S+ c #090D11", +"T+ c #89969D", +"U+ c #657274", +"V+ c #4B7595", +"W+ c #1E2B35", +"X+ c #4E565A", +"Y+ c #282E2F", +"Z+ c #3D4A4A", +"`+ c #4C7696", +" @ c #202C36", +".@ c #B5CBD2", +"+@ c #404748", +"@@ c #8A949C", +"#@ c #667576", +"$@ c #3E4848", +"%@ c #3F4245", +"&@ c #353F49", +"*@ c #080C2C", +"=@ c #0F1113", +"-@ c #0D1012", +";@ c #6A7E91", +">@ c #515B5D", +",@ c #282B4B", +"'@ c #343760", +")@ c #0305A7", +"!@ c #667585", +"~@ c #B7D1D4", +"{@ c #7A8B8D", +"]@ c #505F6D", +"^@ c #282D2E", +"/@ c #8EA0A3", +"(@ c #0F0D1A", +"_@ c #7667CF", +":@ c #8574E9", +"<@ c #3956C4", +"[@ c #48535F", +"}@ c #647074", +"|@ c #141818", +"1@ c #19242E", +"2@ c #4C6D89", +"3@ c #78878C", +"4@ c #2C274E", +"5@ c #8675F7", +"6@ c #1D2126", +"7@ c #0087E2", +"8@ c #004371", +"9@ c #14404F", +"0@ c #005BFF", +"a@ c #594D9B", +"b@ c #748698", +"c@ c #002138", +"d@ c #79AEC2", +"e@ c #0039FF", +"f@ c #1A1F24", +"g@ c #699BBD", +"h@ c #A2C5C5", +"i@ c #1D1933", +"j@ c #00111C", +"k@ c #3A5569", +"l@ c #81B7D8", +"m@ c #6899BB", +"n@ c #0F17F2", +"o@ c #4A4081", +"p@ c #719BAE", +"q@ c #324C5F", +"r@ c #80B1CE", +"s@ c #76AACB", +"t@ c #2134E4", +"u@ c #30424B", +"v@ c #101921", +"w@ c #8C9EA3", +"x@ c #25414B", +"y@ c #6DB8D8", +"z@ c #6598BA", +"A@ c #B9D5D7", +"B@ c #7B8E8F", +"C@ c #81B0C7", +"D@ c #6B91AF", +"E@ c #6393B6", +"F@ c #687B7B", +"G@ c #127778", +"H@ c #626A6F", +"I@ c #778A9A", +"J@ c #ABC4CB", +"K@ c #30424A", +"L@ c #91C6DE", +"M@ c #001EFF", +"N@ c #0052FF", +"O@ c #5DC6C7", +"P@ c #158A8C", +"Q@ c #343E48", +"R@ c #4E799A", +"S@ c #8D7CF7", +"T@ c #1A1648", +"U@ c #031414", +"V@ c #325D7D", +"W@ c #109EFD", +"X@ c #405863", +"Y@ c #789394", +"Z@ c #0F6264", +"`@ c #4DAFEB", +" # c #020209", +".# c #32526D", +"+# c #BBDDDE", +"@# c #759095", +"## c #189EA0", +"$# c #09668A", +"%# c #029CFE", +"&# c #0C103E", +"*# c #324551", +"=# c #63C3E6", +"-# c #21414D", +";# c #131F29", +"># c #6797BA", +",# c #54778B", +"'# c #062728", +")# c #0896DF", +"!# c #0098FE", +"~# c #070923", +"{# c #699ABD", +"]# c #5B7F93", +"^# c #152D39", +"/# c #497495", +"(# c #022637", +"_# c #019BFE", +":# c #6994B5", +"<# c #556472", +"[# c #131416", +"}# c #53A5C9", +"|# c #7EB6D9", +"1# c #02588C", +"2# c #7CC3DE", +"3# c #0A0E35", +"4# c #506E7C", +"5# c #729BB9", +"6# c #757D83", +"7# c #87BEDF", +"8# c #0088E1", +"9# c #111220", +"0# c #8FA4A5", +"a# c #9BC4D7", +"b# c #7FB6D8", +"c# c #033253", +"d# c #78868B", +"e# c #2C4A62", +"f# c #709AB9", +"g# c #717B82", +"h# c #A1C7D6", +"i# c #83B8D8", +"j# c #A0B2B8", +"k# c #538294", +"l# c #07151A", +"m# c #282C2E", +"n# c #1B2A35", +"o# c #31444E", +"p# c #34424A", +"q# c #262A2C", +"r# c #344148", +"s# c #2C3D48", +"t# c #2A3D48", +"u# c #0D1518", +"v# c #29414A", +"w# c #3C4144", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . + @ @ @ @ @ # # # # # $ % % % % & & & & & & & & & * = = = = = = = = - ; > > > > > > > > , ' ' ' ' ) . . . . . . . . > > > > > > > ; ; ; ; ! & & & & & & & ~ { { { { { { { ] ] ] ] ] ^ / / / . . . . . . . . . . . . . . . . . . . . . . . . . . . ( ( ( ( ( ( ( _ : : : & < . . . . . . . . [ [ ( } } } } } } | 1 2 2 2 2 . . . . . . . . . . . . . . . . . . . . . . . 3 4 4 4 5 6 6 6 6 6 6 7 7 7 8 . . . ", +". . @ 9 9 9 9 9 0 0 0 0 0 a b b b b c c c c c c c c c d e e e e e e e e f g h h h h h h h h i j k k k l . . . . . . . . h h h h h h h g g g g m c c c c c c c n o o o o o o o o o o o o p q q q q r s t u . . . . . . . . . . . . . . . . . . . . . . v v v v v v v w x x x y 6 . . . . . . . . z A v B B B B B B C D E E E E F . . . . . . . . . . . . . . . . . . . . . G H x x x y I I I I I J K L M N . . . ", +". . @ 9 9 9 9 9 O O O O O P Q Q Q Q c c c c c c c c c d e e e e e e e e f g h h h h h h h h i j k k k l . . . . . . . . h h h h h h h g g g g m c c c c c c c n o o o o o o o o o o o o p q q q q r r r R S T . . . . . . . . . . . . . . . . . . . . v v v v v v v w x x x y 6 . . . . . . . . . U V V V V V V V C C C W E E E X . . . . . . . . . . . . . . . . . . . Y x x I I I I I I I I c K I Z ` . . . . ", +". . @ 9 9 9 9 9 . . . . ...C C C C c c c c c c c c c d e e e e e e e e f g h h h h h h h h i j k k k l . . . . . . . . h h h h h h h g g g g m c c c c c c c n o o o o o o o o o o o o p q q q q r r r r r +.@.#.. . . . . . . . . . . . . . . . . . v v v v v v v w x x x y 6 . . . . . . . . . $.%.%.%.%.%.%.%.C C C W E E E &.. . . . . . . . . . . . . . . . . . . *.x x I I I I I I I I c K I =.. . . . . ", +". . @ 9 9 9 9 9 . . . . ...C C C C c c c c c c c c c d e e e e e e e e f g h h h h h h h h i j k k k l . . . . . . . . h h h h h h h g g g g m c c c c c c c n o o o o o o o o o o o o p q q q q -.-.-.-.-.-.;.>.,.. . . . . . . . . . . . . . . . . v v v v v v v w x x x y 6 . . . . . . . . . . '.%.%.%.%.%.%.C C C W E E E E ).. . . . . . . . . . . . . . . . . !.~.~.~.I I I I I I I I c K I {.. . . . . ", +". . @ 9 9 9 9 9 . . . . ...C C C C c c c c c c c c c d A A A A A A A A ].^././././././././.i (.k k k l . . . . . . . . e e e e e f g h h h h h h h h i j c c c .o o o o o o _.:.:.:.:.:.:.:.:.:.q q q q k r r r <.[.. . . . . . . . . . . . . . . . v v v v v v v w x x x y 6 . . . . . . . . . . . }.%.%.%.%.%.|.|.|.1.2.2.2.2.2.3.. . . . . . . . . . . . . . . 4.5.5.5.5.I I I I I I I I c K 6.. . . . . . ", +". . @ 9 9 9 9 9 . . . . ...C C C C 7.7.7.7.7.7.7.7.7.8.c c c c c c c c 8.9.e e e e e e e e i g k k k l . . . . . . . . e e e e e f g h h h h h h h h i j c c c .o o o o o o q o o o o o o o o o q q q q k r r r r 0.a.. . . . . . . . . . . . . . . 1.1.1.1.1.1.1.H x x x y 6 . . . . . . . . . . . b.%.%.%.%.%.x x x c.h h h h h d.. . . . . . . . . . . . . . . e.5.5.5.5.I I I I I I I I c f.. . . . . . . ", +". . g.h.h.h. . . . . . . . . .i.C C C C C c c c c c c c c c c ~.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.8.k k k j.. . . . . . . . e e e e e f g h h h h h h h h i j c c c .o o o o o o q o o o o o o o o o q q q q k r r r r r k.l.. . . . . . . . . . . . . . |.x x x x x x x I I I I 6 . . . . . . . . . . . . '.%.%.%.%.x x x c.h h h h h h m.. . . . . . . . . . . . . n.5.5.5.5.5.I I I I I I I I c o.. . . . . . . ", +". . g.h.h.h. . . . . . . . . .i.C C C C C c c c c c c c c c c ~.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.8.k k k j.. . . . . . . . e e e e e f g h h h h h h h h i j j j j p.q.q.q.q.q.q.q o o o o o o o o o q q q q k r r r r r r r.. . . . . . . . . . . . . . |.x x x x x x x I I I I 6 . . . . . . . . . . . . $.}.%.%.%.x x x c.h h h h h h s.t.. . . . . . . . . . . 4.5.5.5.5.5.5.I I I I I I I I u.. . . . . . . . ", +". . g.h.h.h. . . . . . . . . .i.C C C C C c c c c c c c c c c ~.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.8.k k k j.. . . . . . . . e e e e e f g h h h h h h h h i j k k k v.w.w.w.w.w.w.q o o o o o o o o o x.x.x.x.y.z.z.z.z.z.r r A.. . . . . . . . . . . . . a ~.~.~.~.~.~.~.I I I I 6 . . . . . . . . . . . . . B.%.%.%.x x x c.h h h h h h C | . . . . . . . . . . . C.5.5.5.5.5.5.I I I I I I I D.E.. . . . . . . . ", +". . g.h.h.h. . . . . . . . . .i.C C A A A _.7.7.7.7.7.7.C C C ~.d d d d d d 9.9.9.9.9.9.9.9.9.8.k k k j.. . . . . . . . e e e e e f g h h h h h h h h i j k k k v.w.w.w.w.w.w.q o o o o o o o o o F.F.F.F.G.%.%.%.%.%.r r H.. . . . . . . . . . . . . _.5.5.5.5.5.5.5.I I I I 6 . . . . . . . . . . . . . . I.%.%.x x x c.h h h h h h C C m.. . . . . . . . . J.5.5.5.5.5.5.5.r r r r r r r K.. . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . L.C M.M.M.M.M.M.M.M.M.~.8./ . . . . . . . . . . . . . . . . . . . . . . . . . . e e e e e f g h h h h h > . . . . . . . . . . . . . . . . . . N.O.{ o o o F.F.F.F.G.%.%.%.%.%.r r r P.. . . . . . . . . . . . _.5.5.5.5.5.5.5.I I I I 6 . . . . . . . . . . . . . . $.%.%.x x x c.h h h h h h C C s.. . . . . . . . Q.R.5.5.5.5.5.5.5.o o o o o o { . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . L.C M.M.M.M.M.M.M.M.M.~.8./ . . . . . . . . . . . . . . . . . . . . . . . . . . e e e e e f g h h h h h > . . . . . . . . . . . . . . . . . . . . . S.{ o F.F.F.F.G.%.%.%.%.%.y.y.y.T.. . . . . . . . . . . . _.5.5.5.5.5.5.5.I I I I 6 . . . . . . . . . . . . . . . U.x e e e e e e e e W g h.G.G.V.. . . . . . . ' j j W.5.5.5.5.5.5.5.^.I I D.{.. . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . L.C M.M.M.M.M.M.M.M.M.~.8./ . . . . . . . . . . . . . . . . . . . . . . . . . . A A A A A ].^./././././.X.. . . . . . . . . . . . . . . . . . . . . . . { F.F.F.F.G.%.%.%.%.%.%.%.%.}.. . . . . . . . . . . . _.5.5.5.5.5.5.5.I I I I 6 . . . . . . . . . . . . . . . . *.e e e e e e e e W g I h h h Y.. . . . . Z.j j j W.5.5.5.5.5.5.5.^.I I ` . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . L.C M.M.M.M.M.M.M.M.M.~.8./ . . . . . . . . . . . . . . . . . . . . . . . . . . c c c c c 8.9.e e e e e = . . . . . . . . . . . . . . . . . . . . . . . . `.F.F.F.G.%.%.%.%.%.%.%.%.%.. . . . . . . . . . . . _.5.5.5.5.5.5.5.I I I I 6 . . . . . . . . . . . . . . . . Y e e e e e e e e W g I h h h +. . . . . .+j j j W.5.5.5.5.5.7.7.i.h.++. . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . L.C M.M.M.M.M.M.M.M.M.~.8./ . . . . . . . . . . . . . . . . . . . . . . . . . . ~.9.9.9.9.9.9.9.9.9.9.9.@+. . . . . . . . . . . . . . . . . . . . . . . . N.o h q q q q q q q #+1.1.1.$+. . . . . . . . . . . _.5.5.5.5.5.5.5.r r r r %+. . . . . . . . . . . . . . . . . &+e e e e e e e W g I h h h h *+. . . =+j j j j W.5.5.5.5.5.c c n o S.. . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . L.C M.M.M.M.M.M.M.M.M.~.8./ . . . . . . . . . . . . . . . . . . . . . . . . . . ~.9.9.9.9.9.9.9.9.9.9.9.@+. . . . . . . . . . . . . . . . . . . . . . . . . o h q q q q q q q G.%.%.%.B.. . . . . . . . . . . _.5.5.5.5.5.5.5.o o o o { . . . . . . . . . . . . . . . . . . -+e e e e e e W g I h h h h h ;+. Y.h >+>+>+>+k M.M.M.M.M.c c n ,+. . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . L.q P M.M.M.M.M.M.M.a 8.8./ . . . . . . . . . . . . . . . . . . . . . . . . . . ~.9.9.9.9.9.9.9.9.9.9.9.@+. . . . . . . . . . . . . . . . . . . . . . . . . X.i 0 0 0 0 0 0 0 G.%.%.%.B.. . . . . . . . . . . j j W.5.5.5.5.5.5.5.^.I 6 . . . . . . . . . . . . . . . . . . '+e e e e e e W g I h h h h h d.. +h g g g g m c c c c c c c )+. . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . L.q P M.M.M.M.M.M.M.a 8.8./ . . . . . . . . . . . . . . . . . . . . . . . . . . ~.d d d d d d 9.9.9.9.9.@+. . . . . . . . . . . . . . . . . . . . . . . . . !+v.F.F.F.F.F.F.F.G.%.%.%.B.. . . . . . . . . . . j j W.5.5.5.5.5.5.5.^.I 6 . . . . . . . . . . . . . . . . . . . = e e e e e W g I h h h h h h +h h g g g g m c c c c c c c ~+. . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . L.q P M.M.M.M.M.M.M.5.~.~.{+. . . . . . . . . . . . . . . . . . . . . . . . . . ~.8.8.8.8.8.8.9.9.9.9.9.@+. . . . . . . . . . . . . . . . . . . . . . . . . !+v.F.F.F.F.F.F.F.G.%.%.%.B.. . . . . . . . . . . j j W.5.5.5.5.5.7.7.i.h.g.. . . . . . . . . . . . . . . . . . . ]+-+e e e e W g I h h h h h h h h h g g g g m c c c c c c u.. . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . L.q P M.M.M.M.M.~.~._.w w ^+. . . . . . . . . . . . . . . . . . . . . . . . . . /+8.8.8.8.8.8.9.9.9.9.9.@+. . . . . . . . . . . . . . . . . . . . . . . . . (+v.F.F.F.F.F.F.F.G.%.%.%.b.. . . . . . . . . . . j j W.5.5.5.5.5.c c n o { . . . . . . . . . . . . . . . . . . . . _+O O O O y.:+I h h h h h h h h h g g g g m c c c c c <+. . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . [+M.5.a a a a a ~.~._.w w ^+. . . . . . . . . . . . . . . . . . . . . . . . . . }+8.8.8.8.8.8.9.9.9.9.9.@+. . . . . . . . . . . . . . . . . . . . . . . . . w.v.F.F.F.F.F.F.F.G.%.%.%.. . . . . . . . . . . . >+>+k M.M.M.M.M.c c n o { . . . . . . . . . . . . . . . . . . . . . |+c c c 1+9.I h h h h h h h h h g g g g m c c c c c 2+. . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . / d Q ~.~.~.~.~.~.~._.w w ^+. . . . . . . . . . . . . . . . . . . . . . . . . . ~.8.8.8.8.8.8.9.9.9.9.9.@+. . . . . . . . . . . . . . . . . . . . . . . . 3+w.v.F.F.F.F.F.F.F.G.%.%.}.. . . . . . . . . . . . g g m c c c c c c c n o { . . . . . . . . . . . . . . . . . . . . . E.c c c c d e e e e e e e e f g h h h h h h h h i ' . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . / d Q ~.~.~.~.~.~.~._.w w ^+. . . . . . . . . . . . . . . . . . . . . . . . . . ~.8.8.8.8.8.8.9.9.9.9.9.@+. . . . . . . . . . . . . . . . . . . . . . . . 4+w.v.F.F.F.F.F.F.F.G.%.%.5+. . . . . . . . . . . . g g m c c c c c c c n o { . . . . . . . . . . . . . . . . . . . . . . 6+c c c d e e e e e e e e f g h h h h h h h h 7+Q.. . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . / d Q ~.~.~.~.~.~.~._.w w ^+. . . . . . . . . . . . . . . . . . . . . . . . . . ~.8.8.8.8.8.8.8.8.8.8.8.8+. . . . . . . . . . . . . . . . . . . . . . . 9+w.w.v.F.F.F.F.F.F.F.G.%.%.B.. . . . . . . . . . . . g g m c c c c c c c n o { . . . . . . . . . . . . . . . . . . . . . . . |+c c d e e e e e e e e f g h h h h h h h h 0+. . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . / d Q ~.~.~.~.~.~.~._.w w ^+. . . . . . . . . . . . . . . . . . . . . . . . . . 8.8.8.8.8.8.8.q C C C C | . . . . . . . . . . . . . . . . . . . . . a+b+c+c c c c c c n o o o o o d+. . . . . . . . . . . . . g g m c c c c c c c n o { . . . . . . . . . . . . . . . . . . . . . . . 2+c c d e e e e e e e e f g h h h h h h h d.. . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . / d Q ~.~.~.~.~.~.~._.w w ^+. . . . . . . . . . . . . . . . . . . . . . . . . . 8.8.8.8.8.8.8.1.O O O O e+. . . . . . . . . . . . . . . . f+f+g+h+b+c+c+c+c c c c c c n o o o o o ,+. . . . . . . . . . . . . g g m c c c c c c c n o { . . . . . . . . . . . . . . . . . . . . . . . . u.c d e e e e e e e e f g h h h h h h h ;+. . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . i+y y y y y y y ~.5.w w w ^+. . . . . . . . . . . . . . . . . . . . . . . . . . ~.~.~.~.~.~.~.1.O O O O O O O O O x x x x x x x x x ~.A A A A j+c+c+c+c+c+c c c c c c n o o o o d+. . . . . . . . . . . . . . h h h h h h i j c c c .{ . . . . . . . . . . . . . . . . . . . . . . . . . <+d e e e e e e e e f g h h h h h h *+. . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . k+l+l+l+l+l+l+l+m+a G.G.G.n+. . . . . . . . . . . . . . . . . . . . . . . . . . w w w w w w w 1.O O O O O O O O O x x x x x x x x x ~.A A A A j+c+c+c+c+c+c c c c c c n o o o o N.. . . . . . . . . . . . . . h h h h h h i j c c c .{ . . . . . . . . . . . . . . . . . . . . . . . . . 2+d e e e e e e e e f g h h h h h d.. . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . k+l+l+l+l+l+l+l+l+o+p+p+p+q+. . . . . . . . . . . . . . . . . . . . . . . . . . w w w w w w w 1.O O O O O O O O O x x x x x x x x x ~.Q Q Q Q r+s+s+s+s+s+c c c c c c n o o o O.. . . . . . . . . . . . . . . h h h h h h i j c c c .{ . . . . . . . . . . . . . . . . . . . . . . . . . . * e e e e e e e e f g h h h h h ;+. . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . k+l+l+l+l+l+l+l+l+o+p+p+p+q+. . . . . . . . . . . . . . . . . . . . . . . . . . w w w w w w w 1.O O O O O O O O O x x x x x x x x x ~.x x x x t+u+u+u+u+u+c c c c c c n o o O.. . . . . . . . . . . . . . . . h h h h h h i j j j j p.v+. . . . . . . . . . . . . . . . . . . . . . . . . . / A A A A A A A A ].^./././././.w+. . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . k+l+l+l+l+l+l+l+l+o+p+p+p+q+. . . . . . . . . . . . . . . . . . . . . . . . . . w w w w w w w 1.O O O O O O O O O x x x x x x x x x ~.x x x x t+u+u+u+u+u+i.i.i.i.i.i.n z.x+. . . . . . . . . . . . . . . . . h h h h h h i j k k k v.!+. . . . . . . . . . . . . . . . . . . . . . . . . . y+c c c c c c c c 8.9.e e e e e z+. . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . k+l+l+l+l+l+l+l+l+o+p+p+p+q+. . . . . . . . . . . . . . . . . . . . . . . . . . w w w w w w w 1.O O O O O O O O O x x x x x x x x x ~.x x x x t+u+u+u+u+u+k k k k k k A+B+. . . . . . . . . . . . . . . . . . h h h h h h i j k k k v.!+. . . . . . . . . . . . . . . . . . . . . . . . . u.c c c c ~.9.9.9.9.9.9.9.9.9.9.9.9.C+. . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . k+l+l+l+l+l+l+l+l+o+p+p+p+q+. . . . . . . . . . . . . . . . . . . . . . . . . . w w w w w w w 1.O O O O O O O O O x x x x x x x x x ~.x x x x t+u+u+u+u+u+k k k k D+E+. . . . . . . . . . . . . . . . . . . . h h h h h h i j k k k v.!+. . . . . . . . . . . . . . . . . . . . . . . . 2+c c c c c ~.9.9.9.9.9.9.9.9.9.9.9.9.F+G+. . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . k+l+l+l+l+l+l+l+l+o+p+p+p+q+. . . . . . . . . . . . . . . . . . . . . . . . . . w w w w w w w 1.O O O O O O O O O o+o+o+o+o+o+o+o+o+~.x x x x t+u+u+u+u+u+k D+H+I+. . . . . . . . . . . . . . . . . . . . . . h h h h h h i j k k k v.!+. . . . . . . . . . . . . . . . . . . . . . . . <+c c c c c ~.9.9.9.9.9.9.9.9.9.9.9.9.9.@+. . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . k+l+l+l+l+l+l+l+l+o+p+p+p+q+. . . . . . . . . . . . . . . . . . . . . . . . . . w w w w w w w M.~.8.8.8.8.8.8.8.8.O O O O O O a x x x J+J+J+J+J+J+J+J+K+L+. . . . . . . . . . . . . . . . . . . . . . . . . . /./././././.i (.k k k v.!+. . . . . . . . . . . . . . . . . . . . . . . M+7.7.7.C C C ~.d d d d d d 9.9.9.9.9.9.9.9.N+. . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . k+l+l+l+l+l+l+l+l+o+p+p+p+q+. . . . . . . . . . . . . . . . . . . . . . . . . . G.G.G.G.G.G.G.a A p.p.p.p.p.p.p.p.O O O O O O a x x x J+J+J+J+J+J+J+J+O+P+. . . . . . . . . . . . . . . . . . . . . . . . . . e e e e e e i g k k k v.!+. . . . . . . . . . . . . . . . . . . . . . E.M.M.M.M.M.M.M.~.8.8.8.8.8.8.9.9.9.9.9.9.9.9.F+G+. . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . Q+1+1+1+1+1+q.p+p+p+p+p+p+q+. . . . . . . . . . . . . . . . . . . . . . . . . . p+p+p+p+p+p+p+~.(.w w w _ . . . . . . _+_+e+O a x x x J+J+J+J+J+J+J+J+O+a R+S+. . . . . . . . . . . . . . . . . . . . . . . . 9.9.9.9.9.9.9.8.k k k k j.. . . . . . . . . . . . . . . . . . . . . . T+M.M.M.M.M.M.M.~.8.8.8.8.8.8.9.9.9.9.9.9.9.9.9.U+. . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . Q+1+1+1+1+1+q.p+p+p+p+p+p+q+. . . . . . . . . . . . . . . . . . . . . . . . . . p+p+p+p+p+p+p+~.(.w w w _ . . . . . . . . . . P+x x x J+J+J+J+J+J+J+J+O+a k V+W+. . . . . . . . . . . . . . . . . . . . . . . 9.9.9.9.9.9.9.8.k k k k j.. . . . . . . . . . . . . . . . . . . . . X+M.M.M.M.M.M.M.M.~.8.8.8.8.8.8.9.9.9.9.9.9.9.9.9.8.Y+. . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . Q+1+1+1+1+1+q.p+p+p+p+p+p+q+. . . . . . . . . . . . . . . . . . . . . . . . . . p+p+p+p+p+p+p+~.(.w w w _ . . . . . . . . . . . Z+x x J+J+J+J+J+J+J+J+O+a k k `+ @. . . . . . . . . . . . . . . . . . . . . . 9.9.9.9.9.9.9.8.k k k k j.. . . . . . . . . . . . . . . . . . . . E.M.M.M.M.M.M.M.M.M.~.8.8.8.8.8.8.9.9.9.9.9.9.9.9.9.8.F+. . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . Q+1+1+1+1+1+q.p+p+p+p+p+p+q+. . . . . . . . . . . . . . . . . . . . . . . . . . p+p+p+p+p+p+p+~.(.w w w _ . . . . . . . . . . . . Z+x J+J+J+J+J+J+J+J+O+a ~.~.~..@+@. . . . . . . . . . . . . . . . . . . . . 9.9.9.9.9.9.9.8.k k k k j.. . . . . . . . . . . . . . . . . . . . @@M.M.M.M.M.M.M.M.M.~.8.8.8.8.8.8.9.9.9.9.9.9.9.9.9.8.9.#@. . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . Q+1+1+1+1+1+q.p+p+p+p+p+p+q+. . . . . . . . . . . . . . . . . . . . . . . . . . p+p+p+p+p+p+p+~.(.w w w _ . . . . . . . . . . . . . $@J+J+J+J+J+J+J+J+O+a 9.9.9.9.9.%@. . . . . . . . . . . . . . . . . . . . 9.9.9.9.9.9.9.8.k k k k j.. . . . . . . . . . . . . . . . . . . &@C M.M.M.M.M.M.M.M.M.~.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.Q 9.9.Y+. . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . Q+1+1+1+1+1+q.p+p+p+p+p+p+q+. . . . . . . . . . . . . . . . . . . . . . . . . . p+p+p+p+p+p+p+~.(.w w w _ . . . . . . . . . . . . . . *@J+J+J+J+J+J+J+O+a 9.9.9.9.9.s.=@. . . . . . . . . . . . . . . . . . . 9.9.9.9.9.9.9.8.k k k k j.. . . . . . . . . . . . . . . . . . -@;@q P M.M.M.M.M.M.M.a 8.8.8.y+>@8.8.q C C C C C C C C C x x *.. . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . Q+1+1+1+1+1+q.p+p+p+p+p+p+q+. . . . . . . . . . . . . . . . . . . . . . . . . . p+p+p+p+p+p+p+~.(.w w w _ . . . . . . . . . . . . . . . ,@'@'@'@'@'@'@)@W.9.9.9.9.9.C !@. . . . . . . . . . . . . . . . . . . 9.9.9.9.9.9.9.8.~@~@~@~@{@. . . . . . . . . . . . . . . . . . ]@q q P M.M.M.M.M.M.M.a 8.8.8.^@. /@8.1.O O O O O O O O O x x x U.. . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . Q+1+1+1+1+1+q.p+p+p+p+p+p+q+. . . . . . . . . . . . . . . . . . . . . . . . . . p+p+p+p+p+p+p+~.(.w w w _ . . . . . . . . . . . . . . . (@_@:@:@:@:@:@<@#+9.9.9.9.9.C A [@. . . . . . . . . . . . . . . . . . 9.9.9.9.9.9.9.8.9.9.9.9.@+. . . . . . . . . . . . . . . . . L.q q q P M.M.M.M.M.M.M.5.~.~.}@. . 4.~.1.O O O O O O O O O x x x x |@. . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . 1@2@2@2@2@2@-.p+p+p+p+p+p+q+. . . . . . . . . . . . . . . . . . . . . . . . . . p+p+p+p+h #+#+~.~.~.~.~.3@. . . . . . . . . . . . . . . . 4@:@:@:@:@:@:@5@9.9.9.9.9.9.9.m+6@. . . . . . . . . . . . . . . . . 9.9.9.9.9.9.9.8.9.9.9.9.@+. . . . . . . . . . . . . . . . -@;@q q q P M.M.M.M.M.~.~._.w 7@. . . . 8@1.O O O O O O O O O x x x x *.. . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . 9@v v v v v 0@p+p+p+p+p+p+q+. . . . . . . . . . . . . . . . . . . . . . . . . . p+p+p+p+h #+#+~.~.~.~.~.3@. . . . . . . . . . . . . . . . . a@:@:@:@:@:@5@9.9.9.9.9.9.9.m+b@. . . . . . . . . . . . . . . . . 8.8.8.8.8.8.8.Q 9.9.9.9.@+. . . . . . . . . . . . . . . . ]@M.M.M.M.5.a a a a a ~.~._.w c@. . . . . d@O O O O O O O O O x x x x x Z+. . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . 9@v v v :+p+p+p+1+1+e@p+p+q+. . . . . . . . . . . . . . . . . . . . . . . . . . p+p+p+p+h #+#+~.~.~.~.~.3@. . . . . . . . . . . . . . . . . (@_@:@:@:@:@5@9.9.9.9.9.9.9.m+A z . . . . . . . . . . . . . . . . C C C C C C C C x x x x 4 . . . . . . . . . . . . . . . f@q d d d d Q ~.~.~.~.~.~.~._._ . . . . . . $+O g@O O O O O O O x x x x x h@|@. . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . 9@v v v :+p+p+p+1+1+e@p+p+q+. . . . . . . . . . . . . . . . . . . . . . . . . . p+p+p+p+h #+#+~.~.~.~.~.3@. . . . . . . . . . . . . . . . . . i@:@:@:@:@5@9.9.9.9.9.9.9.m+A A ]+. . . . . . . . . . . . . . . O O O O O O O O x x x x 4 . . . . . . . . . . . . . . . ;@q d d d d Q ~.~.~.~.~.~.~.R.j@. . . . . . . k@l@m@O O O O O O x x x x x x 4 . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . 9@v v v :+p+p+p+c.c.n@p+p+q+. . . . . . . . . . . . . . . . . . . . . . . . . . p+p+p+p+h #+#+~.~.~.~.~.3@. . . . . . . . . . . . . . . . . . . o@:@:@:@5@9.9.9.9.9.9.9.m+A A p@. . . . . . . . . . . . . . . O O O O O O O O x x x x 4 . . . . . . . . . . . . . . q@c c d d d d Q ~.~.~.~.~.~.~.J.. . . . . . . . . r@s@O O O O O O x x x x x x x Z+. . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . 9@v v v :+p+p+p+v v t@p+p+q+. . . . . . . . . . . . . . . . . . . . . . . . . . p+p+p+p+h #+#+~.~.~.~.~.3@. . . . . . . . . . . . . . . . . . . . _@:@:@5@9.9.9.9.9.9.9.m+A A #+u@. . . . . . . . . . . . . . O O O O O O O O x x x x 4 . . . . . . . . . . . . . v@q d d d d d d Q ~.~.~.~.~.~.w@. . . . . . . . . . x@y@z@O O O O O x x x x x x x h@. . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . 9@v v v :+p+p+p+v v t@p+p+q+. . . . . . . . . . . . . . . . . . . . . . . . . . p+p+p+p+h #+#+A@A@A@A@A@B@. . . . . . . . . . . . . . . . . . . . i@:@:@5@9.9.9.9.9.9.9.m+A A #+C@t.. . . . . . . . . . . . . O O O O O O O O x x x x 4 . . . . . . . . . . . . . R+q d d d d d d Q ~.~.~.~.~.~.4.. . . . . . . . . . . ]@D@E@O O O O o+o+o+o+o+o+o+o+F@. . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . 9@v v v :+p+p+p+v v t@p+p+q+. . . . . . . . . . . . . . . . . . . . . . . . . . p+p+p+p+F.G.G.l+l+l+l+l+G@. . . . . . . . . . . . . . . . . . . . . a@:@5@1+1+1+1+1+1+1+a a a #+#+H@. . . . . . . . . . . . . O O O O O O O O x x x x 4 . . . . . . . . . . . . H+k d d d b y y y y y y y y y !.. . . . . . . . . . . . -@I@J@8.8.8.8.O O O O O O a x x Y . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . K@L@L@L@D m m m v v t@p+p+q+. . . . . . . . . . . . . . . . . . . . . . . . . . p+p+p+p+M@N@N@l+l+l+l+l+G@. . . . . . . . . . . . . . . . . . . . . (@_@5@O O O O O O O ].x x #+#+C o.. . . . . . . . . . . . O O O O O O O O x x x x 4 . . . . . . . . . . . I+k k d d d O@l+l+l+l+l+l+l+l+P@. . . . . . . . . . . . . . Q@R@p.p.p.p.O O O O O O a x x h@. . . . . . . ", +". . . . . . . . . . . . . . . . . . . . L.q q q y.S@S@S@v v t@p+p+q+. . . . . . . . . . . . . . . . . . . . . . . . . . p+p+p+p+M@N@N@l+l+l+l+l+G@. . . . . . . . . . . . . . . . . . . . . . T@)@O O O O O O O ].x x #+#+C f.. . . . . . . . . . . . O O O O O O O O x x x x 4 . . . . . . . . . . . D+k k d d d O@l+l+l+l+l+l+l+l+U@. . . . . . . . . . . . . . . V@W@w w w O O O O O O a x x x *@. . . . . . ", +". . . . . . . . . . . . . . . . . . . . L.q q q y.S@S@S@v v t@p+p+q+. . . . . . . . . . . . . . . . . . . . . . . . . . p+p+p+p+p+p+p+l+l+l+l+l+G@. . . . . . . . . . . . . . . . . . . . . . . a@i.b b b b b b b b b #+#+#+#+X@. . . . . . . . . . . O O O O O O O O x x x x Y@. . . . . . . . . . H+k k k d d d O@l+l+l+l+l+l+l+Z@. . . . . . . . . . . . . . . . ]+`@w w w O O O O O O a x x x J+ #. . . . . ", +". . . . . . . . . . . . . . . . . . . . L.q q q y.S@S@S@v v t@p+p+q+. . . . . . . . . . . . . . . . . . . . . . . . . . p+p+p+p+p+p+p+l+l+l+l+l+G@. . . . . . . . . . . . . . . . . . . . . . . (@.#9.9.9.9.9.9.9.9.9.#+#+#+#+#+]+. . . . . . . . . . O O O O O O O O o+o+o++#@#. . . . . . . . . I+k k k k d d d O@l+l+l+l+l+l+##. . . . . . . . . . . . . . . . . . $#%#w w O O O O O O a x x x J+&#. . . . . ", +". . . . . . . . . . . . . . . . . . . . *#h.h.h.h.h.h.h.L@=#=#=#=#-#. . . . . . . . . . . . . . . . . . . . . . . . . . p+p+p+p+p+p+p+l+l+l+l+l+G@. . . . . . . . . . . . . . . . . . . . . . . . ;#9.9.9.9.9.9.9.9.9.#+#+#+#+#+p@. . . . . . . . . . 8.8.8.8.8.8.8.8.O O O >#,#. . . . . . . . . D+k k k k d d d O@l+l+l+l+l+l+'#. . . . . . . . . . . . . . . . . . . )#!#w O O O O O O a x x x J+J+~#. . . . ", +". . . . . . . . . . . . . . . . . . . . L.q q q q q q q -.v v v v 9@. . . . . . . . . . . . . . . . . . . . . . . . . . p+p+p+p+p+p+p+l+l+l+l+l+G@. . . . . . . . . . . . . . . . . . . . . . . . . @+9.9.9.9.9.9.9.9.#+#+#+#+#+#+u@. . . . . . . . . p.p.p.p.p.p.p.p.O O O {#]#. . . . . . . . ^#/#k k k k d d d O@l+l+l+l+l+Z@. . . . . . . . . . . . . . . . . . . . (#_#w x.x.x.x.x.x.c K K K J+J+J+ #. . . ", +". . . . . . . . . . . . . . . . . . . . L.q q q q q q q -.v v v v 9@. . . . . . . . . . . . . . . . . . . . . . . . . . p+p+p+p+p+p+p+l+l+l+l+l+G@. . . . . . . . . . . . . . . . . . . . . . . . . G+F+9.9.9.9.9.9.9.#+#+#+#+#+#+C@. . . . . . . . . w w w w w w w w O O O :#<#. . . . . . . [#}#|#(.(.(.(.x x x O@l+l+l+l+##U@. . . . . . . . . . . . . . . . . . . . . 1#w 2#2#2#2#2#2#A 9.9.9.J+J+J+3#. . . ", +". . . . . . . . . . . . . . . . . . . . L.q q q q q q q -.v v v v 9@. . . . . . . . . . . . . . . . . . . . . . . . . . p+p+p+p+p+p+p+l+l+l+l+l+G@. . . . . . . . . . . . . . . . . . . . . . . . . . C+9.9.9.9.9.9.9.#+#+#+#+#+#+#+4#. . . . . . . . w w w w w w w w O O O 5#6#. . . . . . . @+7#(.(.(.(.(.x x x O@l+l+l+l+k+. . . . . . . . . . . . . . . . . . . . . . j@8#2#2#2#2#2#2#A 9.9.9.'@'@'@'@9#. . ", +". . . . . . . . . . . . . . . . . . . . L.q q q q q q q -.v v v v 9@. . . . . . . . . . . . . . . . . . . . . . . . . . p+p+p+p+p+p+p+A@A@A@A@A@B@. . . . . . . . . . . . . . . . . . . . . . . . . . . 0#9.9.9.9.9.9.#+#+#+#+#+#+#+#+~+. . . . . . . w w w w w w w w O O O 5#6#. . . . . . N+9.a#b#(.(.(.(.x x x O@l+l+l+G@. . . . . . . . . . . . . . . . . . . . . . . . c#2#2#2#2#2#2#A 9.9.9.:@:@:@:@_@(@. ", +". . . . . . . . . . . . . . . . . . . . L.q q q q q q q -.v v v v 9@. . . . . . . . . . . . . . . . . . . . . . . . . . p+p+p+p+p+p+p+1+1+1+1+1+d#. . . . . . . . . . . . . . . . . . . . . . . . . . . G+9.9.9.9.9.9.#+#+#+#+#+#+#+#+e#. . . . . . . w w w w w w w w O O O f#g#. . . . . G+F+9.h#i#(.(.(.O x x x 1+1+1+j#4.. . . . . . . . . . . . . . . . . . . . . . . . . k#2#2#2#2#2#2#2#2#5.:@:@:@:@:@a@. ", +". . . . . . . . . . . . . . . . . . . . -@L.L.L.L.L.L.L.x@9@9@9@9@l#. . . . . . . . . . . . . . . . . . . . . . . . . . q+q+q+q+q+q+q+Q+Q+Q+Q+Q+m#. . . . . . . . . . . . . . . . . . . . . . . . . . . . Y+N+N+N+N+N+-#-#-#-#-#-#-#-#n#|@. . . . . . ^+^+^+^+^+^+^+^+o#o#o#p#q#. . . . . G+N+N+r#s#t#t#t#_+Z+Z+Z+Q+Q+Q+m#. . . . . . . . . . . . . . . . . . . . . . . . . . u#v#v#v#v#v#v#v#v#w#4@4@4@4@4@4@. ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "}; diff --git a/img/bg/AUTHOR.txt b/img/bg/AUTHOR.txt new file mode 100644 index 0000000..ce1ff0e --- /dev/null +++ b/img/bg/AUTHOR.txt @@ -0,0 +1,2 @@ +autorem zdjec jest dixi +pobrane z pl.wikipedia.org \ No newline at end of file diff --git a/img/bg/catalogue.txt b/img/bg/catalogue.txt new file mode 100644 index 0000000..4a1ff21 --- /dev/null +++ b/img/bg/catalogue.txt @@ -0,0 +1,6 @@ +image1.jpeg +image2.jpeg +image3.jpeg +image4.jpeg +image5.jpeg +image6.jpeg \ No newline at end of file diff --git a/img/bg/image1.jpeg b/img/bg/image1.jpeg new file mode 100644 index 0000000..5209112 Binary files /dev/null and b/img/bg/image1.jpeg differ diff --git a/img/bg/image2.jpeg b/img/bg/image2.jpeg new file mode 100644 index 0000000..a23555c Binary files /dev/null and b/img/bg/image2.jpeg differ diff --git a/img/bg/image3.jpeg b/img/bg/image3.jpeg new file mode 100644 index 0000000..a2f63fe Binary files /dev/null and b/img/bg/image3.jpeg differ diff --git a/img/bg/image4.jpeg b/img/bg/image4.jpeg new file mode 100644 index 0000000..5909de2 Binary files /dev/null and b/img/bg/image4.jpeg differ diff --git a/img/bg/image5.jpeg b/img/bg/image5.jpeg new file mode 100644 index 0000000..970dc91 Binary files /dev/null and b/img/bg/image5.jpeg differ diff --git a/img/bg/image6.jpeg b/img/bg/image6.jpeg new file mode 100644 index 0000000..cf69da0 Binary files /dev/null and b/img/bg/image6.jpeg differ diff --git a/img/icons.bmp b/img/icons.bmp new file mode 100644 index 0000000..9a1e4e5 Binary files /dev/null and b/img/icons.bmp differ diff --git a/img/trix-icon.bmp b/img/trix-icon.bmp new file mode 100644 index 0000000..7b84634 Binary files /dev/null and b/img/trix-icon.bmp differ diff --git a/img/trix-icon.ico b/img/trix-icon.ico new file mode 100644 index 0000000..3df740e Binary files /dev/null and b/img/trix-icon.ico differ diff --git a/img/trix-icon.png b/img/trix-icon.png new file mode 100644 index 0000000..8384ed3 Binary files /dev/null and b/img/trix-icon.png differ diff --git a/img/trix-icon.xcf b/img/trix-icon.xcf new file mode 100644 index 0000000..c889f00 Binary files /dev/null and b/img/trix-icon.xcf differ diff --git a/settings.txt b/settings.txt new file mode 100644 index 0000000..15708f3 --- /dev/null +++ b/settings.txt @@ -0,0 +1,2 @@ +start 1 +net 0 diff --git a/src/game.c b/src/game.c new file mode 100644 index 0000000..175f03f --- /dev/null +++ b/src/game.c @@ -0,0 +1,813 @@ +/* + * Trix - klikanie po klockach + * Przemysław R. Pietraszczyk + * + * paźdżiernik 2006 r. + * + * licencja: Public Domain + */ + +#include "trix.h" + +#define X_SCORE_INSCRIPTION 10 +#define X_LEVEL_INSCRIPTION 200 +#define X_HISCORE_INSCRIPTION 340 +#define Y_ALL_INSCRIPTION 0 + +#define X_HIGH_SLAT 1 +#define Y_HIGH_SLAT 40 +#define X_SIZE_HIGH_SLAT (screen->w) +#define Y_SIZE_HIGH_SLAT FIELD_SIZE + +#define X_ACTION 1 +#define Y_ACTION 60 +#define X_SIZE_ACTION (screen->w) +#define Y_SIZE_ACTION (screen->h) + +/* +// z trix.h begin +SDL_Surface * block[8]; +SDL_Surface * explode; +SDL_Surface * bomb; +SDL_Surface * wall; +SDL_Surface * smoke; + +SDL_Surface * net; +SDL_Surface * banner; +SDL_Surface * bg; +SDL_Surface * screen; +TTF_Font* font; + +SDL_Renderer * renderer; +SDL_Texture * tex_screen; + +SDL_Rect source, dest; +int use_net; // zmienna wyswietlania siatki +int start_level; // start gry od poziomu ... +int score; +int bonus; // nalicza premie + +char * hifile; // path do hiscore + + +int use_net; // zmienna wyswietlania siatki +int start_level; // start gry od poziomu ... +int score; +int bonus; // nalicza premie + +char * hifile; // path do hiscore +struct tab tab_hiscores[5]; +char const catalogue[N_PIC][40]; +// z trix.h end + +*/ + + + +static SDL_Surface * var_level_inscription; +static SDL_Surface * var_hiscore_inscription; + +/* tablica struktur przechowuje pozycje kasowanych elementow */ +static struct ghost gh[598]; +static int gh_index; + +SDL_Surface * prepare_text(int r, int b, int g, char *buffer); +void load_background(int n); +void print_inscription(char * buffor, int desx, int desy); +void draw_text (int x, int y, SDL_Surface * image); + +void get_name_of_player(void); + + + +/* sprawdza czy klocki nie osiagnely masymalnej wysokosci */ +int behind_high(void) { + + int i; + + /* jesli znajdzie na szczycie jakis klocek o stalym statusie + zwraca prawde */ + for (i=0; i<23; ++i) { + if (field[i][1].type && field[i][1].status == STAND) + return 1; + } + + return 0; +} + +/* zeruje strukture elementow */ +void zero_field(void) { + + int i, j; + + for (j=0; j<26;++j) { + for (i=0; i<23;++i) { + field[i][j].type = NULL; + field[i][j].status=0; + } + } + +} + + +void set_background(void) { + + SDL_Rect srcrect, destrect; + + destrect = set_rect(0, 0, bg->w, bg->h); + srcrect = set_rect(0,0, bg->w, bg->h); + SDL_BlitSurface(bg,&srcrect,screen,&destrect); +} + +void set_net(void) { + + SDL_Rect srcrect, destrect; + + destrect = set_rect(0, 0, net->w, net->h); + srcrect = set_rect(0,0, net->w, net->h); + SDL_BlitSurface(net,&srcrect,screen,&destrect); +} + + +/* sprawdza czy na planszy sa jakies klocki */ +int shortage_blocks(void) { + + int i, j; + + for (j=1; j<26; j++) { + for (i=0; i<23; i++) { + if (field[i][j].type) { + if (field[i][j].type == wall) continue; + else goto end; + } + } + } + +end: + /* gdy brak klockow */ + if (j==26 && i==23) { + printf ("brak klockow\n"); + return 1; + } + + /* gdy sa klocki */ + return 0; + + +} + + +/* elementy zaczynaja opadac z gornej belki */ +void drop_from_high_slat(void) { + + int i; + + for (i=22; i>=0; --i) { + field[i][0].status = DROP; + } +} + +void set_element(int f, int x, int y) { + + switch(f) { +// od 0 do 49 pustka + case 50 ... 64: + field[x][y].type = bomb; + break; + case 65 ... 73: + field[x][y].type = block[0]; + break; + case 74 ... 80: + field[x][y].type = block[1]; + break; + case 81 ... 85: + field[x][y].type = block[2]; + break; + case 86 ... 90: + field[x][y].type = block[3]; + break; + case 91 ... 99: + field[x][y].type = block[4]; + break; + case 100 ... 106: + field[x][y].type = block[5]; + break; + case 107 ... 111: + field[x][y].type = block[6]; + break; + case 112 ... 116: + field[x][y].type = block[7]; + break; + default: + field[x][y].type = NULL; + break; + } +} + +/* wypelnia studnie elementami */ +void fill_board(struct data_levels * dl) { + + int x, y, f; + + for (y=24; y>2; --y) { + for (x=0; x<23; ++x) { +label: + f=rand()%dl->max; + if (f<40) goto label; + set_element(f, x, y); + + field[x][y].status = DROP; + } + } + +} + + +/* gorna listwa */ +void high_slat(struct data_levels * dl, SDL_bool only_bomb) { + + int i, f; + + /* przesuwamy klocki w prawo */ + for (i=22; i>0; --i) + field[i][0] = field[i-1][0]; + + /* losujemy element dla pozycji 0,0 */ + if (!only_bomb) f=rand()%dl->max; + else f=55; + + set_element(f, 0, 0); + + field[0][0].status = 0; + +} + +/* funkcja sprawdza status elementu i jesli + element opada to obniza element na planszy */ +void drop_elements(void) { + + int j, i; + + + for (j=25; j>=0; --j) { + for (i=0; i<23; ++i) { + if (field[i][j].status == DROP) { + + /* jesli analizowana pozycja jest pusta */ + if (!field[i][j+1].type) { + field[i][j+1] = field[i][j]; + + + // wyzerowanie poprzedniej pozycji + field[i][j].status = 0; + field[i][j].type = NULL; + + /* osiadlo na dnie */ + if (j==24) { + field[i][j+1].status = STAND; + } + } + /* wprzeciwnym wypadku stawiamy element na + elemencie */ + else { + field[i][j].status = STAND; + } + + + + + } + } + } + +} + +/* kasuje elementy po skasowaniu klockow badz wybuchu bomb */ +void delete_elements(void) { + + int x, y; + + /* to musi byc przynajmniej para wiec mozna + tak sprawdzac */ + if (gh_index) { + + /* index jest o jeden wiekszy trzeba go zmnniejszyc */ + gh_index--; + + printf ("gh_index: %d\n", gh_index); + + do { + /* kasowanie elementow po zniknieciu lub wybuchu */ + field[gh[gh_index].x][gh[gh_index].y].type = NULL; + field[gh[gh_index].x][gh[gh_index].y].status = 0; + + printf ("kasowanie x: %d y: %d\n", gh[gh_index].x, gh[gh_index].y); + + x = gh[gh_index].x; + y = gh[gh_index].y - 1; // dotyczy elementu znajdujacego sie nad kasowanym elementem + +// gh[gh_index].x = 0; +// gh[gh_index].y = 0; + + /* zmiana statusu elementom znajdujacym sie wyzej + o ile nie znikaja */ + while (y>1 && field[x][y].status == STAND) { + field[x][y].status = DROP; + --y; + } + + }while(gh_index--); + gh_index = 0; + } +} + + + + +/* wyszukuje klocki o tym samym kolorze i zmienia je w dymek*/ +void search_block(SDL_Surface * color, int x, int y) { + +// printf ("s... type: %p color: %p x: %d y: %d\n", field[x][y].type, color, x, y); + + if (field[x][y].type == color && field[x][y].status == STAND) { + + printf ("Fade : %p color %p x: %d y: %d\n", field[x][y].type, color, x, y); + + field[x][y].status = FADE; + field[x][y].type = smoke; + score++; + bonus++; + + /* zapamietuje pozycje ktora trzeba bedzie pozniej skasowac */ +// printf ("gh_index = %d\n", gh_index); + gh[gh_index].x = x; + gh[gh_index].y = y; + gh_index++; + + /* nastepne klocki do sprawdzenia */ + if (y<25) search_block(color, x, y+1); + if (y>1) search_block(color,x, y-1); + if (x>0) search_block(color, x-1, y); + if (x<22) search_block(color,x+1, y); + + + } + +} + +/* szuka pary do skasowania */ +void pre_delete_block(int x, int y) { + + +// printf ("\npre_delete: %p x: %d y: %d \n\n", field[x][y].type, x, y); + + /* szuka przynajmniej pary */ + if (field[x][y].type == field[x][y+1].type || + field[x][y].type == field[x][y-1].type || + field[x][y].type == field[x+1][y].type || + field[x][y].type == field[x-1][y].type && field[x][y].status == STAND) { + + + if (y<25) search_block(field[x][y].type, x, y+1); + if (y>1) search_block(field[x][y].type, x, y-1); + if (x>0) search_block(field[x][y].type, x-1, y); + if (x<22) search_block(field[x][y].type, x+1, y); + +// raczej niepotrzebne juz +// field[x][y].status = FADE; +// field[x][y].type = smoke; + + } + + +} +/* eksplozja elementow znajdujacych sie wokol bomb */ +void power_strike (int x, int y){ + + if (field[x][y].type != bomb && field[x][y].status == STAND) { + + field[x][y].status = FADE; + field[x][y].type = explode; + + /* zapamietuje pozycje ktora trzeba bedzie pozniej skasowac */ + gh[gh_index].x = x; + gh[gh_index].y = y; + gh_index++; + } + +} + +/* szuka bomb i dokonuje eksplozji */ +void search_bomb(int x, int y) { + + if (field[x][y].type == bomb && field[x][y].status == STAND) { + + printf ("Fade : %p bomb %p x: %d y: %d\n", field[x][y].type, bomb, x, y); + + field[x][y].status = FADE; + field[x][y].type = explode; + + /* zapamietuje pozycje ktora trzeba bedzie pozniej skasowac */ + gh[gh_index].x = x; + gh[gh_index].y = y; + gh_index++; + + /* nastepne klocki do sprawdzenia */ + if (y<25) search_bomb(x, y+1); + if (y>1) search_bomb(x, y-1); + if (x>0) search_bomb(x-1, y); + if (x<22) search_bomb(x+1, y); + if (x>0 && y>1) search_bomb(x-1, y-1); + if (x<22 && y>1) search_bomb(x+1, y-1); + if (x>0 && y<25) search_bomb(x-1, y+1); + if (x<22 && y<25) search_bomb(x+1, y+1); + + /* sila razenia */ + if (y<25) power_strike(x, y+1); + if (y>1) power_strike(x, y-1); + if (x>0) power_strike(x-1, y); + if (x<22) power_strike(x+1, y); + if (x>0 && y>1) power_strike(x-1, y-1); + if (x<22 && y>1) power_strike(x+1, y-1); + if (x>0 && y<25) power_strike(x-1, y+1); + if (x<22 && y<25) power_strike(x+1, y+1); + + + } + +} + +/* szuka pary bomb */ +void pre_delete_bomb(int x, int y) { + + /* szuka przynajmniej pary */ + if (field[x][y].type == field[x][y+1].type || + field[x][y].type == field[x][y-1].type || + field[x][y].type == field[x+1][y].type || + field[x][y].type == field[x-1][y].type && field[x][y].status == STAND) { + + + if (y<25) search_bomb(x, y+1); + if (y>1) search_bomb(x, y-1); + if (x>0) search_bomb(x-1, y); + if (x<22) search_bomb(x+1, y); + + } +} + +/* sprawdza czy mozna dosunac elemnty do prawej strony */ +//void check_before_field(void) { + void on_the_right(void) { + + int i,j,k,l; + + for (i=21; i>=0; --i) { + + /* jesli pole przed elementem jest puste */ + if (!field[i+1][25].type && field[i][25].status == STAND) { + + /* sprawdza jak wysoko siegaja kolocki */ + k=0; +// while(field[i][25-k].type && field[i][25-k].status == STAND)k++; + while(field[i][25-k].type)k++; + ++k; + +// printf (" K: %d\n", k); + + /* sprawdza czy nie wystaja jakies klocki na przedpolu */ + for (l=0; lw,screen->h); + SDL_FillRect(screen,&destrect,0); + //SDL_Flip(screen); + + + sprintf (buffor, "%d", tab_hiscores[0].score); + var_hiscore_inscription = (SDL_Surface *) prepare_text(255, 255, 255, buffor); + +new_level: + bonus = 0; + + sprintf(buffor, "%d", virtual_level); + var_level_inscription = (SDL_Surface *) prepare_text(255, 255, 255, buffor); + + pic = rand()%N_PIC; + load_background(pic); + + + drop_slat = data_level[level-1].drop; + vis = 15; + + /* ustawia murek */ + if (data_level[level-1].wall) { + field[10][25].type = wall; + field[10][25].status = WALL; + } + + + /* wypelnia studnie elementami */ + fill_board(&data_level[level-1]); + + done = 0; + while (!done) + { + + + + + set_background(); + + if (use_net) set_net(); + + /* sprawdza czy na planszy sa jakies klocki */ + if (shortage_blocks()) { + virtual_level++; + if (level < 10) level++; + + SDL_FreeSurface(var_level_inscription); + + score += bonus *3; + goto new_level; + } + + delete_elements(); + + + SDL_Event event; + + /* Check for events */ + while (SDL_PollEvent (&event)) + { + switch (event.type) + { + case SDL_KEYDOWN: + printf("Nacini�o klawisz: %s\n", + SDL_GetKeyName(event.key.keysym.sym)); + + switch (event.key.keysym.sym) { + case SDLK_ESCAPE: + done = 1; + break; + case SDLK_b: + if (only_bomb) only_bomb=SDL_FALSE; + else only_bomb=SDL_TRUE; + break; + } + break; + case SDL_QUIT: + exit(0); + break; + case SDL_MOUSEMOTION: +// if (event.motion.state & SDL_BUTTON(1)) +// printf("Ruch z pierwszym przyciskeim myszy\n"); + +// if (event.motion.state & SDL_BUTTON(2)) +// printf("Ruch z drugim przyciskiem myszy\n"); + +// if (event.motion.state & SDL_BUTTON(3)) +// printf("Ruch z trzecim przyciskiem myszy\n"); + +// printf("Przesuni�o myszk�o %d,%d\n", +// event.motion.xrel, event.motion.yrel); + case SDL_MOUSEBUTTONDOWN: +// printf("Nacini�o przycisk o numerze %d na " +// "punkcie o wsp�rz�nych %d,%d\n", event.button.button, +// event.button.x, event.button.y); + + + if (event.button.button && + event.button.x >= X_HIGH_SLAT +1 && + event.button.y >= Y_HIGH_SLAT && + event.button.x <= X_SIZE_HIGH_SLAT && + event.button.y <= (Y_SIZE_HIGH_SLAT + Y_HIGH_SLAT)) { + + printf ("opadanie\n"); + drop_from_high_slat(); + move = 0; + drop_slat = data_level[level-1].drop; + } + else if (event.button.button && + event.button.x >= X_ACTION && + event.button.y >= Y_ACTION && + event.button.x <= X_SIZE_ACTION && + event.button.y <= Y_SIZE_ACTION) { + + x=event.button.x/FIELD_SIZE; + y=event.button.y/FIELD_SIZE-2; + + if (field[x][y].type == bomb) + pre_delete_bomb(x, y); + else if (field[x][y].type) + pre_delete_block(x, y); + + } + + + } + } + + + drop_slat--; + /* gdy zero program sam zrzuca klocki z gornej listwy */ + if (!drop_slat) { + drop_from_high_slat(); + move = 0; + drop_slat = data_level[level-1].drop; + } + + + /* przesowa klocki na gornej listwie zapobiegajac przy okazji + opadaniu pod katem */ + if (!only_bomb){ + if (move) high_slat(&data_level[level-1], SDL_FALSE); + else move = 1; + } + else { + if (move) high_slat(&data_level[level-1], SDL_TRUE); + else move = 1; + } + + /* przesowa elemnty do prawej strony */ + on_the_right(); + + /* opuszcza elementy */ + drop_elements(); + + +// for (j=0; j<26; ++j) { +// for (i=0; i<23; ++i) { + +// if (field[i][j].type) +// printf ("j: %d i: %d type: %p\n", j, i, field[i][j].type); +// } +// } +// printf("\n\n"); + + + + /* umieszczanie elementow na planszy */ + srcrect = set_rect(0,0,FIELD_SIZE,FIELD_SIZE); + for (j=0; j<26; ++j) { + for (i=0; i<23; ++i) { + +// if (field[i][j].type) +// printf ("j: %d i: %d type: %p\n", j, i, field[i][j].type); + + destrect = set_rect(FIELD_SIZE * i,FIELD_SIZE * j+ 40, FIELD_SIZE, FIELD_SIZE); + SDL_BlitSurface(field[i][j].type,&srcrect, screen,&destrect); + } + } + +// for (j=0; j<20; ++j) { +// for (i=0; i<23; ++i) { +// if (field[i][j].status == DROP) putchar('|'); +// else if (field[i][j].status == STAND) putchar ('='); +// else if (field[i][j].status == 0) putchar(' '); +// } +// putchar('\n'); +// } + + /* przy rozpoczeciu poziomu wyswietla numer poziomu */ + if (vis) { + sprintf (buffor, " LEVEL %d", virtual_level); + print_inscription(buffor, 190, 200); + vis -= 1; + } + + /* sprawdza czy nie ma przepelnienia */ + if (behind_high() && over == -1) + over = 15; + /* wyswietla napis game over */ + if (!over) + done = 1; + else if (over > 0) { + strcpy(buffor, "GAME OVER"); + print_inscription(buffor, 160, 200); + // SDL_UpdateRect(screen, 160, 200, 136, 32); + over -= 1; + } + + sprintf (buffor, "%d", score); + print_inscription(buffor, 20, Y_ALL_INSCRIPTION); + draw_text(X_LEVEL_INSCRIPTION, Y_ALL_INSCRIPTION, var_level_inscription); + draw_text(X_HISCORE_INSCRIPTION, Y_ALL_INSCRIPTION, var_hiscore_inscription); + + // printf ("wysokosc : %d \n", var_hiscore_inscription->h); + + // SDL_Flip(screen); + + + + + + dest = set_rect(0, 0, screen->w, screen->h); + //SDL_FillRect(screen, &dest, SDL_MapRGB(screen->format, 255, 255, 255)); + + source = set_rect(0, 0, screen->w, screen->h); + + tex_screen = SDL_CreateTextureFromSurface(renderer, screen); + SDL_RenderClear ( renderer ); + SDL_RenderCopy(renderer, tex_screen,&source,&dest); + SDL_RenderPresent(renderer); + SDL_DestroyTexture(tex_screen); + + + + + + SDL_Delay(300); + } + + + /* sprawdza czy jest mozliwosc wpisu */ + if (score > tab_hiscores[4].score) { + get_name_of_player(); + } + + zero_field(); + + /* czysci ekran przed powrotem do menu */ + destrect = set_rect(0,0,screen->w,screen->h); + SDL_FillRect(screen,&destrect,0); + // SDL_Flip(screen); + + source = set_rect(0, 0, screen->w, screen->h); + tex_screen = SDL_CreateTextureFromSurface(renderer, screen); + SDL_RenderClear ( renderer ); + SDL_RenderCopy(renderer, tex_screen,&source,&dest); + SDL_RenderPresent(renderer); + SDL_DestroyTexture(tex_screen); + + /* zwalnia pamiec po nieaktualnych obrazkach z liczbami */ + SDL_FreeSurface(var_level_inscription); + SDL_FreeSurface(var_hiscore_inscription); + +} + + diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..861c2fb --- /dev/null +++ b/src/main.c @@ -0,0 +1,652 @@ +/* + * Trix - klikanie po klockach + * Przemysław R. Pietraszczyk + * + * paźdżiernik 2006 r. + * + * licencja: Public Domain + */ +#include // mkdir +#include "trix.h" + + + +SDL_Window *window = NULL; + + +void options (void); +void about (void); +void hiscores(void); +int menu(); + +void start_game(void); + +SDL_Rect set_rect(int x, int y, int w, int h) +{ + SDL_Rect rect; + rect.x = x; + rect.y = y; + rect.w = w; + rect.h = h; + return rect; +} + +Uint32 getpixel(SDL_Surface *surface, int x, int y) +{ + int bpp = surface->format->BytesPerPixel; + /* Here p is the address to the pixel we want to retrieve */ + Uint8 *p = (Uint8 *)surface->pixels + y * surface->pitch + x * bpp; + + switch(bpp) { + case 1: + return *p; + case 2: + return *(Uint16 *)p; + case 3: + if(SDL_BYTEORDER == SDL_BIG_ENDIAN) + return p[0] << 16 | p[1] << 8 | p[2]; + else + return p[0] | p[1] << 8 | p[2] << 16; + case 4: + return *(Uint32 *)p; + default: + return 0; + } +} + +void putpixel(SDL_Surface *surface, int x, int y, Uint8 R, Uint8 G, Uint8 B) +{ + Uint8 *p = (Uint8 *)surface->pixels + y * surface->pitch + x * + surface->format->BytesPerPixel; + if(SDL_BYTEORDER == SDL_BIG_ENDIAN) + { + p[0] = R; + p[1] = G; + p[2] = B; + } + else + { + p[0] = B; + p[1] = G; + p[2] = R; + } +} + +void create_net (void) { + + SDL_Rect destrect; + int i, j; + + net = SDL_CreateRGBSurface(SDL_SWSURFACE,screen->w,screen->h,16,0,0,0,0); + + destrect = set_rect(0, 0, net->w, net->h); + SDL_FillRect(net,&destrect, SDL_MapRGB(net->format,255,255,255)); + + SDL_SetColorKey(net,SDL_TRUE,getpixel(net,0,0)); + + /* tworzy kolumny */ + for (i=20; i<460; i+=20) + for (j=40; j<560; j += 3) + putpixel(net, i, j, 175, 175, 175); + + /* tworzy wiersze */ + for (j=40; j<560; j+=20) + for (i=0; i<460; i += 3) + putpixel(net, i, j, 175, 175, 175); + + +} + +/* drukuje informacje */ +void print_inscription(char * buffor, int desx, int desy) { + + SDL_Rect srcrect, destrect; + SDL_Color bgcolor; + SDL_Color fgcolor; + SDL_Surface * image; + + fgcolor.r = 255; + fgcolor.b = 255; + fgcolor.g = 255; + bgcolor.r = 0; + bgcolor.g = 0; + bgcolor.b = 0; + + //image = TTF_RenderUTF8_Shaded(font,buffor,fgcolor, bgcolor); + image = TTF_RenderText_Solid(font, buffor, fgcolor); + + SDL_SetColorKey(image,SDL_TRUE,getpixel(image,0,0)); + + destrect = set_rect(desx, desy, image->w, image->h); + srcrect = set_rect(0,0,image->w, image->h); + SDL_BlitSurface(image,&srcrect,screen,&destrect); + SDL_FreeSurface(image); + +} + + +void draw_text (int x, int y, SDL_Surface * image) { + + SDL_Rect srcrect, destrect; + + //SDL_SetColorKey(image,SDL_TRUE,getpixel(image,0,0)); + + destrect = set_rect(x, y, image->w, image->h); + srcrect = set_rect(0,0,image->w, image->h); + SDL_BlitSurface(image,&srcrect,screen,&destrect); +// SDL_UpdateRect(screen, x, y, image->w, image->h); +} + +SDL_Surface * prepare_text(int r, int b, int g, char *buffer) { + +// SDL_Rect srcrect, destrect; + SDL_Surface* image; + SDL_Color bgcolor; + SDL_Color fgcolor; + + fgcolor.r = r; + fgcolor.b = b; + fgcolor.g = g; + bgcolor.r = 0; + bgcolor.g = 0; + bgcolor.b = 0; + + return TTF_RenderText_Solid(font, buffer, fgcolor); + //return TTF_RenderUTF8_Shaded(font,buffer,fgcolor, bgcolor); +} + +void load_banner() { + + banner=IMG_ReadXPMFromArray(banner_xpm); + printf("banner: %p\n", banner); + + if(!banner) { + printf("IMG_ReadXPMFromArray: %s\n", IMG_GetError()); + exit(1); + } +} + + +/* odczytuje plik z wynikami i umieszcza dane w strukturze */ +void load_hiscores_from_file(void) { + + FILE *fp; + int j; + + if((fp = fopen(hifile,"r")) == NULL) { + printf("\nCannot read from file %s\n", hifile); + //exit (1); + } + else { + for (j = 0; j < 5; ++j) + fscanf(fp,"%s %d", &tab_hiscores[j].name, &tab_hiscores[j].score); + fclose(fp); + } +} + +void save_hiscores_to_file (void) { + + FILE *fp; + int j; + + if((fp = fopen(hifile,"w")) == NULL) { + printf("\nCannot write to file %s\n", hifile); + exit (1); + } + for (j = 0; j < 5; ++j) + fprintf(fp,"%s %d\n", tab_hiscores[j].name, tab_hiscores[j].score); + fclose(fp); +} + +void create_hifile(void) { + + FILE *fp; + int j; + struct tab hi[] = {{"gecko", 50}, + {"gecko", 40}, + {"gecko", 30}, + {"gecko", 20}, + {"gecko", 10}}; + + if((fp = fopen(hifile,"w")) == NULL) { + printf("\nCannot write to file %s\n", hifile); + //exit (1); + } + else { + for (j = 0; j < 5; ++j) + fprintf(fp,"%s %d\n", hi[j].name, hi[j].score); + fclose(fp); + } +} + +void load_catalogue(void) { + + FILE *fp; + int j; + + if((fp = fopen(CATALOGUE,"r")) == NULL) { + printf("\nCannot read from file %s\n", CATALOGUE); + exit (1); + } + for (j = 0; j < N_PIC; ++j) + fscanf(fp,"%s", &catalogue[j]); + fclose(fp); + +} + + +void load_background(int n) { + + char buffor[256]; + + sprintf(buffor, "%s%s", BG_DIR, catalogue[n]); + + SDL_FreeSurface(bg); + + if ((bg = IMG_Load(buffor)) == NULL) { + fprintf(stdout,"Cannot load icon bitmap: %s\n", IMG_GetError ()); + exit(1); + } +} + + +void load_settings(void) { + + FILE *fp; + char line[256]; + char * p; + + +#if LINUX + char *path; + char * HOME = "HOME"; + path=(char *)malloc(strlen(getenv(HOME))+strlen(SETTINGS)+1); + + strcpy(path, getenv(HOME)); + strcat(path, SETTINGS); + + if ((fp = fopen(path,"r"))==NULL) { + printf ("Nie mozna otworzyc pliku: settings\n"); + + start_level = 1; + net = 0; + } +#elif WINDOWS + if ((fp = fopen(SETTINGS,"r"))==NULL) { + printf ("Nie mozna otworzyc pliku: settings\n"); + + start_level = 1; + net = 0; + } +#endif + if (fp) { + while((fgets(line, 256 , fp)) != NULL) { + if (!strncmp(line, "start", 5)) { + p = strrchr(line, ' '); + printf (" start: %d\n", atoi(p)); + start_level = atoi(p); + } + else if (!strncmp(line, "net", 3)) { + p = strrchr(line, ' '); + printf (" net: %d\n", atoi(p)); + use_net = atoi(p); + } + } + fclose(fp); + } +#if LINUX + free(path); +#endif +} + +void save_settings(void) { + + FILE *fp; +#if LINUX + char *path; + char * HOME = "HOME"; + path=(char *)malloc(strlen(getenv(HOME))+strlen(SETTINGS)+1); + + strcpy(path, getenv(HOME)); + strcat(path, SETTINGS); + printf("save settings: 1\n"); + if ((fp = fopen(path,"w"))==NULL) { + printf ("Nie mozna zapisac pliku: settings\n"); + + start_level = 1; + net = 0; + } + printf("save settings: 2n"); + + free(path); +#elif WINDOWS + if ((fp = fopen(SETTINGS,"w"))==NULL) { + printf ("Nie mozna zapisac pliku: settings\n"); + + start_level = 1; + net = 0; + } +#endif + +/* + if((fp = fopen(SETTINGS,"w")) == NULL) { + printf("\nNie moge zapisac pliku: settings\n"); +// exit (1); + } +*/ + if (fp) { + fprintf(fp, "start %d\n", start_level); + fprintf(fp, "net %d\n", use_net); + fclose(fp); + } + +} + +/* + +void load_settings(void) { + + FILE *fp; + char line[256]; + char * p; + + if ((fp = fopen(SETTINGS,"r"))==NULL) { + printf ("Nie mozna otworzyc pliku: settings\n"); + + start_level = 1; + net = 0; + } + if (fp) { + while((fgets(line, 256 , fp)) != NULL) { + if (!strncmp(line, "start", 5)) { + p = strrchr(line, ' '); + printf (" start: %d\n", atoi(p)); + start_level = atoi(p); + } + else if (!strncmp(line, "net", 3)) { + p = strrchr(line, ' '); + printf (" net: %d\n", atoi(p)); + use_net = atoi(p); + } + } + fclose(fp); + } +} + +void save_settings(void) { + + FILE *fp; + + if((fp = fopen(SETTINGS,"w")) == NULL) { + printf("\nNie moge zapisac pliku: settings\n"); +// exit (1); + } + else { + fprintf(fp, "start %d\n", start_level); + fprintf(fp, "net %d\n", use_net); + fclose(fp); + } + +} + +*/ + + +void load_bitmaps(void) { + + int i; + SDL_Rect srcrect, destrect; + SDL_Color bgcolor; + SDL_Color fgcolor; + SDL_Surface* icons; + + fgcolor.r = 255; + fgcolor.g = 255; + fgcolor.b = 255; + bgcolor.r = 0; + bgcolor.g = 0; + bgcolor.b = 0; + + + + destrect = set_rect(0,0,FIELD_SIZE,FIELD_SIZE); + + if((icons = SDL_LoadBMP(ICONS)) == NULL) { + fprintf(stdout,"Cannot load icon bitmap: %s\n", SDL_GetError ()); + exit(1); + } + + /* przestrzen dla klockow */ + for (i=0; i < 8;++i) { + block[i] = SDL_CreateRGBSurface(SDL_SWSURFACE,FIELD_SIZE,FIELD_SIZE,16,0,0,0,0); + srcrect = set_rect(i*20,0,FIELD_SIZE,FIELD_SIZE); + SDL_BlitSurface(icons,&srcrect, block[i],&destrect); + } + + + /* przestrzen dla bomby */ + bomb = SDL_CreateRGBSurface(SDL_SWSURFACE,FIELD_SIZE,FIELD_SIZE,16,0,0,0,0); + srcrect = set_rect(160,0,FIELD_SIZE,FIELD_SIZE); + SDL_BlitSurface(icons,&srcrect, bomb,&destrect); + /* ustawiamy kolor przezroczystosci */ + SDL_SetColorKey(bomb,SDL_TRUE,getpixel(bomb,0,0)); + + /* przestrzen dla eksplozji */ + explode = SDL_CreateRGBSurface(SDL_SWSURFACE,FIELD_SIZE,FIELD_SIZE,16,0,0,0,0); + srcrect = set_rect(180,0,FIELD_SIZE,FIELD_SIZE); + SDL_BlitSurface(icons, &srcrect, explode, &destrect); + /* ustawiamy kolor przezroczystosci */ + SDL_SetColorKey(explode,SDL_TRUE,getpixel(explode,0,0)); + + + wall = SDL_CreateRGBSurface(SDL_SWSURFACE,FIELD_SIZE,FIELD_SIZE,16,0,0,0,0); + srcrect = set_rect(200,0,FIELD_SIZE,FIELD_SIZE); + SDL_BlitSurface(icons, &srcrect, wall, &destrect); + + /* przestrzen dla dymku */ + smoke = SDL_CreateRGBSurface(SDL_SWSURFACE,FIELD_SIZE,FIELD_SIZE,16,0,0,0,0); + srcrect = set_rect(220,0,FIELD_SIZE,FIELD_SIZE); + SDL_BlitSurface(icons, &srcrect, smoke, &destrect); + /* ustawiamy kolor przezroczystosci */ + SDL_SetColorKey(smoke,SDL_TRUE,getpixel(smoke,0,0)); + + SDL_FreeSurface(icons); +} + +int atrap() { + return START_GAME; +} + + + int main (int argc, char ** argv) +{ + int done = 0; + + + if (SDL_Init (SDL_INIT_VIDEO | SDL_INIT_TIMER) < 0) + { + printf ("Nie mozna zainicjowac SDL: %s\n", SDL_GetError ()); + exit (1); + } + atexit (SDL_Quit); + + window = SDL_CreateWindow( "Trix", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 460, 560, SDL_WINDOW_SHOWN ); + + //screen = SDL_SetVideoMode (460, 560, 16, SDL_SWSURFACE | SDL_DOUBLEBUF); + if (window == NULL) + { + printf ("Nie mozna ustawic trybu 460x560x16: %s\n", SDL_GetError ()); + exit (2); + } + else { + renderer = SDL_CreateRenderer(window, -1,0); + SDL_SetRenderDrawColor ( renderer ,65, 190, 215 , 255 ); + SDL_RenderClear ( renderer ); + //Get window surface + screen= SDL_GetWindowSurface( window ); + } + + /* inicjalizacja fontow */ + if(TTF_Init()==-1) { + printf("TTF_Init: %s\n", TTF_GetError()); + exit(2); + } + atexit (TTF_Quit); + if((font = TTF_OpenFont(NAMEFONT,FONTSIZE)) == NULL) { + printf("TTF_OpenFont: %s\n", TTF_GetError()); + exit(1); + } + +#if LINUX + char * FILE_HISCORES_FILE = "/.trix/hiscores"; + char * HOME = "HOME"; + char *path; + int c; + + path=(char *)malloc(strlen(getenv(HOME))+strlen("/.trix")+1); + strcpy(path, getenv(HOME)); + strcat(path, "/.trix"); + + + + /* jesli brak katalogu to zwraca -1 */ + if ((c = chdir(path))) { + + perror("chdir"); + if (mkdir(path, 0777)) { + perror("mkdir"); + } + + } + printf ("\n\nc: %d\n\n", c); + free(path); + + hifile=(char *)malloc(strlen(getenv(HOME))+strlen(FILE_HISCORES_FILE)+1); + + strcpy(hifile, getenv(HOME)); + strcat(hifile, FILE_HISCORES_FILE); + + if (access(hifile, F_OK)==0){ + printf("PLIK istnieje %s",hifile); + //free(hifile); + + } + else { + printf("PLIK nie istnieje %s",hifile); + create_hifile(); + //free(hifile); + } + + + SDL_Surface * icon = SDL_LoadBMP("/usr/share/trix/img/trix-icon.bmp"); + SDL_SetWindowIcon(window, icon); + //load_hiscores_from_file(); + +#elif WINDOWS + char * FILE_HISCORES = "\\trix.txt"; + //char * FILE_HISCORES = "/trix.txt"; + + //char * PATH_TRIX = "/.trix"; + char * HOME = "HOMEPATH"; + //char *path; + int c; + + hifile=(char *)malloc(strlen(getenv(HOME))+strlen(FILE_HISCORES)+1); + + strcpy(hifile, getenv(HOME)); + strcat(hifile, FILE_HISCORES); + + if (access(hifile, F_OK)==0){ + printf("PLIK istnieje %s\n", hifile); + //free(file); + char bufor[48]; + + FILE * fp = fopen(hifile, "r"); + for (int j = 0; j < 5; ++j) + fscanf(fp,"%s %d", &tab_hiscores[j].name, &tab_hiscores[j].score); + fclose(fp); + + + + } + else{ + printf("PLIK nie istnieje %s\n",hifile); + + create_hifile(); +/* + FILE * fp; + struct tab hi[] = {{"gecko", 50}, + {"gecko", 40}, + {"gecko", 30}, + {"gecko", 20}, + {"gecko", 10}}; + + if((fp = fopen(hifile,"w")) == NULL) { + printf("\nCannot write to file %s\n", hifile); + exit (1); + } + for (int j = 0; j < 5; ++j){ + fprintf(fp,"%s %d\n", hi[j].name, hi[j].score); + strcpy(tab_hiscores[j].name , hi[j].name); + tab_hiscores[j].score = hi[j].score; + } + fclose(fp); + + / + printf ("Zapisałem: %s\n", hifile); + */ + } +#endif + + load_hiscores_from_file(); + printf("\nAAAA\n"); + start_level = 1; + load_settings(); + printf("BBBB\n"); + + load_bitmaps(); + printf("CCCC\n"); + + load_banner(); + printf("DDDD\n"); + + printf ("B\n"); + + load_catalogue(); + printf("EEEEEE\n"); + + create_net(); + printf("FFFFF\n"); + + while(!done) { + switch (menu()) { + //switch (atrap()) { + case START_GAME: + start_game(); + printf ("start game\n"); + break; + case HISCORES: + hiscores(); + printf ("hiscores\n"); + break; + case OPTIONS: + options(); + printf ("options\n"); + break; + case ABOUT: + about(); + printf ("about\n"); + break; + case QUIT_GAME: + done = 1; + break; + } + } + + + SDL_DestroyTexture(tex_screen); + SDL_DestroyRenderer(renderer); + SDL_DestroyWindow(window); + //free(hifile); + +} diff --git a/src/menu.c b/src/menu.c new file mode 100644 index 0000000..31e204b --- /dev/null +++ b/src/menu.c @@ -0,0 +1,879 @@ +#include "trix.h" +/* + * Trix - klikanie po klockach + * Przemysław R. Pietraszczyk + * + * paźdżiernik 2006 r. + * + * licencja: Public Domain + */ + /* +#if WINDOWS +//#include "img\\about.xpm" +#include "xpm//about.xpm" +#elif LINUX +#include "xpm//about.xpm" +#endif +*/ +#define Y_RETURN 400 + + +#define X_START X_CENTER(white_start_inscription->w) +#define X_HISCORES X_CENTER(white_hiscores_inscription->w) +#define X_ABOUT X_CENTER(white_about_inscription->w) +#define X_OPTIONS X_CENTER(white_options_inscription->w) + +#define X_RETURN X_CENTER(white_return_inscription->w) + +#define X_START_LEVEL X_CENTER(start_level_inscription->w) +#define X_TOPICAL_LEVEL 150 +#define X_MINUS 165 +#define X_PLUS 250 +#define X_NET 165 + +#define Y_START_LEVEL 100 +#define Y_TOPICAL_LEVEL 150 +#define Y_NET 250 + +// z trix.h begin +SDL_Surface * block[8]; +SDL_Surface * explode; +SDL_Surface * bomb; +SDL_Surface * wall; +SDL_Surface * smoke; + +SDL_Surface * net; +SDL_Surface * banner; +SDL_Surface * bg; +SDL_Surface * screen; +TTF_Font* font; + +SDL_Renderer * renderer; +SDL_Texture * tex_screen; + +SDL_Rect source, dest; +//int use_net; // zmienna wyswietlania siatki +//int start_level; // start gry od poziomu ... +//int score; +//int bonus; // nalicza premie + +//char * hifile; // path do hiscore + + +int use_net; // zmienna wyswietlania siatki +int start_level; // start gry od poziomu ... +int score; +int bonus; // nalicza premie + +char * hifile; // path do hiscore +struct tab tab_hiscores[5]; +char catalogue[N_PIC][40]; +struct FIELD field[23][26]; +// z trix.h end + + +SDL_Surface * prepare_text(int r, int b, int g, char *buffer); +void draw_text (int x, int y, SDL_Surface * image); +void save_settings(void); +void print_inscription(char * buffor, int desx, int desy); +void save_hiscores_to_file (void); + +/* sortuje tabele wynikiow i umieszcza + nowy wpis na odpowiednim miejscu */ +void prepare_new_place(char *new_name) { + + int i, j, hi = -1; + + /* szukamy miejsca na wpis */ + for (i=4; i>=0; --i) { + if (tab_hiscores[i].score < score)hi = i; + } + + /* przesowamy gorsze wyniki o miejsce w dol */ + for (i=4; i>hi; --i) { + tab_hiscores[i].score = tab_hiscores[i-1].score; + strcpy(tab_hiscores[i].name, tab_hiscores[i-1].name); + } + + /* nowy wpis */ + tab_hiscores[hi].score = score; + strcpy(tab_hiscores[hi].name, new_name); + + + /* zapamietanie wpisu */ + save_hiscores_to_file(); + +} + + +/* pobiera imie gracza */ +void get_name_of_player(void) { + + int i, done, p; + SDL_Rect srcrect, destrect; + SDL_Surface * enter = NULL; + SDL_Surface * enter_name_inscription; + char buffor[20]; + + destrect = set_rect(0,0,screen->w,screen->h); + SDL_FillRect(screen,&destrect,0); + +#define MAX 20 + + /* wypisanie informacji o wprowadzeniu danych */ + enter_name_inscription = (SDL_Surface *) prepare_text(255, 255, 255, "ENTER YOUR NAME"); + draw_text(X_CENTER(enter_name_inscription->w) , 100, enter_name_inscription); + + //SDL_Flip(screen); + + p = done = 0; + while (!done) + { + SDL_Event event; + + /* Check for events */ + while (SDL_PollEvent (&event)) + { + switch (event.type) + { + case SDL_KEYDOWN: +// printf("Nacini�o klawisz: %s\n", +// SDL_GetKeyName(event.key.keysym.sym)); + + if (event.key.keysym.sym==SDLK_ESCAPE) + done = 1; + + /* kasowanie ostatniej litery */ + if (event.key.keysym.sym==SDLK_BACKSPACE) + { + if (p) { + /* skracamy bufor */ + --p; + buffor[p] = '\0'; + + /* najperw czyscimy miejsce wpisu */ + destrect = set_rect(0, 150, screen->w,enter->h); + SDL_FillRect(screen,&destrect,0); + //SDL_UpdateRect(screen, 0, 150, screen->w, enter->h); + + SDL_FreeSurface(enter); + + if (strlen(buffor)) { + enter = (SDL_Surface *) prepare_text(255, 255, 255, buffor); + draw_text(X_CENTER(enter->w), 150, enter); + // SDL_UpdateRect(screen, X_CENTER(enter->w), 150, + // enter->w, enter->h); + } + /* jesli bufor jest pusty to koniecznie */ + else enter = NULL; + } + break; + } + /* zatwierdzanie */ + if (event.key.keysym.sym==SDLK_RETURN) + { + /* tylko wtedy gdy jest jakis podpis */ + if (p) + prepare_new_place(buffor); + + done = 1; + break; + } + /* dopisywanie litery na koncu */ + if (p < 20 && event.key.keysym.sym >= 97 && + event.key.keysym.sym <= 122) { + + /* najperw czyscimy miejsce wpisu */ + destrect = set_rect(0, 150, screen->w,32); + SDL_FillRect(screen,&destrect,0); + //SDL_UpdateRect(screen, 0, 150, screen->w, 32); + + SDL_FreeSurface(enter); + sprintf(&buffor[p], "%s", SDL_GetKeyName(event.key.keysym.sym)); + ++p; + enter = (SDL_Surface *) prepare_text(255, 255, 255, buffor); + draw_text(X_CENTER(enter->w), 150, enter); + //SDL_UpdateRect(screen, X_CENTER(enter->w), 150, + // enter->w, enter->h); + } + + break; + case SDL_QUIT: + exit(0); + break; + } + } + + dest = set_rect(0, 0, screen->w, screen->h); + //SDL_FillRect(screen, &dest, SDL_MapRGB(screen->format, 255, 255, 255)); + + source = set_rect(0, 0, screen->w, screen->h); + + tex_screen = SDL_CreateTextureFromSurface(renderer, screen); + SDL_RenderClear ( renderer ); + SDL_RenderCopy(renderer, tex_screen,&source,&dest); + SDL_RenderPresent(renderer); + SDL_DestroyTexture(tex_screen); + + } + + SDL_FreeSurface(enter); + SDL_FreeSurface(enter_name_inscription); + +} + +/* opcje */ +void options (void) { + + SDL_Surface * start_level_inscription; + SDL_Surface * white_net_inscription; + SDL_Surface * yellow_net_inscription; + SDL_Surface * white_minus_inscription; + SDL_Surface * yellow_minus_inscription; + SDL_Surface * white_plus_inscription; + SDL_Surface * yellow_plus_inscription; + SDL_Surface * yes_inscription; + SDL_Surface * no_inscription; + SDL_Surface * white_return_inscription; + SDL_Surface * yellow_return_inscription; + + + int done; + SDL_Rect srcrect, destrect; + char buffor[10]; + + start_level_inscription = (SDL_Surface *) prepare_text(255, 255, 255, "START LEVEL"); + white_net_inscription = (SDL_Surface *) prepare_text(255, 255, 255, "NET:"); + yellow_net_inscription = (SDL_Surface *) prepare_text(237, 0, 255, "NET:"); + white_minus_inscription = (SDL_Surface *) prepare_text(255, 255, 255, "<<"); + yellow_minus_inscription = (SDL_Surface *) prepare_text(237, 0, 255, "<<"); + white_plus_inscription = (SDL_Surface *) prepare_text(255, 255, 255, ">>"); + yellow_plus_inscription = (SDL_Surface *) prepare_text(237, 0, 255, ">>"); + yes_inscription = (SDL_Surface *) prepare_text(255, 255, 255, "YES"); + no_inscription = (SDL_Surface *) prepare_text(255, 255, 255, "NO "); + + white_return_inscription = (SDL_Surface *) prepare_text(255, 255, 255, "RETURN TO MENU"); + yellow_return_inscription = (SDL_Surface *) prepare_text(237, 0, 255, "RETURN TO MENU"); + + /* czysci ekran */ + destrect = set_rect(0,0,screen->w,screen->h); + SDL_FillRect(screen,&destrect,0); + + draw_text(X_START_LEVEL, Y_START_LEVEL, start_level_inscription); + draw_text(X_MINUS, Y_TOPICAL_LEVEL, white_minus_inscription); + draw_text(X_PLUS, Y_TOPICAL_LEVEL, white_plus_inscription); + + sprintf(buffor, "%2d", start_level); + print_inscription(buffor, X_MINUS+47, Y_TOPICAL_LEVEL); + + draw_text(X_NET, Y_NET, white_net_inscription); + + if (!use_net) draw_text(X_NET+60, Y_NET, no_inscription); + else draw_text(X_NET+60, Y_NET, yes_inscription); + + draw_text(X_RETURN, Y_RETURN, white_return_inscription); + + ////SDL_Flip(screen); + + done = 0; + while (!done) + { + SDL_Event event; + + /* Check for events */ + while (SDL_PollEvent (&event)) + { + switch (event.type) + { + case SDL_KEYDOWN: +// printf("Nacini�o klawisz: %s\n", +// SDL_GetKeyName(event.key.keysym.sym)); + + if (event.key.keysym.sym==SDLK_ESCAPE) + done = 1; + break; + case SDL_QUIT: + exit(0); + break; + case SDL_MOUSEMOTION: + + case SDL_MOUSEBUTTONDOWN: +// printf("Nacini�o przycisk o numerze %d na " +// "punkcie o wsp�rz�nych %d,%d\n", event.button.button, +// event.button.x, event.button.y); + /* Kursor na << */ + if (!event.button.button && event.button.x >= X_MINUS && + event.button.y >= Y_TOPICAL_LEVEL && + event.button.x <= X_MINUS + yellow_minus_inscription->w && + event.button.y <= Y_TOPICAL_LEVEL + yellow_minus_inscription->h) { + + draw_text(X_MINUS, Y_TOPICAL_LEVEL, yellow_minus_inscription); + // SDL_UpdateRect(screen, X_MINUS, Y_TOPICAL_LEVEL, + // yellow_minus_inscription->w, yellow_minus_inscription->h); + + } + /* gdy wcisnieto << */ + else if (event.button.button && event.button.x >= X_MINUS && + event.button.y >= Y_TOPICAL_LEVEL && + event.button.x <= X_MINUS + yellow_minus_inscription->w && + event.button.y <= Y_TOPICAL_LEVEL + yellow_minus_inscription->h) { + + if (start_level > 1) start_level -= 1; + + /* wymazuje wpis */ + destrect = set_rect(212,Y_TOPICAL_LEVEL, 28, 32); + SDL_FillRect(screen,&destrect,0); + // SDL_UpdateRect(screen, 212, Y_TOPICAL_LEVEL, 28, 32); + + /* nowy wpis */ + sprintf(buffor, "%2d", start_level); + print_inscription(buffor, X_MINUS+47, Y_TOPICAL_LEVEL); + //SDL_UpdateRect(screen, X_MINUS+47, Y_TOPICAL_LEVEL, 28, 32); + + /* << na zolto */ + draw_text(X_MINUS, Y_TOPICAL_LEVEL, yellow_minus_inscription); + //SDL_UpdateRect(screen, X_MINUS, Y_TOPICAL_LEVEL, + // yellow_minus_inscription->w, yellow_minus_inscription->h); + } + else { + /* << na bialo */ + draw_text(X_MINUS, Y_TOPICAL_LEVEL, white_minus_inscription); + // SDL_UpdateRect(screen, X_MINUS, Y_TOPICAL_LEVEL, + // white_minus_inscription->w, white_minus_inscription->h); + } + /* kursor na >> */ + if (!event.button.button && event.button.x >= X_PLUS && + event.button.y >= Y_TOPICAL_LEVEL && + event.button.x <= X_PLUS + yellow_plus_inscription->w && + event.button.y <= Y_TOPICAL_LEVEL + yellow_plus_inscription->h) { + + draw_text(X_PLUS, Y_TOPICAL_LEVEL, yellow_plus_inscription); + //SDL_UpdateRect(screen, X_PLUS, Y_TOPICAL_LEVEL, + // yellow_plus_inscription->w, yellow_plus_inscription->h); + + } + /* gdy wcisnieto >> */ + else if (event.button.button && event.button.x >= X_PLUS && + event.button.y >= Y_TOPICAL_LEVEL && + event.button.x <= X_PLUS + yellow_plus_inscription->w && + event.button.y <= Y_TOPICAL_LEVEL + yellow_plus_inscription->h) { + + if (start_level<10) start_level += 1; + + /* wymazuje wpis */ + destrect = set_rect(212,Y_TOPICAL_LEVEL, 28, 32); + SDL_FillRect(screen,&destrect,0); + //SDL_UpdateRect(screen, 212, Y_TOPICAL_LEVEL, 28, 32); + + /* nowy wpis */ + sprintf(buffor, "%2d", start_level); + print_inscription(buffor, X_MINUS+47, Y_TOPICAL_LEVEL); + //SDL_UpdateRect(screen, X_MINUS+47, Y_TOPICAL_LEVEL, 28, 32); + + /* >> na zolto */ + draw_text(X_PLUS, Y_TOPICAL_LEVEL, yellow_plus_inscription); + // SDL_UpdateRect(screen, X_PLUS, Y_TOPICAL_LEVEL, + // yellow_plus_inscription->w, yellow_plus_inscription->h); + } + else { + /* >> na bialo */ + draw_text(X_PLUS, Y_TOPICAL_LEVEL, white_plus_inscription); + // SDL_UpdateRect(screen, X_PLUS, Y_TOPICAL_LEVEL, + // white_plus_inscription->w, white_plus_inscription->h); +// printf ("nie wcisnieto \n"); + } + /* kursor na NET */ + if (!event.button.button && event.button.x >= X_NET && + event.button.y >= Y_NET && + event.button.x <= X_NET + yellow_net_inscription->w && + event.button.y <= Y_NET + yellow_net_inscription->h) { + + draw_text(X_NET, Y_NET, yellow_net_inscription); + //SDL_UpdateRect(screen, X_NET, Y_NET, + // yellow_net_inscription->w, yellow_net_inscription->h); + + } + /* gdy wcisnieto NET */ + else if (event.button.button && event.button.x >= X_NET && + event.button.y >= Y_NET && + event.button.x <= X_NET + yellow_net_inscription->w && + event.button.y <= Y_NET + yellow_net_inscription->h) { + + if (use_net) use_net =0; + else use_net =1; + + /* wymazuje wpis */ + destrect = set_rect(X_NET+60,Y_NET, + yes_inscription->w,yes_inscription->h); + SDL_FillRect(screen,&destrect,0); + + /* ustawia odpowiedni tekst */ + if (!use_net) draw_text(X_NET+60, Y_NET, no_inscription); + else draw_text(X_NET+60, Y_NET, yes_inscription); + + // SDL_UpdateRect(screen, X_NET+60, Y_NET, + // yes_inscription->w, yes_inscription->h); + + draw_text(X_NET, Y_NET, yellow_net_inscription); + // SDL_UpdateRect(screen, X_NET, Y_NET, + // yellow_net_inscription->w, yellow_net_inscription->h); + } + else { + + draw_text(X_NET, Y_NET, white_net_inscription); + //SDL_UpdateRect(screen, X_NET, Y_NET, + // white_net_inscription->w, white_net_inscription->h); +// printf ("nie wcisnieto \n"); + } + + /* Kursor na powrot do menu */ + if (!event.button.button && event.button.x >= X_RETURN && + event.button.y >= Y_RETURN && + event.button.x <= X_RETURN + yellow_return_inscription->w && + event.button.y <= Y_RETURN + yellow_return_inscription->h) { + + draw_text(X_RETURN, Y_RETURN, yellow_return_inscription); + // SDL_UpdateRect(screen, X_RETURN, Y_RETURN, + // yellow_return_inscription->w, yellow_return_inscription->h); + + } + + /* gdy wcisnieto powrot do menu */ + else if (event.button.button && event.button.x >= X_RETURN && + event.button.y >= Y_RETURN && + event.button.x <= X_RETURN + yellow_return_inscription->w && + event.button.y <= Y_RETURN + yellow_return_inscription->h) { + + done = 1; + save_settings(); + draw_text(X_RETURN, Y_RETURN, yellow_return_inscription); + // SDL_UpdateRect(screen, X_RETURN, Y_RETURN, + // yellow_return_inscription->w, yellow_return_inscription->h); + } + else { + /* powrot do menu na bialo */ + draw_text(X_RETURN, Y_RETURN, white_return_inscription); + // SDL_UpdateRect(screen, X_RETURN, Y_RETURN, + // white_return_inscription->w, white_return_inscription->h); + } + + break; + } + } +// //SDL_Flip(screen); + dest = set_rect(0, 0, screen->w, screen->h); + //SDL_FillRect(screen, &dest, SDL_MapRGB(screen->format, 255, 255, 255)); + + source = set_rect(0, 0, screen->w, screen->h); + + tex_screen = SDL_CreateTextureFromSurface(renderer, screen); + SDL_RenderClear ( renderer ); + SDL_RenderCopy(renderer, tex_screen,&source,&dest); + SDL_RenderPresent(renderer); + SDL_DestroyTexture(tex_screen); + } + + + + // czyscimy ekran przed powrotem + destrect = set_rect(0,0,screen->w,screen->h); + SDL_FillRect(screen,&destrect,0); + //SDL_Flip(screen); + + + + SDL_FreeSurface(start_level_inscription); + SDL_FreeSurface(white_net_inscription); + SDL_FreeSurface(yellow_net_inscription); + SDL_FreeSurface(white_minus_inscription); + SDL_FreeSurface(yellow_minus_inscription); + SDL_FreeSurface(white_plus_inscription); + SDL_FreeSurface(yellow_plus_inscription); + SDL_FreeSurface(yes_inscription); + SDL_FreeSurface(no_inscription); + SDL_FreeSurface(white_return_inscription); + SDL_FreeSurface(yellow_return_inscription); + +} + +void wait_for_return (void) { + + int done; + SDL_Surface * white_return_inscription; + SDL_Surface * yellow_return_inscription; + + white_return_inscription = (SDL_Surface *) prepare_text(255, 255, 255, "RETURN TO MENU"); + yellow_return_inscription = (SDL_Surface *) prepare_text(237, 0, 255, "RETURN TO MENU"); + + draw_text(X_RETURN, Y_RETURN, white_return_inscription); + +// //SDL_Flip(screen); + // SDL_UpdateRect(screen, X_RETURN, Y_RETURN, + // white_return_inscription->w, white_return_inscription->h); + + + done = 0; + while (!done) + { + SDL_Event event; + + /* Check for events */ + while (SDL_PollEvent (&event)) + { + switch (event.type) + { + case SDL_KEYDOWN: +// printf("Nacini�o klawisz: %s\n", +// SDL_GetKeyName(event.key.keysym.sym)); + + if (event.key.keysym.sym==SDLK_ESCAPE) + done = 1; + break; + case SDL_QUIT: + exit(0); + break; + case SDL_MOUSEMOTION: + + case SDL_MOUSEBUTTONDOWN: +// printf("Nacini�o przycisk o numerze %d na " +// "punkcie o wsp�rz�nych %d,%d\n", event.button.button, +// event.button.x, event.button.y); + + /* Kursor na powrot do menu */ + if (!event.button.button && event.button.x >= X_RETURN && + event.button.y >= Y_RETURN && + event.button.x <= X_RETURN + yellow_return_inscription->w && + event.button.y <= Y_RETURN + yellow_return_inscription->h) { + + draw_text(X_RETURN, Y_RETURN, yellow_return_inscription); + // SDL_UpdateRect(screen, X_RETURN, Y_RETURN, + // yellow_return_inscription->w, yellow_return_inscription->h); + + } + + /* gdy wcisnieto powrot do menu */ + else if (event.button.button && event.button.x >= X_RETURN && + event.button.y >= Y_RETURN && + event.button.x <= X_RETURN + yellow_return_inscription->w && + event.button.y <= Y_RETURN + yellow_return_inscription->h) { + + done = 1; + draw_text(X_RETURN, Y_RETURN, yellow_return_inscription); + // SDL_UpdateRect(screen, X_RETURN, Y_RETURN, + // yellow_return_inscription->w, yellow_return_inscription->h); + } + else { + /* powrot do manu na bialo */ + draw_text(X_RETURN, Y_RETURN, white_return_inscription); + // SDL_UpdateRect(screen, X_RETURN, Y_RETURN, + // white_return_inscription->w, white_return_inscription->h); + } + + break; + } + } + + + dest = set_rect(0, 0, screen->w, screen->h); + //SDL_FillRect(screen, &dest, SDL_MapRGB(screen->format, 255, 255, 255)); + + source = set_rect(0, 0, screen->w, screen->h); + + tex_screen = SDL_CreateTextureFromSurface(renderer, screen); + SDL_RenderClear ( renderer ); + SDL_RenderCopy(renderer, tex_screen,&source,&dest); + SDL_RenderPresent(renderer); + SDL_DestroyTexture(tex_screen); + + } + + SDL_FreeSurface(white_return_inscription); + SDL_FreeSurface(yellow_return_inscription); +} + + +void about (void) { + + SDL_Surface * about; + SDL_Rect srcrect, destrect; + + about=IMG_ReadXPMFromArray(about_xpm); + if(!about) { + printf("IMG_ReadXPMFromArray: %s\n", IMG_GetError()); + exit(1); + } + + /* czysci ekran */ + destrect = set_rect(0,0,screen->w,screen->h); + SDL_FillRect(screen,&destrect,0); + + /* umieszcza inskrypcje na ekranie */ + destrect = set_rect(X_CENTER(about->w),50,about->w,about->h); + srcrect = set_rect(0, 0, about->w, about->h); + SDL_BlitSurface(about,&srcrect, screen,&destrect); +// SDL_UpdateRect(screen, X_CENTER(about->w), 50, about->w, about->h); + + //SDL_Flip(screen); + + wait_for_return(); + + SDL_FreeSurface(about); + + /* czyscimy ekran przed powrotem */ + destrect = set_rect(0,0,screen->w,screen->h); + SDL_FillRect(screen,&destrect,0); + //SDL_Flip(screen); + +} + + + + +void hiscores(void) { + + SDL_Surface * place_inscription[5]; + SDL_Rect srcrect, destrect; + int done, i, y_place; + char buffor[50]; + + + destrect = set_rect(0,0,screen->w,screen->h); + SDL_FillRect(screen,&destrect,0); + + /* tworzenie obrazkow z wynikami */ + for (i=0; i<5; ++i) { + sprintf(buffor, "%d %s %d", i+1, tab_hiscores[i].name, tab_hiscores[i].score); + place_inscription[i]= (SDL_Surface *) prepare_text(255, 255, 255, buffor); + } + + + /* wypisuje ranking */ + y_place = 50; + for (i=0; i<5; ++i) { + draw_text(X_CENTER(place_inscription[i]->w), y_place, place_inscription[i]); + y_place += 50; + } + //SDL_Flip(screen); + + wait_for_return(); + + /* usuwanie obrazkow*/ + for (i=0; i<5; ++i) + SDL_FreeSurface(place_inscription[i]); + + + // czyscimy ekran przed powrotem + destrect = set_rect(0,0,screen->w,screen->h); + SDL_FillRect(screen,&destrect,0); + //SDL_Flip(screen); + + +} + + +int menu() { + + int done; + SDL_Rect srcrect, destrect; + SDL_Surface * white_start_inscription; + SDL_Surface * yellow_start_inscription; + SDL_Surface * white_hiscores_inscription; + SDL_Surface * yellow_hiscores_inscription; + SDL_Surface * white_about_inscription; + SDL_Surface * yellow_about_inscription; + SDL_Surface * white_options_inscription; + SDL_Surface * yellow_options_inscription; + + + white_start_inscription = (SDL_Surface *) prepare_text(255, 255, 255, "START"); + white_hiscores_inscription = (SDL_Surface *) prepare_text(255, 255, 255, "HiSCORES"); + white_about_inscription = (SDL_Surface *) prepare_text(255, 255, 255, "ABOUT"); + white_options_inscription = (SDL_Surface *) prepare_text(255, 255, 255, "OPTIONS"); + yellow_start_inscription = (SDL_Surface *) prepare_text(237, 0, 255, "START"); + yellow_hiscores_inscription = (SDL_Surface *) prepare_text(237, 0, 255, "HiSCORES"); + yellow_about_inscription = (SDL_Surface *) prepare_text(237, 0, 255, "ABOUT"); + yellow_options_inscription = (SDL_Surface *) prepare_text(237, 0, 255, "OPTIONS"); + + /* czysci ekran */ + destrect = set_rect(0,0,screen->w,screen->h); + SDL_FillRect(screen,&destrect,0); + + /* rysuje banner */ + destrect = set_rect(X_CENTER(banner->w),50,banner->w,banner->h); + srcrect = set_rect(0, 0, banner->w, banner->h); + SDL_BlitSurface(banner,&srcrect, screen,&destrect); + // SDL_UpdateRect(screen, X_CENTER(banner->w), 50, banner->w, banner->h); + + + draw_text(X_START, Y_START, white_start_inscription); + draw_text(X_HISCORES, Y_HISCORES, white_hiscores_inscription); + draw_text(X_OPTIONS, Y_OPTIONS, white_options_inscription); + draw_text(X_ABOUT, Y_ABOUT, white_about_inscription); + + //SDL_Flip(screen); + + done = 0; + while (!done) + { + SDL_Event event; + + /* Check for events */ + while (SDL_PollEvent (&event)) + { + switch (event.type) + { + case SDL_KEYDOWN: +// printf("Nacini�o klawisz: %s\n", +// SDL_GetKeyName(event.key.keysym.sym)); + + if (event.key.keysym.sym==SDLK_ESCAPE) + done = QUIT_GAME; + break; + case SDL_QUIT: + done = QUIT_GAME; + break; + case SDL_MOUSEMOTION: + case SDL_MOUSEBUTTONDOWN: + /* kursor na starcie */ + if (!event.button.button && event.button.x >= X_START && + event.button.y >= Y_START && + event.button.x <= X_START + yellow_start_inscription->w && + event.button.y <= Y_START + yellow_start_inscription->h) { + + draw_text(X_START, Y_START, yellow_start_inscription); + // SDL_UpdateRect(screen, X_START, Y_START, + // yellow_start_inscription->w, yellow_start_inscription->h); + } + /* gdy wcisnieto start */ + else if (event.button.button && event.button.x >= X_START && + event.button.y >= Y_START && + event.button.x <= X_START + yellow_start_inscription->w && + event.button.y <= Y_START + yellow_start_inscription->h) { + + done = START_GAME; + + draw_text(X_START, Y_START, yellow_start_inscription); + // SDL_UpdateRect(screen, X_START, Y_START, + // yellow_start_inscription->w, yellow_start_inscription->h); + } + else { + /* kursor poza napisem start */ + draw_text(X_START, Y_START, white_start_inscription); + // SDL_UpdateRect(screen, X_START, Y_START, + // white_start_inscription->w, white_start_inscription->h); + } + /* kursor na hiscores */ + if (!event.button.button && event.button.x >= X_HISCORES && + event.button.y >= Y_HISCORES && + event.button.x <= X_HISCORES + yellow_hiscores_inscription->w && + event.button.y <= Y_HISCORES + yellow_hiscores_inscription->h) { + + draw_text(X_HISCORES, Y_HISCORES, yellow_hiscores_inscription); + // SDL_UpdateRect(screen, X_HISCORES, Y_HISCORES, + // yellow_hiscores_inscription->w, yellow_hiscores_inscription->h); + } + /* gdy wcisnieto hiscores */ + else if (event.button.button && event.button.x >= X_HISCORES && + event.button.y >= Y_HISCORES && + event.button.x <= X_HISCORES + yellow_hiscores_inscription->w && + event.button.y <= Y_HISCORES + yellow_hiscores_inscription->h) { + + done = HISCORES; + + draw_text(X_HISCORES, Y_HISCORES, yellow_hiscores_inscription); + // SDL_UpdateRect(screen, X_HISCORES, Y_HISCORES, + // yellow_hiscores_inscription->w, yellow_hiscores_inscription->h); + } + else { + /* kursor poza napisem hiscore */ + draw_text(X_HISCORES, Y_HISCORES, white_hiscores_inscription); + // SDL_UpdateRect(screen, X_HISCORES, Y_HISCORES, + // white_hiscores_inscription->w, white_hiscores_inscription->h); + } + /* kursor na options */ + if (!event.button.button && event.button.x >= X_OPTIONS && + event.button.y >= Y_OPTIONS && + event.button.x <= X_OPTIONS + yellow_options_inscription->w && + event.button.y <= Y_OPTIONS + yellow_options_inscription->h) { + + draw_text(X_OPTIONS, Y_OPTIONS, yellow_options_inscription); + // SDL_UpdateRect(screen, X_OPTIONS, Y_OPTIONS, + // yellow_options_inscription->w, yellow_options_inscription->h); + } + /* gdy wcisnieto options */ + else if (event.button.button && event.button.x >= X_OPTIONS && + event.button.y >= Y_OPTIONS && + event.button.x <= X_OPTIONS + yellow_options_inscription->w && + event.button.y <= Y_OPTIONS + yellow_options_inscription->h) { + + done = OPTIONS; + + draw_text(X_OPTIONS, Y_OPTIONS, yellow_options_inscription); + // SDL_UpdateRect(screen, X_OPTIONS, Y_OPTIONS, + // yellow_options_inscription->w, yellow_options_inscription->h); + } + else { + /* kursor poza napisem options */ + draw_text(X_OPTIONS, Y_OPTIONS, white_options_inscription); + // SDL_UpdateRect(screen, X_OPTIONS, Y_OPTIONS, + // white_options_inscription->w, white_options_inscription->h); + } + + + /* kursor na about */ + if (!event.button.button && event.button.x >= X_ABOUT && + event.button.y >= Y_ABOUT && + event.button.x <= X_ABOUT + yellow_about_inscription->w && + event.button.y <= Y_ABOUT + yellow_about_inscription->h) { + + draw_text(X_ABOUT, Y_ABOUT, yellow_about_inscription); + // SDL_UpdateRect(screen, X_ABOUT, Y_ABOUT, + // yellow_about_inscription->w, yellow_about_inscription->h); + } + /* gdy wcisnieto about */ + else if (event.button.button && event.button.x >= X_ABOUT && + event.button.y >= Y_ABOUT && + event.button.x <= X_ABOUT + yellow_about_inscription->w && + event.button.y <= Y_ABOUT + yellow_about_inscription->h) { + + done = ABOUT; + + draw_text(X_ABOUT, Y_ABOUT, yellow_about_inscription); + // SDL_UpdateRect(screen, X_ABOUT, Y_ABOUT, + // yellow_about_inscription->w, yellow_about_inscription->h); + } + else { + /* kursor poza napisem about */ + draw_text(X_ABOUT, Y_ABOUT, white_about_inscription); + // SDL_UpdateRect(screen, X_ABOUT, Y_ABOUT, + // white_about_inscription->w, white_about_inscription->h); + } + + break; + default: + break; + + } + } + + dest = set_rect(0, 0, screen->w, screen->h); + source = set_rect(0, 0, screen->w, screen->h); + + tex_screen = SDL_CreateTextureFromSurface(renderer, screen); + SDL_RenderClear ( renderer ); + SDL_RenderCopy(renderer, tex_screen,&source,&dest); + SDL_RenderPresent(renderer); + SDL_DestroyTexture(tex_screen); + + } + SDL_FreeSurface(white_start_inscription); + SDL_FreeSurface(yellow_start_inscription); + SDL_FreeSurface(white_hiscores_inscription); + SDL_FreeSurface(yellow_hiscores_inscription); + SDL_FreeSurface(white_about_inscription); + SDL_FreeSurface(yellow_about_inscription); + SDL_FreeSurface(white_options_inscription); + SDL_FreeSurface(yellow_options_inscription); + + return done; +} diff --git a/src/trix.h b/src/trix.h new file mode 100644 index 0000000..4fa512a --- /dev/null +++ b/src/trix.h @@ -0,0 +1,156 @@ +/* + * Trix - klikanie po klockach + * Przemysław R. Pietraszczyk + * + * paźdżiernik 2006 r. + * + * licencja: Public Domain + */ + +#ifndef TRIX_H +#define TRIX_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if WINDOWS +#include +#endif + + +#if WINDOWS +//#include "img\\banner.xpm" +#include "..img/banner.xpm" +#include "..img/about.xpm" +#elif LINUX +#include "../img/banner.xpm" +#include "../img/about.xpm" +#endif + + +#define FONTSIZE 25 + +#define FIELD_SIZE 20 + + + +#if WINDOWS +#define CATALOGUE "img\\bg\\catalogue.txt" +#define BG_DIR "img\\bg\\" +#define ICONS "img\\icons.bmp" +#define HISCORES_FILE "hiscores" +#define NAMEFONT "ZapfHumanist.ttf" +//#define SETTINGS "trix.ini" +#define SETTINGS "settings" +#elif LINUX +#define CATALOGUE "/usr/share/trix/img/bg/catalogue.txt" +#define BG_DIR "/usr/share/trix/img/bg/" +#define ICONS "/usr/share/trix/img/icons.bmp" +#define NAMEFONT "/usr/share/trix/ZapfHumanist.ttf" +#define SETTINGS "/.trix/trixrc" + +//#define CATALOGUE "img/bg/catalogue.txt" +//#define BG_DIR "img/bg/" +//#define ICONS "img/icons.bmp" +//#define NAMEFONT "./ZapfHumanist.ttf" +//#define SETTINGS "/.trix/trixrc" + +#endif + +#define N_PIC 6 // ilosc zdjec tla + +#define START_GAME 1 +#define HISCORES 2 +#define QUIT_GAME 3 +#define ABOUT 4 +#define OPTIONS 5 +// #define GAME_OVER 6 + + +#define Y_START 200 // 100 +#define Y_HISCORES 250 // 150 +#define Y_OPTIONS 300 +#define Y_ABOUT 350 + +#define X_CENTER(w) (230-w/2) + + + +extern SDL_Surface * block[8]; +extern SDL_Surface * explode; +extern SDL_Surface * bomb; +extern SDL_Surface * wall; +extern SDL_Surface * smoke; + +extern SDL_Surface * net; +extern SDL_Surface * banner; +extern SDL_Surface * bg; +extern SDL_Surface * screen; +extern TTF_Font* font; + +extern SDL_Renderer * renderer; +extern SDL_Texture * tex_screen; + +extern SDL_Rect source, dest; + + +extern int use_net; // zmienna wyswietlania siatki +extern int start_level; // start gry od poziomu ... +extern int score; +extern int bonus; // nalicza premie + +extern char * hifile; // path do hiscore + +struct tab { + char name[20]; + int score; +}; + +extern struct tab tab_hiscores[5]; +/* +struct FIELD{ + SDL_Surface * type; + int status; // 0:brak statusu 2:stoi -1:opada 1:znika lub wybucha +} field[23][26]; +*/ +struct FIELD{ + SDL_Surface * type; + int status; // 0:brak statusu 2:stoi -1:opada 1:znika lub wybucha +}; + +extern struct FIELD field[23][26]; + +#define DROP -1 // opada +#define FADE 1 // element zanika +#define STAND 2 // stoi +#define WALL 3 // murek + + +/* struktura przechowuje pozycje kasowanych elementow */ +struct ghost { + int x, y; +}; + +/* struktura przechowujaca dane o danym poziomie */ +struct data_levels { + int max; // zakres liczb losowych + int drop; // flaga zrzutu + int wall; // 1: ustawiony murek na dnie studni 0; brak murka +}; + +extern char catalogue[N_PIC][40]; // tla + +SDL_Rect set_rect(int x, int y, int w, int h); +Uint32 getpixel(SDL_Surface *surface, int x, int y); + +#endif diff --git a/trix.rc b/trix.rc new file mode 100644 index 0000000..20fe10e --- /dev/null +++ b/trix.rc @@ -0,0 +1,26 @@ +id ICON "img/trix-icon.ico" +1 VERSIONINFO +FILEVERSION 0,9,1,1 +PRODUCTVERSION 0,9,1,1 +FILEOS 0x4 +FILETYPE 0x1 +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", "Przemyslaw R. Pietraszczyk" + VALUE "FileDescription", "Wyklikaj wszystkie klocki !" + VALUE "FileVersion", "0, 9, 1, 1" + VALUE "InternalName", "Win32App" + VALUE "LegalCopyright", "0169 Pietraszczyk" + VALUE "OriginalFilename", "Trix.exe" + VALUE "ProductName", "Trix" + VALUE "ProductVersion", "0, 9, 1, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0809, 1200 + END +END -- cgit v1.2.3